This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Inventory): add SetSupplyChannel action
- Loading branch information
Jens Schulze
committed
Dec 30, 2015
1 parent
12c9bff
commit d453e5e
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/Request/Inventory/Command/InventorySetSupplyChannelAction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @author @jayS-de <jens.schulze@commercetools.de> | ||
*/ | ||
|
||
|
||
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'); | ||
} | ||
} |