| @@ 25-56 (lines=32) @@ | ||
| 22 | * @method TrackingData getTrackingData() |
|
| 23 | * @method OrderAddParcelToDeliveryAction setTrackingData(TrackingData $trackingData = null) |
|
| 24 | */ |
|
| 25 | class OrderAddParcelToDeliveryAction extends AbstractAction |
|
| 26 | { |
|
| 27 | public function fieldDefinitions() |
|
| 28 | { |
|
| 29 | return [ |
|
| 30 | 'action' => [static::TYPE => 'string'], |
|
| 31 | 'deliveryId' => [static::TYPE => 'string'], |
|
| 32 | 'measurements' => [static::TYPE => '\Commercetools\Core\Model\Order\ParcelMeasurements'], |
|
| 33 | 'trackingData' => [static::TYPE => '\Commercetools\Core\Model\Order\TrackingData'] |
|
| 34 | ]; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param array $data |
|
| 39 | * @param Context|callable $context |
|
| 40 | */ |
|
| 41 | public function __construct(array $data = [], $context = null) |
|
| 42 | { |
|
| 43 | parent::__construct($data, $context); |
|
| 44 | $this->setAction('addParcelToDelivery'); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @param string $deliveryId |
|
| 49 | * @param Context|callable $context |
|
| 50 | * @return OrderAddParcelToDeliveryAction |
|
| 51 | */ |
|
| 52 | public static function ofDeliveryId($deliveryId, $context = null) |
|
| 53 | { |
|
| 54 | return static::of($context)->setDeliveryId($deliveryId); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| @@ 25-59 (lines=35) @@ | ||
| 22 | * @method DateTimeDecorator getSyncedAt() |
|
| 23 | * @method OrderUpdateSyncInfoAction setSyncedAt(\DateTime $syncedAt = null) |
|
| 24 | */ |
|
| 25 | class OrderUpdateSyncInfoAction extends AbstractAction |
|
| 26 | { |
|
| 27 | /** |
|
| 28 | * @param array $data |
|
| 29 | * @param Context|callable $context |
|
| 30 | */ |
|
| 31 | public function __construct(array $data = [], $context = null) |
|
| 32 | { |
|
| 33 | parent::__construct($data, $context); |
|
| 34 | $this->setAction('updateSyncInfo'); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function fieldDefinitions() |
|
| 38 | { |
|
| 39 | return [ |
|
| 40 | 'action' => [static::TYPE => 'string'], |
|
| 41 | 'channel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
|
| 42 | 'externalId' => [static::TYPE => 'string'], |
|
| 43 | 'syncedAt' => [ |
|
| 44 | static::TYPE => '\DateTime', |
|
| 45 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 46 | ] |
|
| 47 | ]; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * @param ChannelReference $channel |
|
| 52 | * @param Context|callable $context |
|
| 53 | * @return OrderUpdateSyncInfoAction |
|
| 54 | */ |
|
| 55 | public static function ofChannel(ChannelReference $channel, $context = null) |
|
| 56 | { |
|
| 57 | return static::of($context)->setChannel($channel); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| @@ 23-57 (lines=35) @@ | ||
| 20 | * @method DateTimeDecorator getTimestamp() |
|
| 21 | * @method PaymentChangeTransactionTimestampAction setTimestamp(\DateTime $timestamp = null) |
|
| 22 | */ |
|
| 23 | class PaymentChangeTransactionTimestampAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'transactionId' => [static::TYPE => 'string'], |
|
| 30 | 'timestamp' => [ |
|
| 31 | static::TYPE => '\DateTime', |
|
| 32 | static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
|
| 33 | ], |
|
| 34 | ]; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param array $data |
|
| 39 | * @param Context|callable $context |
|
| 40 | */ |
|
| 41 | public function __construct(array $data = [], $context = null) |
|
| 42 | { |
|
| 43 | parent::__construct($data, $context); |
|
| 44 | $this->setAction('changeTransactionTimestamp'); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @param string $transactionId |
|
| 49 | * @param \DateTime $timestamp |
|
| 50 | * @param Context|callable $context |
|
| 51 | * @return PaymentAddTransactionAction |
|
| 52 | */ |
|
| 53 | public static function ofTransactionIdAndTimestamp($transactionId, \DateTime $timestamp, $context = null) |
|
| 54 | { |
|
| 55 | return static::of($context)->setTransactionId($transactionId)->setTimestamp($timestamp); |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 24-56 (lines=33) @@ | ||
| 21 | * @method string getPriceId() |
|
| 22 | * @method ProductChangePriceAction setPriceId(string $priceId = null) |
|
| 23 | */ |
|
| 24 | class ProductChangePriceAction extends AbstractAction |
|
| 25 | { |
|
| 26 | public function fieldDefinitions() |
|
| 27 | { |
|
| 28 | return [ |
|
| 29 | 'action' => [static::TYPE => 'string'], |
|
| 30 | 'priceId' => [static::TYPE => 'string'], |
|
| 31 | 'price' => [static::TYPE => '\Commercetools\Core\Model\Common\PriceDraft'], |
|
| 32 | 'staged' => [static::TYPE => 'bool'], |
|
| 33 | ]; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param array $data |
|
| 38 | * @param Context|callable $context |
|
| 39 | */ |
|
| 40 | public function __construct(array $data = [], $context = null) |
|
| 41 | { |
|
| 42 | parent::__construct($data, $context); |
|
| 43 | $this->setAction('changePrice'); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @param string $priceId |
|
| 48 | * @param PriceDraft $price |
|
| 49 | * @param Context|callable $context |
|
| 50 | * @return ProductChangePriceAction |
|
| 51 | */ |
|
| 52 | public static function ofPriceIdAndPrice($priceId, PriceDraft $price, $context = null) |
|
| 53 | { |
|
| 54 | return static::of($context)->setPriceId($priceId)->setPrice($price); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| @@ 23-54 (lines=32) @@ | ||
| 20 | * @method bool getStaged() |
|
| 21 | * @method ProductSetAttributeInAllVariantsAction setStaged(bool $staged = null) |
|
| 22 | */ |
|
| 23 | class ProductSetAttributeInAllVariantsAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'name' => [static::TYPE => 'string'], |
|
| 30 | 'value' => [static::TYPE => null], |
|
| 31 | 'staged' => [static::TYPE => 'bool'], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $data |
|
| 37 | * @param Context|callable $context |
|
| 38 | */ |
|
| 39 | public function __construct(array $data = [], $context = null) |
|
| 40 | { |
|
| 41 | parent::__construct($data, $context); |
|
| 42 | $this->setAction('setAttributeInAllVariants'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @param string $name |
|
| 47 | * @param Context|callable $context |
|
| 48 | * @return ProductSetAttributeInAllVariantsAction |
|
| 49 | */ |
|
| 50 | public static function ofName($name, $context = null) |
|
| 51 | { |
|
| 52 | return static::of($context)->setName($name); |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 22-52 (lines=31) @@ | ||
| 19 | * @method bool getForce() |
|
| 20 | * @method TransitionStateAction setForce(bool $force = null) |
|
| 21 | */ |
|
| 22 | class TransitionStateAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'state' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'], |
|
| 29 | 'force' => [static::TYPE => 'bool'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('transitionState'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param StateReference $state |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return static |
|
| 47 | */ |
|
| 48 | public static function ofState(StateReference $state, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setState($state); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 24-55 (lines=32) @@ | ||
| 21 | * @method bool getStaged() |
|
| 22 | * @method ProductSetCategoryOrderHintAction setStaged(bool $staged = null) |
|
| 23 | */ |
|
| 24 | class ProductSetCategoryOrderHintAction extends AbstractAction |
|
| 25 | { |
|
| 26 | public function fieldDefinitions() |
|
| 27 | { |
|
| 28 | return [ |
|
| 29 | 'action' => [static::TYPE => 'string'], |
|
| 30 | 'categoryId' => [static::TYPE => 'string'], |
|
| 31 | 'orderHint' => [static::TYPE => 'string'], |
|
| 32 | 'staged' => [static::TYPE => 'bool'], |
|
| 33 | ]; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param array $data |
|
| 38 | * @param Context|callable $context |
|
| 39 | */ |
|
| 40 | public function __construct(array $data = [], $context = null) |
|
| 41 | { |
|
| 42 | parent::__construct($data, $context); |
|
| 43 | $this->setAction('setCategoryOrderHint'); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @param string $categoryId |
|
| 48 | * @param Context|callable $context |
|
| 49 | * @return ProductSetCategoryOrderHintAction |
|
| 50 | */ |
|
| 51 | public static function ofCategoryId($categoryId, $context = null) |
|
| 52 | { |
|
| 53 | return static::of($context)->setCategoryId($categoryId); |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| @@ 22-52 (lines=31) @@ | ||
| 19 | * @method LocalizedString getInputTip() |
|
| 20 | * @method ProductTypeSetInputTipAction setInputTip(LocalizedString $inputTip = null) |
|
| 21 | */ |
|
| 22 | class ProductTypeSetInputTipAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'attributeName' => [static::TYPE => 'string'], |
|
| 29 | 'inputTip' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('setInputTip'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $attributeName |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return static |
|
| 47 | */ |
|
| 48 | public static function ofAttributeName($attributeName, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setAttributeName($attributeName); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method bool getIsSearchable() |
|
| 20 | * @method ProductTypeChangeIsSearchableAction setIsSearchable(bool $isSearchable = null) |
|
| 21 | */ |
|
| 22 | class ProductTypeChangeIsSearchableAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'attributeName' => [static::TYPE => 'string'], |
|
| 29 | 'isSearchable' => [static::TYPE => 'bool'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('changeIsSearchable'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $attributeName |
|
| 45 | * @param bool $isSearchable |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return ProductTypeChangeIsSearchableAction |
|
| 48 | */ |
|
| 49 | public static function ofAttributeNameAndIsSearchable($attributeName, $isSearchable, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setAttributeName($attributeName)->setIsSearchable($isSearchable); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method Enum getValue() |
|
| 20 | * @method TypeAddEnumValueAction setValue(Enum $value = null) |
|
| 21 | */ |
|
| 22 | class TypeAddEnumValueAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'fieldName' => [static::TYPE => 'string'], |
|
| 29 | 'value' => [static::TYPE => '\Commercetools\Core\Model\Common\Enum'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('addEnumValue'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $fieldName |
|
| 45 | * @param Enum $enum |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return TypeAddEnumValueAction |
|
| 48 | */ |
|
| 49 | public static function ofNameAndEnum($fieldName, Enum $enum, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setFieldName($fieldName)->setValue($enum); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method LocalizedEnum getValue() |
|
| 20 | * @method TypeAddLocalizedEnumValueAction setValue(LocalizedEnum $value = null) |
|
| 21 | */ |
|
| 22 | class TypeAddLocalizedEnumValueAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'fieldName' => [static::TYPE => 'string'], |
|
| 29 | 'value' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnum'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('addLocalizedEnumValue'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $fieldName |
|
| 45 | * @param LocalizedEnum $enum |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return TypeAddLocalizedEnumValueAction |
|
| 48 | */ |
|
| 49 | public static function ofNameAndEnum($fieldName, LocalizedEnum $enum, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setFieldName($fieldName)->setValue($enum); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method array getKeys() |
|
| 20 | * @method TypeChangeEnumValueOrderAction setKeys(array $keys = null) |
|
| 21 | */ |
|
| 22 | class TypeChangeEnumValueOrderAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'fieldName' => [static::TYPE => 'string'], |
|
| 29 | 'keys' => [static::TYPE => 'array'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('changeEnumValueOrder'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $fieldName |
|
| 45 | * @param array $keys |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return TypeChangeEnumValueOrderAction |
|
| 48 | */ |
|
| 49 | public static function ofNameAndEnums($fieldName, array $keys, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setFieldName($fieldName)->setKeys($keys); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method LocalizedString getLabel() |
|
| 20 | * @method TypeChangeLabelAction setLabel(LocalizedString $label = null) |
|
| 21 | */ |
|
| 22 | class TypeChangeLabelAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'fieldName' => [static::TYPE => 'string'], |
|
| 29 | 'label' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'] |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('changeLabel'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $fieldname |
|
| 45 | * @param LocalizedString $label |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return TypeChangeLabelAction |
|
| 48 | */ |
|
| 49 | public static function ofNameAndLabel($fieldname, LocalizedString $label, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setFieldName($fieldname)->setLabel($label); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 23-54 (lines=32) @@ | ||
| 20 | * @method array getKeys() |
|
| 21 | * @method TypeChangeLocalizedEnumValueOrderAction setKeys(array $keys = null) |
|
| 22 | */ |
|
| 23 | class TypeChangeLocalizedEnumValueOrderAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'fieldName' => [static::TYPE => 'string'], |
|
| 30 | 'keys' => [static::TYPE => 'array'] |
|
| 31 | ]; |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @param array $data |
|
| 36 | * @param Context|callable $context |
|
| 37 | */ |
|
| 38 | public function __construct(array $data = [], $context = null) |
|
| 39 | { |
|
| 40 | parent::__construct($data, $context); |
|
| 41 | $this->setAction('changeLocalizedEnumValueOrder'); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param string $fieldName |
|
| 46 | * @param array $keys |
|
| 47 | * @param Context|callable $context |
|
| 48 | * @return TypeChangeLocalizedEnumValueOrderAction |
|
| 49 | */ |
|
| 50 | public static function ofNameAndEnums($fieldName, array $keys, $context = null) |
|
| 51 | { |
|
| 52 | return static::of($context)->setFieldName($fieldName)->setKeys($keys); |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 23-54 (lines=32) @@ | ||
| 20 | * @method bool getStaged() |
|
| 21 | * @method ProductSetSkuAction setStaged(bool $staged = null) |
|
| 22 | */ |
|
| 23 | class ProductSetSkuAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'variantId' => [static::TYPE => 'int'], |
|
| 30 | 'sku' => [static::TYPE => 'string'], |
|
| 31 | 'staged' => [static::TYPE => 'bool'] |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $data |
|
| 37 | * @param Context|callable $context |
|
| 38 | */ |
|
| 39 | public function __construct(array $data = [], $context = null) |
|
| 40 | { |
|
| 41 | parent::__construct($data, $context); |
|
| 42 | $this->setAction('setSku'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @param int $variantId |
|
| 47 | * @param Context|callable $context |
|
| 48 | * @return ProductSetSkuAction |
|
| 49 | */ |
|
| 50 | public static function ofVariantId($variantId, $context = null) |
|
| 51 | { |
|
| 52 | return static::of($context)->setVariantId($variantId); |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 22-52 (lines=31) @@ | ||
| 19 | * @method string getSku() |
|
| 20 | * @method ProductSetSkuNotStageableAction setSku(string $sku = null) |
|
| 21 | */ |
|
| 22 | class ProductSetSkuNotStageableAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'variantId' => [static::TYPE => 'int'], |
|
| 29 | 'sku' => [static::TYPE => 'string'], |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('setSKU'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param int $variantId |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return ProductSetSkuNotStageableAction |
|
| 47 | */ |
|
| 48 | public static function ofVariantId($variantId, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setVariantId($variantId); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 23-64 (lines=42) @@ | ||
| 20 | * @method bool getStaged() |
|
| 21 | * @method ProductRemoveVariantAction setStaged(bool $staged = null) |
|
| 22 | */ |
|
| 23 | class ProductRemoveVariantAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'id' => [static::TYPE => 'int'], |
|
| 30 | 'sku' => [static::TYPE => 'string'], |
|
| 31 | 'staged' => [static::TYPE => 'bool'], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $data |
|
| 37 | * @param Context|callable $context |
|
| 38 | */ |
|
| 39 | public function __construct(array $data = [], $context = null) |
|
| 40 | { |
|
| 41 | parent::__construct($data, $context); |
|
| 42 | $this->setAction('removeVariant'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @param int $variantId |
|
| 47 | * @param Context|callable $context |
|
| 48 | * @return ProductRemovePriceAction |
|
| 49 | */ |
|
| 50 | public static function ofVariantId($variantId, $context = null) |
|
| 51 | { |
|
| 52 | return static::of($context)->setId($variantId); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @param string $sku |
|
| 57 | * @param Context|callable $context |
|
| 58 | * @return ProductRemovePriceAction |
|
| 59 | */ |
|
| 60 | public static function ofSku($sku, $context = null) |
|
| 61 | { |
|
| 62 | return static::of($context)->setSku($sku); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 23-62 (lines=40) @@ | ||
| 20 | * @method bool getStaged() |
|
| 21 | * @method ProductChangeMasterVariantAction setStaged(bool $staged = null) |
|
| 22 | */ |
|
| 23 | class ProductChangeMasterVariantAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'variantId' => [static::TYPE => 'int'], |
|
| 30 | 'sku' => [static::TYPE => 'string'], |
|
| 31 | 'staged' => [static::TYPE => 'bool'], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $data |
|
| 37 | * @param Context|callable $context |
|
| 38 | */ |
|
| 39 | public function __construct(array $data = [], $context = null) |
|
| 40 | { |
|
| 41 | parent::__construct($data, $context); |
|
| 42 | $this->setAction('changeMasterVariant'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @param $variantId |
|
| 47 | * @return ProductChangeMasterVariantAction |
|
| 48 | */ |
|
| 49 | public static function ofVariantId($variantId) |
|
| 50 | { |
|
| 51 | return static::of()->setVariantId($variantId); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @param $sku |
|
| 56 | * @return ProductChangeMasterVariantAction |
|
| 57 | */ |
|
| 58 | public static function ofSku($sku) |
|
| 59 | { |
|
| 60 | return static::of()->setSku($sku); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| @@ 22-52 (lines=31) @@ | ||
| 19 | * @method ExternalTaxRateDraft getExternalTaxRate() |
|
| 20 | * @method CartSetCustomLineItemTaxRateAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null) |
|
| 21 | */ |
|
| 22 | class CartSetCustomLineItemTaxRateAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'customLineItemId' => [static::TYPE => 'string'], |
|
| 29 | 'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('setCustomLineItemTaxRate'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param $lineItemId |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return CartSetCustomLineItemTaxRateAction |
|
| 47 | */ |
|
| 48 | public static function ofCustomLineItemId($lineItemId, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setCustomLineItemId($lineItemId); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 22-52 (lines=31) @@ | ||
| 19 | * @method ExternalTaxRateDraft getExternalTaxRate() |
|
| 20 | * @method CartSetLineItemTaxRateAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null) |
|
| 21 | */ |
|
| 22 | class CartSetLineItemTaxRateAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'lineItemId' => [static::TYPE => 'string'], |
|
| 29 | 'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('setLineItemTaxRate'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param $lineItemId |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return CartSetLineItemTaxRateAction |
|
| 47 | */ |
|
| 48 | public static function ofLineItemId($lineItemId, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setLineItemId($lineItemId); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| @@ 23-53 (lines=31) @@ | ||
| 20 | * @method string getLineItemId() |
|
| 21 | * @method CartSetLineItemTotalPriceAction setLineItemId(string $lineItemId = null) |
|
| 22 | */ |
|
| 23 | class CartSetLineItemTotalPriceAction extends AbstractAction |
|
| 24 | { |
|
| 25 | public function fieldDefinitions() |
|
| 26 | { |
|
| 27 | return [ |
|
| 28 | 'action' => [static::TYPE => 'string'], |
|
| 29 | 'lineItemId' => [static::TYPE => 'string'], |
|
| 30 | 'externalTotalPrice' => [static::TYPE => '\Commercetools\Core\Model\Cart\ExternalLineItemTotalPrice'], |
|
| 31 | ]; |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @param array $data |
|
| 36 | * @param Context|callable $context |
|
| 37 | */ |
|
| 38 | public function __construct(array $data = [], $context = null) |
|
| 39 | { |
|
| 40 | parent::__construct($data, $context); |
|
| 41 | $this->setAction('setLineItemTotalPrice'); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param $lineItemId |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return CartSetLineItemTotalPriceAction |
|
| 48 | */ |
|
| 49 | public static function ofLineItemId($lineItemId, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setLineItemId($lineItemId); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 22-53 (lines=32) @@ | ||
| 19 | * @method Money getMoney() |
|
| 20 | * @method CartChangeCustomLineItemMoneyAction setMoney(Money $money = null) |
|
| 21 | */ |
|
| 22 | class CartChangeCustomLineItemMoneyAction extends AbstractAction |
|
| 23 | { |
|
| 24 | public function fieldDefinitions() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'action' => [static::TYPE => 'string'], |
|
| 28 | 'customLineItemId' => [static::TYPE => 'string'], |
|
| 29 | 'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @param array $data |
|
| 35 | * @param Context|callable $context |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = [], $context = null) |
|
| 38 | { |
|
| 39 | parent::__construct($data, $context); |
|
| 40 | $this->setAction('changeCustomLineItemMoney'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param string $customLineItemId |
|
| 45 | * @param Money $money |
|
| 46 | * @param Context|callable $context |
|
| 47 | * @return CartSetLineItemTotalPriceAction |
|
| 48 | */ |
|
| 49 | public static function ofCustomLineItemIdAndMoney($customLineItemId, Money $money, $context = null) |
|
| 50 | { |
|
| 51 | return static::of($context)->setCustomLineItemId($customLineItemId)->setMoney($money); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 21-52 (lines=32) @@ | ||
| 18 | * @method string getCustomLineItemId() |
|
| 19 | * @method CartChangeCustomLineItemQuantityAction setCustomLineItemId(string $customLineItemId = null) |
|
| 20 | */ |
|
| 21 | class CartChangeCustomLineItemQuantityAction extends AbstractAction |
|
| 22 | { |
|
| 23 | public function fieldDefinitions() |
|
| 24 | { |
|
| 25 | return [ |
|
| 26 | 'action' => [static::TYPE => 'string'], |
|
| 27 | 'customLineItemId' => [static::TYPE => 'string'], |
|
| 28 | 'quantity' => [static::TYPE => 'int'], |
|
| 29 | ]; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @param array $data |
|
| 34 | * @param Context|callable $context |
|
| 35 | */ |
|
| 36 | public function __construct(array $data = [], $context = null) |
|
| 37 | { |
|
| 38 | parent::__construct($data, $context); |
|
| 39 | $this->setAction('changeCustomLineItemQuantity'); |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @param string $customLineItemId |
|
| 44 | * @param int $quantity |
|
| 45 | * @param Context|callable $context |
|
| 46 | * @return CartChangeCustomLineItemQuantityAction |
|
| 47 | */ |
|
| 48 | public static function ofCustomLineItemIdAndQuantity($customLineItemId, $quantity, $context = null) |
|
| 49 | { |
|
| 50 | return static::of($context)->setCustomLineItemId($customLineItemId)->setQuantity($quantity); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||