1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
<?php
/**
*
*/
namespace Commercetools\Core\Request\OrderEdits\StagedOrder\Command;
use Commercetools\Core\Model\Common\Address;
use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Model\ShippingMethod\ShippingRateDraft;
use Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft;
use Commercetools\Core\Model\TaxCategory\TaxCategoryReference;
use Commercetools\Core\Request\AbstractAction;
/**
* @package Commercetools\Core\Request\OrderEdits\StagedOrder\Command
*
* @method string getAction()
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setAction(string $action = null)
* @method Address getAddress()
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setAddress(Address $address = null)
* @method string getShippingMethodName()
* phpcs:disable
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setShippingMethodName(string $shippingMethodName = null)
* phpcs:enable
* @method ShippingRateDraft getShippingRate()
* phpcs:disable
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setShippingRate(ShippingRateDraft $shippingRate = null)
* phpcs:enable
* @method TaxCategoryReference getTaxCategory()
* phpcs:disable
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setTaxCategory(TaxCategoryReference $taxCategory = null)
* phpcs:enable
* @method ExternalTaxRateDraft getExternalTaxRate()
* phpcs:disable
* @method StagedOrderSetShippingAddressAndCustomShippingMethodAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null)
* phpcs:enable
*/
// phpcs:ignore
class StagedOrderSetShippingAddressAndCustomShippingMethodAction extends AbstractAction implements StagedOrderUpdateAction
{
public function fieldDefinitions()
{
return [
'action' => [static::TYPE => 'string'],
'address' => [static::TYPE => Address::class],
'shippingMethodName' => [static::TYPE => 'string'],
'shippingRate' => [static::TYPE => ShippingRateDraft::class],
'taxCategory' => [static::TYPE => TaxCategoryReference::class],
'externalTaxRate' => [static::TYPE => ExternalTaxRateDraft::class]
];
}
/**
* @param array $data
* @param Context|callable $context
*/
public function __construct(array $data = [], $context = null)
{
parent::__construct($data, $context);
$this->setAction('setShippingAddressAndCustomShippingMethod');
}
}