| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Description of ExternalOrderItem |
| 5 |
* |
| 6 |
* @author Ali2Woo Team |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace AliNext_Lite;; |
| 10 |
|
| 11 |
class ExternalOrderItem |
| 12 |
{ |
| 13 |
|
| 14 |
/** |
| 15 |
* @param string|null $externalProductId |
| 16 |
* @param int $productCount |
| 17 |
* @param string|null $shippingService |
| 18 |
* @param string|null $externalProductSku |
| 19 |
* @param string|null $comment |
| 20 |
* @param string|null $imageUrl |
| 21 |
* @param string|null $externalSkuId |
| 22 |
* @param int|null $orderItemId |
| 23 |
* @param array|ExternalOrderItemAttribute[] $attributes |
| 24 |
*/ |
| 25 |
function __construct( |
| 26 |
private ?string $externalProductId = null, |
| 27 |
private int $productCount = 1, |
| 28 |
private ?string $shippingService = null, |
| 29 |
private ?string $externalProductSku= null, |
| 30 |
private ?string $comment = null, |
| 31 |
private ?string $imageUrl = null, |
| 32 |
private ?string $externalSkuId = null, |
| 33 |
private ?int $orderItemId = null, |
| 34 |
private array $attributes = [] |
| 35 |
) { |
| 36 |
|
| 37 |
} |
| 38 |
|
| 39 |
public function getExternalProductId(): ?string |
| 40 |
{ |
| 41 |
return $this->externalProductId; |
| 42 |
} |
| 43 |
|
| 44 |
public function setExternalProductId(?string $externalProductId): self |
| 45 |
{ |
| 46 |
$this->externalProductId = $externalProductId; |
| 47 |
|
| 48 |
return $this; |
| 49 |
} |
| 50 |
|
| 51 |
public function getProductCount(): int |
| 52 |
{ |
| 53 |
return $this->productCount; |
| 54 |
} |
| 55 |
|
| 56 |
public function setProductCount(int $productCount): self |
| 57 |
{ |
| 58 |
$this->productCount = $productCount; |
| 59 |
|
| 60 |
return $this; |
| 61 |
} |
| 62 |
|
| 63 |
public function getExternalProductSku(): ?string |
| 64 |
{ |
| 65 |
return $this->externalProductSku; |
| 66 |
} |
| 67 |
|
| 68 |
public function setExternalProductSku(?string $externalProductSku): self |
| 69 |
{ |
| 70 |
$this->externalProductSku = $externalProductSku; |
| 71 |
|
| 72 |
return $this; |
| 73 |
} |
| 74 |
|
| 75 |
public function getShippingService(): ?string |
| 76 |
{ |
| 77 |
return $this->shippingService; |
| 78 |
} |
| 79 |
|
| 80 |
public function setShippingService(?string $shippingService): self |
| 81 |
{ |
| 82 |
$this->shippingService = $shippingService; |
| 83 |
|
| 84 |
return $this; |
| 85 |
} |
| 86 |
|
| 87 |
public function getComment(): ?string |
| 88 |
{ |
| 89 |
return $this->comment; |
| 90 |
} |
| 91 |
|
| 92 |
public function setComment(?string $comment): self |
| 93 |
{ |
| 94 |
$this->comment = $comment; |
| 95 |
|
| 96 |
return $this; |
| 97 |
} |
| 98 |
|
| 99 |
public function getImageUrl(): ?string |
| 100 |
{ |
| 101 |
return $this->imageUrl; |
| 102 |
} |
| 103 |
|
| 104 |
public function setImageUrl(?string $imageUrl): self |
| 105 |
{ |
| 106 |
$this->imageUrl = $imageUrl; |
| 107 |
|
| 108 |
return $this; |
| 109 |
} |
| 110 |
|
| 111 |
public function getExternalSkuId(): ?string |
| 112 |
{ |
| 113 |
return $this->externalSkuId; |
| 114 |
} |
| 115 |
|
| 116 |
public function setExternalSkuId(?string $externalSkuId): self |
| 117 |
{ |
| 118 |
$this->externalSkuId = $externalSkuId; |
| 119 |
|
| 120 |
return $this; |
| 121 |
} |
| 122 |
|
| 123 |
public function getOrderItemId(): ?int |
| 124 |
{ |
| 125 |
return $this->orderItemId; |
| 126 |
} |
| 127 |
|
| 128 |
public function setOrderItemId(?int $orderItemId): self |
| 129 |
{ |
| 130 |
$this->orderItemId = $orderItemId; |
| 131 |
|
| 132 |
return $this; |
| 133 |
} |
| 134 |
|
| 135 |
/** |
| 136 |
* @return array|ExternalOrderItemAttribute[] |
| 137 |
*/ |
| 138 |
public function getAttributes(): array |
| 139 |
{ |
| 140 |
return $this->attributes; |
| 141 |
} |
| 142 |
|
| 143 |
/** |
| 144 |
* @param array|ExternalOrderItemAttribute $attributes |
| 145 |
* @return $this |
| 146 |
*/ |
| 147 |
public function setAttributes(array $attributes): self |
| 148 |
{ |
| 149 |
$this->attributes = $attributes; |
| 150 |
|
| 151 |
return $this; |
| 152 |
} |
| 153 |
|
| 154 |
} |
| 155 |
|