for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*/
namespace Commercetools\Core\Request\ProductDiscounts\Command;
use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Request\AbstractAction;
* @package Commercetools\Core\Request\ProductDiscounts\Command
*
* @method string getAction()
* @method ProductDiscountSetKeyAction setAction(string $action = null)
* @method string getKey()
* @method ProductDiscountSetKeyAction setKey(string $key = null)
class ProductDiscountSetKeyAction extends AbstractAction
{
public function fieldDefinitions()
return [
'action' => [static::TYPE => 'string'],
'key' => [static::TYPE => 'string'],
];
}
* @param array $data
* @param Context|callable $context
public function __construct(array $data = [], $context = null)
parent::__construct($data, $context);
$this->setAction('setKey');
* @param string $key
* @return ProductDiscountSetKeyAction
public static function ofKey($key, $context = null)
return static::of($context)->setKey($key);