commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MyCartAddLineItemAction.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_SHIPPING_DETAILS = 'shippingDetails';
29  public const FIELD_CUSTOM = 'custom';
30 
37  public function getKey();
38 
46  public function getProductId();
47 
56  public function getVariantId();
57 
65  public function getSku();
66 
73  public function getQuantity();
74 
83  public function getAddedAt();
84 
93  public function getDistributionChannel();
94 
102  public function getSupplyChannel();
103 
110  public function getShippingDetails();
111 
118  public function getCustom();
119 
123  public function setKey(?string $key): void;
124 
128  public function setProductId(?string $productId): void;
129 
133  public function setVariantId(?int $variantId): void;
134 
138  public function setSku(?string $sku): void;
139 
143  public function setQuantity(?int $quantity): void;
144 
148  public function setAddedAt(?DateTimeImmutable $addedAt): void;
149 
153  public function setDistributionChannel(?ChannelResourceIdentifier $distributionChannel): void;
154 
158  public function setSupplyChannel(?ChannelResourceIdentifier $supplyChannel): void;
159 
163  public function setShippingDetails(?ItemShippingDetailsDraft $shippingDetails): void;
164 
168  public function setCustom(?CustomFieldsDraft $custom): void;
169 }
setDistributionChannel(?ChannelResourceIdentifier $distributionChannel)
setSupplyChannel(?ChannelResourceIdentifier $supplyChannel)
setShippingDetails(?ItemShippingDetailsDraft $shippingDetails)