| @@ 32-45 (lines=14) @@ | ||
| 29 | * @method CustomFieldObject getCustom() |
|
| 30 | * @method CustomLineItemDraft setCustom(CustomFieldObject $custom = null) |
|
| 31 | */ |
|
| 32 | class CustomLineItemDraft extends JsonObject |
|
| 33 | { |
|
| 34 | public function fieldDefinitions() |
|
| 35 | { |
|
| 36 | return [ |
|
| 37 | 'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
|
| 38 | 'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
| 39 | 'slug' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
|
| 40 | 'quantity' => [static::TYPE => 'int'], |
|
| 41 | 'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'], |
|
| 42 | 'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'], |
|
| 43 | ]; |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||
| @@ 35-48 (lines=14) @@ | ||
| 32 | * @method CustomFieldObject getCustom() |
|
| 33 | * @method LineItemDraft setCustom(CustomFieldObject $custom = null) |
|
| 34 | */ |
|
| 35 | class LineItemDraft extends JsonObject |
|
| 36 | { |
|
| 37 | public function fieldDefinitions() |
|
| 38 | { |
|
| 39 | return [ |
|
| 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\CustomFieldObject'], |
|
| 46 | ]; |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||