From d453e5edfddadf21c26beca14462420804f0524b Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Wed, 30 Dec 2015 12:32:30 +0100 Subject: [PATCH] feat(Inventory): add SetSupplyChannel action --- .../InventorySetSupplyChannelAction.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/Request/Inventory/Command/InventorySetSupplyChannelAction.php diff --git a/src/Request/Inventory/Command/InventorySetSupplyChannelAction.php b/src/Request/Inventory/Command/InventorySetSupplyChannelAction.php new file mode 100644 index 0000000000..84a28c170c --- /dev/null +++ b/src/Request/Inventory/Command/InventorySetSupplyChannelAction.php @@ -0,0 +1,40 @@ + + */ + + +namespace Commercetools\Core\Request\Inventory\Command; + +use Commercetools\Core\Model\Common\Context; +use Commercetools\Core\Request\AbstractAction; +use Commercetools\Core\Model\Channel\Channel; + +/** + * @package Commercetools\Core\Request\Inventory\Command + * + * @method string getAction() + * @method InventorySetSupplyChannelAction setAction(string $action = null) + * @method Channel getSupplyChannel() + * @method InventorySetSupplyChannelAction setSupplyChannel(Channel $supplyChannel = null) + */ +class InventorySetSupplyChannelAction extends AbstractAction +{ + public function fieldDefinitions() + { + return [ + 'action' => [static::TYPE => 'string'], + 'supplyChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\Channel'], + ]; + } + + /** + * @param array $data + * @param Context|callable $context + */ + public function __construct(array $data = [], $context = null) + { + parent::__construct($data, $context); + $this->setAction('setSupplyChannel'); + } +}