Code Duplication    Length = 31-35 lines in 33 locations

src/Request/Carts/Command/CartChangeLineItemQuantityAction.php 1 location

@@ 21-52 (lines=32) @@
18
 * @method int getQuantity()
19
 * @method CartChangeLineItemQuantityAction setQuantity(int $quantity = null)
20
 */
21
class CartChangeLineItemQuantityAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'lineItemId' => [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('changeLineItemQuantity');
40
    }
41
42
    /**
43
     * @param string $lineItemId
44
     * @param int $quantity
45
     * @param Context|callable $context
46
     * @return CartChangeLineItemQuantityAction
47
     */
48
    public static function ofLineItemIdAndQuantity($lineItemId, $quantity, $context = null)
49
    {
50
        return static::of($context)->setLineItemId($lineItemId)->setQuantity($quantity);
51
    }
52
}
53

src/Request/Carts/Command/CartRemoveLineItemAction.php 1 location

@@ 21-51 (lines=31) @@
18
 * @method int getQuantity()
19
 * @method CartRemoveLineItemAction setQuantity(int $quantity = null)
20
 */
21
class CartRemoveLineItemAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'lineItemId' => [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('removeLineItem');
40
    }
41
42
    /**
43
     * @param $lineItemId
44
     * @param Context|callable $context
45
     * @return CartRemoveLineItemAction
46
     */
47
    public static function ofLineItemId($lineItemId, $context = null)
48
    {
49
        return static::of($context)->setLineItemId($lineItemId);
50
    }
51
}
52

src/Request/Customers/Command/CustomerChangeAddressAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method string getAction()
20
 * @method CustomerChangeAddressAction setAction(string $action = null)
21
 */
22
class CustomerChangeAddressAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'addressId' => [static::TYPE => 'string'],
29
            'address' => [static::TYPE => '\Commercetools\Core\Model\Common\Address'],
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('changeAddress');
41
    }
42
43
    /**
44
     * @param string $addressId
45
     * @param Address $address
46
     * @param Context|callable $context
47
     * @return CustomerChangeAddressAction
48
     */
49
    public static function ofAddressIdAndAddress($addressId, Address $address, $context = null)
50
    {
51
        return static::of($context)->setAddressId($addressId)->setAddress($address);
52
    }
53
}
54

src/Request/CustomField/Command/SetCustomFieldAction.php 1 location

@@ 21-51 (lines=31) @@
18
 * @method getValue()
19
 * @method SetCustomFieldAction setValue($value = null)
20
 */
21
class SetCustomFieldAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'name' => [static::TYPE => 'string'],
28
            'value' => [static::TYPE => null],
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('setCustomField');
40
    }
41
42
    /**
43
     * @param $name
44
     * @param Context|callable $context
45
     * @return SetCustomFieldAction
46
     */
47
    public static function ofName($name, $context = null)
48
    {
49
        return static::of($context)->setName($name);
50
    }
51
}
52

src/Request/Orders/Command/OrderImportCustomLineItemStateAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method ItemStateCollection getState()
20
 * @method OrderImportCustomLineItemStateAction setState(ItemStateCollection $state = null)
21
 */
22
class OrderImportCustomLineItemStateAction extends AbstractAction
23
{
24
    /**
25
     * @param array $data
26
     * @param Context|callable $context
27
     */
28
    public function __construct(array $data = [], $context = null)
29
    {
30
        parent::__construct($data, $context);
31
        $this->setAction('importCustomLineItemState');
32
    }
33
34
    public function fieldDefinitions()
35
    {
36
        return [
37
            'action' => [static::TYPE => 'string'],
38
            'customLineItemId' => [static::TYPE => 'string'],
39
            'state' => [static::TYPE => '\Commercetools\Core\Model\Order\ItemStateCollection']
40
        ];
41
    }
42
43
    /**
44
     * @param string $customLineItemId
45
     * @param ItemStateCollection $state
46
     * @param Context|callable $context
47
     * @return OrderImportCustomLineItemStateAction
48
     */
49
    public static function ofCustomLineItemIdAndState($customLineItemId, ItemStateCollection $state, $context = null)
50
    {
51
        return static::of($context)->setCustomLineItemId($customLineItemId)->setState($state);
52
    }
53
}
54

src/Request/Orders/Command/OrderImportLineItemStateAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method ItemStateCollection getState()
20
 * @method OrderImportLineItemStateAction setState(ItemStateCollection $state = null)
21
 */
22
class OrderImportLineItemStateAction extends AbstractAction
23
{
24
    /**
25
     * @param array $data
26
     * @param Context|callable $context
27
     */
28
    public function __construct(array $data = [], $context = null)
29
    {
30
        parent::__construct($data, $context);
31
        $this->setAction('importLineItemState');
32
    }
33
34
    public function fieldDefinitions()
35
    {
36
        return [
37
            'action' => [static::TYPE => 'string'],
38
            'lineItemId' => [static::TYPE => 'string'],
39
            'state' => [static::TYPE => '\Commercetools\Core\Model\Order\ItemStateCollection']
40
        ];
41
    }
42
43
    /**
44
     * @param string $lineItemId
45
     * @param ItemStateCollection $state
46
     * @param Context|callable $context
47
     * @return OrderImportCustomLineItemStateAction
48
     */
49
    public static function ofLineItemIdAndState($lineItemId, ItemStateCollection $state, $context = null)
50
    {
51
        return static::of($context)->setLineItemId($lineItemId)->setState($state);
52
    }
53
}
54

src/Request/Orders/Command/OrderSetReturnPaymentStateAction.php 1 location

@@ 21-52 (lines=32) @@
18
 * @method string getPaymentState()
19
 * @method OrderSetReturnPaymentStateAction setPaymentState(string $paymentState = null)
20
 */
21
class OrderSetReturnPaymentStateAction extends AbstractAction
22
{
23
    /**
24
     * @param array $data
25
     * @param Context|callable $context
26
     */
27
    public function __construct(array $data = [], $context = null)
28
    {
29
        parent::__construct($data, $context);
30
        $this->setAction('setReturnPaymentState');
31
    }
32
33
    public function fieldDefinitions()
34
    {
35
        return [
36
            'action' => [static::TYPE => 'string'],
37
            'returnItemId' => [static::TYPE => 'string'],
38
            'paymentState' => [static::TYPE => 'string']
39
        ];
40
    }
41
42
    /**
43
     * @param string $returnItemId
44
     * @param string $paymentState
45
     * @param Context|callable $context
46
     * @return OrderSetReturnPaymentStateAction
47
     */
48
    public static function ofReturnItemIdAndPaymentState($returnItemId, $paymentState, $context = null)
49
    {
50
        return static::of($context)->setReturnItemId($returnItemId)->setPaymentState($paymentState);
51
    }
52
}
53

src/Request/Orders/Command/OrderSetReturnShipmentStateAction.php 1 location

@@ 21-52 (lines=32) @@
18
 * @method string getShipmentState()
19
 * @method OrderSetReturnShipmentStateAction setShipmentState(string $shipmentState = null)
20
 */
21
class OrderSetReturnShipmentStateAction extends AbstractAction
22
{
23
    /**
24
     * @param array $data
25
     * @param Context|callable $context
26
     */
27
    public function __construct(array $data = [], $context = null)
28
    {
29
        parent::__construct($data, $context);
30
        $this->setAction('setReturnShipmentState');
31
    }
32
33
    public function fieldDefinitions()
34
    {
35
        return [
36
            'action' => [static::TYPE => 'string'],
37
            'returnItemId' => [static::TYPE => 'string'],
38
            'shipmentState' => [static::TYPE => 'string']
39
        ];
40
    }
41
42
    /**
43
     * @param $returnItemId
44
     * @param $shipmentState
45
     * @param Context|callable $context
46
     * @return OrderSetReturnShipmentStateAction
47
     */
48
    public static function ofReturnItemIdAndShipmentState($returnItemId, $shipmentState, $context = null)
49
    {
50
        return static::of($context)->setReturnItemId($returnItemId)->setShipmentState($shipmentState);
51
    }
52
}
53

src/Request/Products/Command/ProductAddToCategoryAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductAddToCategoryAction setStaged(bool $staged = null)
21
 */
22
class ProductAddToCategoryAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'category' => [static::TYPE => '\Commercetools\Core\Model\Category\CategoryReference'],
29
            'staged' => [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('addToCategory');
41
    }
42
43
    /**
44
     * @param CategoryReference $categoryReference
45
     * @param Context|callable $context
46
     * @return ProductAddToCategoryAction
47
     */
48
    public static function ofCategory(CategoryReference $categoryReference, $context = null)
49
    {
50
        return static::of($context)->setCategory($categoryReference);
51
    }
52
}
53

src/Request/Products/Command/ProductChangeNameAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductChangeNameAction setStaged(bool $staged = null)
21
 */
22
class ProductChangeNameAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
29
            'staged' => [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('changeName');
41
    }
42
43
    /**
44
     * @param LocalizedString $name
45
     * @param Context|callable $context
46
     * @return ProductChangeNameAction
47
     */
48
    public static function ofName(LocalizedString $name, $context = null)
49
    {
50
        return static::of($context)->setName($name);
51
    }
52
}
53

src/Request/Products/Command/ProductChangeSlugAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductChangeSlugAction setStaged(bool $staged = null)
21
 */
22
class ProductChangeSlugAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'slug' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
29
            'staged' => [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('changeSlug');
41
    }
42
43
    /**
44
     * @param LocalizedString $slug
45
     * @param Context|callable $context
46
     * @return ProductChangeSlugAction
47
     */
48
    public static function ofSlug(LocalizedString $slug, $context = null)
49
    {
50
        return static::of($context)->setSlug($slug);
51
    }
52
}
53

src/Request/Products/Command/ProductRemoveFromCategoryAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductRemoveFromCategoryAction setStaged(bool $staged = null)
21
 */
22
class ProductRemoveFromCategoryAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'category' => [static::TYPE => '\Commercetools\Core\Model\Category\CategoryReference'],
29
            'staged' => [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('removeFromCategory');
41
    }
42
43
    /**
44
     * @param CategoryReference $categoryReference
45
     * @param Context|callable $context
46
     * @return ProductRemoveFromCategoryAction
47
     */
48
    public static function ofCategory(CategoryReference $categoryReference, $context = null)
49
    {
50
        return static::of($context)->setCategory($categoryReference);
51
    }
52
}
53

src/Request/Products/Command/ProductRemovePriceAction.php 1 location

@@ 24-54 (lines=31) @@
21
 * @method string getPriceId()
22
 * @method ProductRemovePriceAction setPriceId(string $priceId = null)
23
 */
24
class ProductRemovePriceAction extends AbstractAction
25
{
26
    public function fieldDefinitions()
27
    {
28
        return [
29
            'action' => [static::TYPE => 'string'],
30
            'priceId' => [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('removePrice');
43
    }
44
45
    /**
46
     * @param string $priceId
47
     * @param Context|callable $context
48
     * @return ProductRemovePriceAction
49
     */
50
    public static function ofPriceId($priceId, $context = null)
51
    {
52
        return static::of($context)->setPriceId($priceId);
53
    }
54
}
55

src/Request/Products/Command/ProductRemoveVariantAction.php 1 location

@@ 21-51 (lines=31) @@
18
 * @method bool getStaged()
19
 * @method ProductRemoveVariantAction setStaged(bool $staged = null)
20
 */
21
class ProductRemoveVariantAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'id' => [static::TYPE => 'int'],
28
            'staged' => [static::TYPE => 'bool'],
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('removeVariant');
40
    }
41
42
    /**
43
     * @param int $variantId
44
     * @param Context|callable $context
45
     * @return ProductRemovePriceAction
46
     */
47
    public static function ofVariantId($variantId, $context = null)
48
    {
49
        return static::of($context)->setId($variantId);
50
    }
51
}
52

src/Request/Products/Command/ProductSetDescriptionAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductSetDescriptionAction setStaged(bool $staged = null)
21
 */
22
class ProductSetDescriptionAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
29
            'staged' => [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('setDescription');
41
    }
42
43
    /**
44
     * @param LocalizedString $description
45
     * @param Context|callable $context
46
     * @return ProductSetDescriptionAction
47
     */
48
    public static function ofDescription(LocalizedString $description, $context = null)
49
    {
50
        return static::of($context)->setDescription($description);
51
    }
52
}
53

src/Request/Products/Command/ProductSetSearchKeywordsAction.php 1 location

@@ 22-52 (lines=31) @@
19
 * @method bool getStaged()
20
 * @method ProductSetSearchKeywordsAction setStaged(bool $staged = null)
21
 */
22
class ProductSetSearchKeywordsAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'searchKeywords' => [static::TYPE => '\Commercetools\Core\Model\Product\LocalizedSearchKeywords'],
29
            'staged' => [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('setSearchKeywords');
41
    }
42
43
    /**
44
     * @param LocalizedSearchKeywords $keywords
45
     * @param Context|callable $context
46
     * @return ProductSetSearchKeywordsAction
47
     */
48
    public static function ofKeywords(LocalizedSearchKeywords $keywords, $context = null)
49
    {
50
        return static::of($context)->setSearchKeywords($keywords);
51
    }
52
}
53

src/Request/Products/Command/ProductSetSKUAction.php 1 location

@@ 21-51 (lines=31) @@
18
 * @method string getSku()
19
 * @method ProductSetSKUAction setSku(string $sku = null)
20
 */
21
class ProductSetSKUAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'variantId' => [static::TYPE => 'int'],
28
            'sku' => [static::TYPE => 'string'],
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('setSKU');
40
    }
41
42
    /**
43
     * @param int $variantId
44
     * @param Context|callable $context
45
     * @return ProductSetSKUAction
46
     */
47
    public static function ofVariantId($variantId, $context = null)
48
    {
49
        return static::of($context)->setVariantId($variantId);
50
    }
51
}
52

src/Request/ProductTypes/Command/ProductTypeAddLocalizedEnumValueAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method LocalizedEnum getValue()
20
 * @method ProductTypeAddLocalizedEnumValueAction setValue(LocalizedEnum $value = null)
21
 */
22
class ProductTypeAddLocalizedEnumValueAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'attributeName' => [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 $attributeName
45
     * @param LocalizedEnum $value
46
     * @param Context|callable $context
47
     * @return ProductTypeAddLocalizedEnumValueAction
48
     */
49
    public static function ofAttributeNameAndValue($attributeName, LocalizedEnum $value, $context = null)
50
    {
51
        return static::of($context)->setAttributeName($attributeName)->setValue($value);
52
    }
53
}
54

src/Request/ProductTypes/Command/ProductTypeAddPlainEnumValueAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method Enum getValue()
20
 * @method ProductTypeAddPlainEnumValueAction setValue(Enum $value = null)
21
 */
22
class ProductTypeAddPlainEnumValueAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'attributeName' => [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('addPlainEnumValue');
41
    }
42
43
    /**
44
     * @param string $attributeName
45
     * @param Enum $value
46
     * @param Context|callable $context
47
     * @return ProductTypeAddPlainEnumValueAction
48
     */
49
    public static function ofAttributeNameAndValue($attributeName, Enum $value, $context = null)
50
    {
51
        return static::of($context)->setAttributeName($attributeName)->setValue($value);
52
    }
53
}
54

src/Request/ProductTypes/Command/ProductTypeChangeLabelAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method LocalizedString getLabel()
20
 * @method ProductTypeChangeLabelAction setLabel(LocalizedString $label = null)
21
 */
22
class ProductTypeChangeLabelAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'attributeName' => [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 $attributeName
45
     * @param LocalizedString $label
46
     * @param Context|callable $context
47
     * @return ProductTypeChangeLabelAction
48
     */
49
    public static function ofAttributeNameAndLabel($attributeName, LocalizedString $label, $context = null)
50
    {
51
        return static::of($context)->setAttributeName($attributeName)->setLabel($label);
52
    }
53
}
54

src/Request/ProductTypes/Command/ProductTypeChangeLocalizedEnumValueOrderAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method LocalizedEnumCollection getValues()
20
 * @method ProductTypeChangeLocalizedEnumValueOrderAction setValues(LocalizedEnumCollection $values = null)
21
 */
22
class ProductTypeChangeLocalizedEnumValueOrderAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'attributeName' => [static::TYPE => 'string'],
29
            'values' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnumCollection']
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('changeLocalizedEnumValueOrder');
41
    }
42
43
    /**
44
     * @param string $attributeName
45
     * @param LocalizedEnumCollection $values
46
     * @param Context|callable $context
47
     * @return ProductTypeChangeLocalizedEnumValueOrderAction
48
     */
49
    public static function ofAttributeNameAndValues($attributeName, LocalizedEnumCollection $values, $context = null)
50
    {
51
        return static::of($context)->setAttributeName($attributeName)->setValues($values);
52
    }
53
}
54

src/Request/ProductTypes/Command/ProductTypeChangePlainEnumValueOrderAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method EnumCollection getValues()
20
 * @method ProductTypeChangePlainEnumValueOrderAction setValues(EnumCollection $values = null)
21
 */
22
class ProductTypeChangePlainEnumValueOrderAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'attributeName' => [static::TYPE => 'string'],
29
            'values' => [static::TYPE => '\Commercetools\Core\Model\Common\EnumCollection']
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('changePlainEnumValueOrder');
41
    }
42
43
    /**
44
     * @param string $attributeName
45
     * @param EnumCollection $values
46
     * @param Context|callable $context
47
     * @return ProductTypeAddPlainEnumValueAction
48
     */
49
    public static function ofAttributeNameAndValues($attributeName, EnumCollection $values, $context = null)
50
    {
51
        return static::of($context)->setAttributeName($attributeName)->setValues($values);
52
    }
53
}
54

src/Request/ShippingMethods/Command/ShippingMethodAddShippingRateAction.php 1 location

@@ 23-54 (lines=32) @@
20
 * @method ShippingRate getShippingRate()
21
 * @method ShippingMethodAddShippingRateAction setShippingRate(ShippingRate $shippingRate = null)
22
 */
23
class ShippingMethodAddShippingRateAction extends AbstractAction
24
{
25
    public function fieldDefinitions()
26
    {
27
        return [
28
            'action' => [static::TYPE => 'string'],
29
            'zone' => [static::TYPE => '\Commercetools\Core\Model\Zone\ZoneReference'],
30
            'shippingRate' => [static::TYPE => '\Commercetools\Core\Model\ShippingMethod\ShippingRate'],
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('addShippingRate');
42
    }
43
44
    /**
45
     * @param ZoneReference $zone
46
     * @param ShippingRate $shippingRate
47
     * @param Context|callable $context
48
     * @return ShippingMethodAddShippingRateAction
49
     */
50
    public static function ofZoneAndShippingRate(ZoneReference $zone, ShippingRate $shippingRate, $context = null)
51
    {
52
        return static::of($context)->setZone($zone)->setShippingRate($shippingRate);
53
    }
54
}
55

src/Request/ShippingMethods/Command/ShippingMethodRemoveShippingRateAction.php 1 location

@@ 23-54 (lines=32) @@
20
 * @method ShippingRate getShippingRate()
21
 * @method ShippingMethodRemoveShippingRateAction setShippingRate(ShippingRate $shippingRate = null)
22
 */
23
class ShippingMethodRemoveShippingRateAction extends AbstractAction
24
{
25
    public function fieldDefinitions()
26
    {
27
        return [
28
            'action' => [static::TYPE => 'string'],
29
            'zone' => [static::TYPE => '\Commercetools\Core\Model\Zone\ZoneReference'],
30
            'shippingRate' => [static::TYPE => '\Commercetools\Core\Model\ShippingMethod\ShippingRate'],
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('removeShippingRate');
42
    }
43
44
    /**
45
     * @param ZoneReference $zone
46
     * @param ShippingRate $shippingRate
47
     * @param Context|callable $context
48
     * @return ShippingMethodRemoveShippingRateAction
49
     */
50
    public static function ofZoneAndShippingRate(ZoneReference $zone, ShippingRate $shippingRate, $context = null)
51
    {
52
        return static::of($context)->setZone($zone)->setShippingRate($shippingRate);
53
    }
54
}
55

src/Request/TaxCategories/Command/TaxCategoryReplaceTaxRateAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method TaxRate getTaxRate()
20
 * @method TaxCategoryReplaceTaxRateAction setTaxRate(TaxRate $taxRate = null)
21
 */
22
class TaxCategoryReplaceTaxRateAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'taxRateId' => [static::TYPE => 'string'],
29
            'taxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxRate'],
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('replaceTaxRate');
41
    }
42
43
    /**
44
     * @param string $taxRateId
45
     * @param TaxRate $taxRate
46
     * @param Context|callable $context
47
     * @return TaxCategoryReplaceTaxRateAction
48
     */
49
    public static function ofTaxRateIdAndTaxRate($taxRateId, TaxRate $taxRate, $context = null)
50
    {
51
        return static::of($context)->setTaxRateId($taxRateId)->setTaxRate($taxRate);
52
    }
53
}
54

src/Request/Types/Command/TypeAddEnumValueAction.php 1 location

@@ 22-52 (lines=31) @@
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 Enum $enum
45
     * @param Context|callable $context
46
     * @return TypeAddEnumValueAction
47
     */
48
    public static function ofEnum(Enum $enum, $context = null)
49
    {
50
        return static::of($context)->setValue($enum);
51
    }
52
}
53

src/Request/Types/Command/TypeAddLocalizedEnumValueAction.php 1 location

@@ 22-52 (lines=31) @@
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 LocalizedEnum $enum
45
     * @param Context|callable $context
46
     * @return TypeAddLocalizedEnumValueAction
47
     */
48
    public static function ofEnum(LocalizedEnum $enum, $context = null)
49
    {
50
        return static::of($context)->setValue($enum);
51
    }
52
}
53

src/Request/Types/Command/TypeChangeEnumValueOrderAction.php 1 location

@@ 22-52 (lines=31) @@
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 array $keys
45
     * @param Context|callable $context
46
     * @return TypeChangeEnumValueOrderAction
47
     */
48
    public static function ofEnums(array $keys, $context = null)
49
    {
50
        return static::of($context)->setKeys($keys);
51
    }
52
}
53

src/Request/Types/Command/TypeChangeLabelAction.php 1 location

@@ 22-52 (lines=31) @@
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 LocalizedString $label
45
     * @param Context|callable $context
46
     * @return TypeChangeLabelAction
47
     */
48
    public static function ofLabel(LocalizedString $label, $context = null)
49
    {
50
        return static::of($context)->setLabel($label);
51
    }
52
}
53

src/Request/Types/Command/TypeChangeLocalizedEnumValueOrderAction.php 1 location

@@ 23-53 (lines=31) @@
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 array $keys
46
     * @param Context|callable $context
47
     * @return TypeChangeLocalizedEnumValueOrderAction
48
     */
49
    public static function ofEnums(array $keys, $context = null)
50
    {
51
        return static::of($context)->setKeys($keys);
52
    }
53
}
54

src/Request/Payments/Command/PaymentChangeTransactionInteractionIdAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method string getInteractionId()
20
 * @method PaymentChangeTransactionInteractionIdAction setInteractionId(string $interactionId = null)
21
 */
22
class PaymentChangeTransactionInteractionIdAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'transactionId' => [static::TYPE => 'string'],
29
            'interactionId' => [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('changeTransactionInteractionId');
41
    }
42
43
    /**
44
     * @param string $transactionId
45
     * @param string $interactionId
46
     * @param Context|callable $context
47
     * @return PaymentAddTransactionAction
48
     */
49
    public static function ofTransactionIdAndState($transactionId, $interactionId, $context = null)
50
    {
51
        return static::of($context)->setTransactionId($transactionId)->setInteractionId($interactionId);
52
    }
53
}
54

src/Request/Payments/Command/PaymentChangeTransactionStateAction.php 1 location

@@ 22-53 (lines=32) @@
19
 * @method string getState()
20
 * @method PaymentChangeTransactionStateAction setState(string $state = null)
21
 */
22
class PaymentChangeTransactionStateAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'transactionId' => [static::TYPE => 'string'],
29
            'state' => [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('changeTransactionState');
41
    }
42
43
    /**
44
     * @param string $transactionId
45
     * @param string $state
46
     * @param Context|callable $context
47
     * @return PaymentAddTransactionAction
48
     */
49
    public static function ofTransactionIdAndState($transactionId, $state, $context = null)
50
    {
51
        return static::of($context)->setTransactionId($transactionId)->setState($state);
52
    }
53
}
54

src/Request/Payments/Command/PaymentChangeTransactionTimestampAction.php 1 location

@@ 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