<?php

namespace PostenBringCheckout\admin\api\models;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class OrderItem {
	public string $product_id;
	public int $quantity;
	public ?int $weight_in_grams;
	public string $name;
	public ?string $hs_code;
	public ?string $image_url;

	public function __construct(string $product_id,
								int     $quantity,
								?int $weight,
								string  $name,
								?string $hs_code,
								?string $image_url = null)
	{
		$this->product_id      = $product_id;
		$this->weight_in_grams = $weight ?? 100;
		$this->name            = $name;
		$this->quantity        = $quantity;
		$this->hs_code         = $hs_code;
		$this->image_url = $image_url;
	}
}
