@@ 39-51 (lines=13) @@ | ||
36 | */ |
|
37 | class CartAddCustomLineItemAction extends AbstractAction |
|
38 | { |
|
39 | public function fieldDefinitions() |
|
40 | { |
|
41 | return [ |
|
42 | 'action' => [static::TYPE => 'string'], |
|
43 | 'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
|
44 | 'quantity' => [static::TYPE => 'int'], |
|
45 | 'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
46 | 'slug' => [static::TYPE => 'string'], |
|
47 | 'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'], |
|
48 | 'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObjectDraft'], |
|
49 | 'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
|
50 | ]; |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @param array $data |
@@ 36-48 (lines=13) @@ | ||
33 | */ |
|
34 | class CartAddLineItemAction extends AbstractAction |
|
35 | { |
|
36 | public function fieldDefinitions() |
|
37 | { |
|
38 | return [ |
|
39 | 'action' => [static::TYPE => 'string'], |
|
40 | 'productId' => [static::TYPE => 'string'], |
|
41 | 'variantId' => [static::TYPE => 'int'], |
|
42 | 'quantity' => [static::TYPE => 'int'], |
|
43 | 'supplyChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
|
44 | 'distributionChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
|
45 | 'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObjectDraft'], |
|
46 | 'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
|
47 | ]; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * @param string $productId |