commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CartAddLineItemAction.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use DateTimeImmutable;
17 
19 {
20  public const FIELD_KEY = 'key';
21  public const FIELD_PRODUCT_ID = 'productId';
22  public const FIELD_VARIANT_ID = 'variantId';
23  public const FIELD_SKU = 'sku';
24  public const FIELD_QUANTITY = 'quantity';
25  public const FIELD_ADDED_AT = 'addedAt';
26  public const FIELD_DISTRIBUTION_CHANNEL = 'distributionChannel';
27  public const FIELD_SUPPLY_CHANNEL = 'supplyChannel';
28  public const FIELD_EXTERNAL_PRICE = 'externalPrice';
29  public const FIELD_EXTERNAL_TOTAL_PRICE = 'externalTotalPrice';
30  public const FIELD_EXTERNAL_TAX_RATE = 'externalTaxRate';
31  public const FIELD_PER_METHOD_EXTERNAL_TAX_RATE = 'perMethodExternalTaxRate';
32  public const FIELD_INVENTORY_MODE = 'inventoryMode';
33  public const FIELD_SHIPPING_DETAILS = 'shippingDetails';
34  public const FIELD_CUSTOM = 'custom';
35 
42  public function getKey();
43 
51  public function getProductId();
52 
61  public function getVariantId();
62 
70  public function getSku();
71 
78  public function getQuantity();
79 
88  public function getAddedAt();
89 
98  public function getDistributionChannel();
99 
107  public function getSupplyChannel();
108 
115  public function getExternalPrice();
116 
123  public function getExternalTotalPrice();
124 
131  public function getExternalTaxRate();
132 
139  public function getPerMethodExternalTaxRate();
140 
148  public function getInventoryMode();
149 
156  public function getShippingDetails();
157 
164  public function getCustom();
165 
169  public function setKey(?string $key): void;
170 
174  public function setProductId(?string $productId): void;
175 
179  public function setVariantId(?int $variantId): void;
180 
184  public function setSku(?string $sku): void;
185 
189  public function setQuantity(?int $quantity): void;
190 
194  public function setAddedAt(?DateTimeImmutable $addedAt): void;
195 
199  public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void;
200 
204  public function setSupplyChannel(?ChannelResourceIdentifier $supplyChannel): void;
205 
209  public function setExternalPrice(?Money $externalPrice): void;
210 
214  public function setExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotalPrice): void;
215 
219  public function setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate): void;
220 
224  public function setPerMethodExternalTaxRate(?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate): void;
225 
229  public function setInventoryMode(?string $inventoryMode): void;
230 
234  public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void;
235 
239  public function setCustom(?CustomFieldsDraft $custom): void;
240 }
setDistributionChannel(?ChannelResourceIdentifier $distributionChannel)
setPerMethodExternalTaxRate(?MethodExternalTaxRateDraftCollection $perMethodExternalTaxRate)
setExternalTotalPrice(?ExternalLineItemTotalPrice $externalTotalPrice)
setExternalTaxRate(?ExternalTaxRateDraft $externalTaxRate)
setShippingDetails(?ItemShippingDetailsDraft $shippingDetails)
setSupplyChannel(?ChannelResourceIdentifier $supplyChannel)