Code Duplication    Length = 20-30 lines in 41 locations

src/Request/CartDiscounts/Command/CartDiscountSetValidFromAction.php 1 location

@@ 20-42 (lines=23) @@
17
 * @method DateTimeDecorator getValidFrom()
18
 * @method CartDiscountSetValidFromAction setValidFrom(\DateTime $validFrom = null)
19
 */
20
class CartDiscountSetValidFromAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'validFrom' => [
27
                static::TYPE => '\DateTime',
28
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
29
            ],
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('setValidFrom');
41
    }
42
}
43

src/Request/CartDiscounts/Command/CartDiscountSetValidUntilAction.php 1 location

@@ 20-42 (lines=23) @@
17
 * @method DateTimeDecorator getValidUntil()
18
 * @method CartDiscountSetValidUntilAction setValidUntil(\DateTime $validUntil = null)
19
 */
20
class CartDiscountSetValidUntilAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'validUntil' => [
27
                static::TYPE => '\DateTime',
28
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
29
            ],
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('setValidUntil');
41
    }
42
}
43

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

@@ 20-42 (lines=23) @@
17
 * @method string getAction()
18
 * @method CustomerSetDateOfBirthAction setAction(string $action = null)
19
 */
20
class CustomerSetDateOfBirthAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'dateOfBirth' => [
27
                static::TYPE => '\DateTime',
28
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateDecorator'
29
            ],
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('setDateOfBirth');
41
    }
42
}
43

src/Request/DiscountCodes/Command/DiscountCodeSetMaxApplicationsPerCustomerAction.php 1 location

@@ 18-46 (lines=29) @@
15
 * @method DiscountCodeSetMaxApplicationsPerCustomerAction setAction(string $action = null)
16
 * @method int getMaxApplicationsPerCustomer()
17
 */
18
class DiscountCodeSetMaxApplicationsPerCustomerAction extends AbstractAction
19
{
20
    public function fieldDefinitions()
21
    {
22
        return [
23
            'action' => [static::TYPE => 'string'],
24
            'maxApplicationsPerCustomer' => [static::TYPE => 'int'],
25
        ];
26
    }
27
28
    /**
29
     * @param array $data
30
     * @param Context|callable $context
31
     */
32
    public function __construct(array $data = [], $context = null)
33
    {
34
        parent::__construct($data, $context);
35
        $this->setAction('setMaxApplicationsPerCustomer');
36
    }
37
38
    /**
39
     * @param int $maxApplicationsPerCustomer
40
     * @return static
41
     */
42
    public function setMaxApplicationsPerCustomer($maxApplicationsPerCustomer = null)
43
    {
44
        return parent::setMaxApplicationsPerCustomer($maxApplicationsPerCustomer);
45
    }
46
}
47

src/Request/Inventory/Command/InventorySetExpectedDeliveryAction.php 1 location

@@ 20-42 (lines=23) @@
17
 * @method DateTimeDecorator getExpectedDelivery()
18
 * @method InventorySetExpectedDeliveryAction setExpectedDelivery(\DateTime $expectedDelivery = null)
19
 */
20
class InventorySetExpectedDeliveryAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'expectedDelivery' => [
27
                static::TYPE => '\DateTime',
28
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
29
            ],
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('setExpectedDelivery');
41
    }
42
}
43

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

@@ 22-42 (lines=21) @@
19
 * @method bool getStaged()
20
 * @method ProductSetTaxCategoryAction setStaged(bool $staged = null)
21
 */
22
class ProductSetTaxCategoryAction extends AbstractAction
23
{
24
    public function fieldDefinitions()
25
    {
26
        return [
27
            'action' => [static::TYPE => 'string'],
28
            'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'],
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('setTaxCategory');
41
    }
42
}
43

src/Request/Reviews/Command/ReviewSetCustomerAction.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method CustomerReference getCustomer()
18
 * @method ReviewSetCustomerAction setCustomer(CustomerReference $customer = null)
19
 */
20
class ReviewSetCustomerAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'customer' => [static::TYPE => '\Commercetools\Core\Model\Customer\CustomerReference'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setCustomer');
38
    }
39
}
40

src/Request/Reviews/Command/ReviewSetKeyAction.php 1 location

@@ 19-38 (lines=20) @@
16
 * @method string getKey()
17
 * @method ReviewSetKeyAction setKey(string $key = null)
18
 */
19
class ReviewSetKeyAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'key' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setKey');
37
    }
38
}
39

src/Request/Reviews/Command/ReviewSetRatingAction.php 1 location

@@ 19-38 (lines=20) @@
16
 * @method int getRating()
17
 * @method ReviewSetRatingAction setRating(int $rating = null)
18
 */
19
class ReviewSetRatingAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'rating' => [static::TYPE => 'int'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setRating');
37
    }
38
}
39

src/Request/Reviews/Command/ReviewSetTargetAction.php 1 location

@@ 21-40 (lines=20) @@
18
 * @method ResourceIdentifier getTarget()
19
 * @method ReviewSetTargetAction setTarget(ResourceIdentifier $target = null)
20
 */
21
class ReviewSetTargetAction extends AbstractAction
22
{
23
    public function fieldDefinitions()
24
    {
25
        return [
26
            'action' => [static::TYPE => 'string'],
27
            'target' => [static::TYPE => '\Commercetools\Core\Model\Common\ResourceIdentifier'],
28
        ];
29
    }
30
31
    /**
32
     * @param array $data
33
     * @param Context|callable $context
34
     */
35
    public function __construct(array $data = [], $context = null)
36
    {
37
        parent::__construct($data, $context);
38
        $this->setAction('setTarget');
39
    }
40
}
41

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

@@ 19-48 (lines=30) @@
16
 * @method string getKey()
17
 * @method ProductTypeSetKeyAction setKey(string $key = null)
18
 */
19
class ProductTypeSetKeyAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'key' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setKey');
37
    }
38
39
    /**
40
     * @param string $key
41
     * @param Context|callable $context
42
     * @return ProductTypeSetKeyAction
43
     */
44
    public static function ofKey($key, $context = null)
45
    {
46
        return static::of($context)->setKey($key);
47
    }
48
}
49

src/Request/States/Command/StateAddRolesAction.php 1 location

@@ 19-48 (lines=30) @@
16
 * @method array getRoles()
17
 * @method StateAddRolesAction setRoles(array $roles = null)
18
 */
19
class StateAddRolesAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'roles' => [static::TYPE => 'array'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('addRoles');
37
    }
38
39
    /**
40
     * @param array $roles
41
     * @param Context|callable $context
42
     * @return StateAddRolesAction
43
     */
44
    public static function ofRoles(array $roles, $context = null)
45
    {
46
        return static::of($context)->setRoles($roles);
47
    }
48
}
49

src/Request/States/Command/StateRemoveRolesAction.php 1 location

@@ 19-48 (lines=30) @@
16
 * @method array getRoles()
17
 * @method StateRemoveRolesAction setRoles(array $roles = null)
18
 */
19
class StateRemoveRolesAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'roles' => [static::TYPE => 'array'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('removeRoles');
37
    }
38
39
    /**
40
     * @param array $roles
41
     * @param Context|callable $context
42
     * @return StateRemoveRolesAction
43
     */
44
    public static function ofRoles(array $roles, $context = null)
45
    {
46
        return static::of($context)->setRoles($roles);
47
    }
48
}
49

src/Request/States/Command/StateSetRolesAction.php 1 location

@@ 19-48 (lines=30) @@
16
 * @method array getRoles()
17
 * @method StateSetRolesAction setRoles(array $roles = null)
18
 */
19
class StateSetRolesAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'roles' => [static::TYPE => 'array'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setRoles');
37
    }
38
39
    /**
40
     * @param array $roles
41
     * @param Context|callable $context
42
     * @return StateSetRolesAction
43
     */
44
    public static function ofRoles(array $roles, $context = null)
45
    {
46
        return static::of($context)->setRoles($roles);
47
    }
48
}
49

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

@@ 19-48 (lines=30) @@
16
 * @method string getTaxRateId()
17
 * @method TaxCategoryRemoveTaxRateAction setTaxRateId(string $taxRateId = null)
18
 */
19
class TaxCategoryRemoveTaxRateAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'taxRateId' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('removeTaxRate');
37
    }
38
39
    /**
40
     * @param string $taxRateId
41
     * @param Context|callable $context
42
     * @return TaxCategoryRemoveTaxRateAction
43
     */
44
    public static function ofTaxRateId($taxRateId, $context = null)
45
    {
46
        return static::of($context)->setTaxRateId($taxRateId);
47
    }
48
}
49

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

@@ 19-38 (lines=20) @@
16
 * @method string getFirstName()
17
 * @method CustomerSetFirstNameAction setFirstName(string $firstName = null)
18
 */
19
class CustomerSetFirstNameAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'firstName' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setFirstName');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getLastName()
17
 * @method CustomerSetLastNameAction setLastName(string $lastName = null)
18
 */
19
class CustomerSetLastNameAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'lastName' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setLastName');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getMiddleName()
17
 * @method CustomerSetMiddleNameAction setMiddleName(string $middleName = null)
18
 */
19
class CustomerSetMiddleNameAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'middleName' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setMiddleName');
37
    }
38
}
39

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

@@ 20-39 (lines=20) @@
17
 * @method Money getAmount()
18
 * @method PaymentChangeAmountPlannedAction setAmount(Money $amount = null)
19
 */
20
class PaymentChangeAmountPlannedAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'amount' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('changeAmountPlanned');
38
    }
39
}
40

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

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

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

@@ 19-38 (lines=20) @@
16
 * @method string getTitle()
17
 * @method CustomerSetTitleAction setTitle(string $title = null)
18
 */
19
class CustomerSetTitleAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'title' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setTitle');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getTaxMode()
17
 * @method CartChangeTaxModeAction setTaxMode(string $taxMode = null)
18
 */
19
class CartChangeTaxModeAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'taxMode' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('changeTaxMode');
37
    }
38
}
39

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

@@ 20-39 (lines=20) @@
17
 * @method ExternalTaxRateDraft getExternalTaxRate()
18
 * @method CartSetShippingMethodTaxRateAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null)
19
 */
20
class CartSetShippingMethodTaxRateAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setShippingMethodTaxRate');
38
    }
39
}
40

src/Request/Channels/Command/ChannelSetAddressAction.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method Address getAddress()
18
 * @method ChannelSetAddressAction setAddress(Address $address = null)
19
 */
20
class ChannelSetAddressAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'address' => [static::TYPE => '\Commercetools\Core\Model\Common\Address'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setAddress');
38
    }
39
}
40

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

@@ 20-39 (lines=20) @@
17
 * @method Address getAddress()
18
 * @method OrderSetBillingAddress setAddress(Address $address = null)
19
 */
20
class OrderSetBillingAddress extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'address' => [static::TYPE => '\Commercetools\Core\Model\Common\Address'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setBillingAddress');
38
    }
39
}
40

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

@@ 19-38 (lines=20) @@
16
 * @method string getEmail()
17
 * @method OrderSetCustomerEmail setEmail(string $email = null)
18
 */
19
class OrderSetCustomerEmail extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'email' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setCustomerEmail');
37
    }
38
}
39

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

@@ 20-39 (lines=20) @@
17
 * @method Address getAddress()
18
 * @method OrderSetShippingAddress setAddress(Address $address = null)
19
 */
20
class OrderSetShippingAddress extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'address' => [static::TYPE => '\Commercetools\Core\Model\Common\Address'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setShippingAddress');
38
    }
39
}
40

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

@@ 19-48 (lines=30) @@
16
 * @method string getKey()
17
 * @method ProductSetKeyAction setKey(string $key = null)
18
 */
19
class ProductSetKeyAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'key' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setKey');
37
    }
38
39
    /**
40
     * @param string $key
41
     * @param Context|callable $context
42
     * @return ProductSetKeyAction
43
     */
44
    public static function ofKey($key, $context = null)
45
    {
46
        return static::of($context)->setKey($key);
47
    }
48
}
49

src/Request/Subscriptions/Command/SubscriptionSetChangesAction.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method ChangeSubscriptionCollection getChanges()
18
 * @method SubscriptionSetChangesAction setChanges(ChangeSubscriptionCollection $changes = null)
19
 */
20
class SubscriptionSetChangesAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'changes' => [static::TYPE => '\Commercetools\Core\Model\Subscription\ChangeSubscriptionCollection'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setChanges');
38
    }
39
}
40

src/Request/Subscriptions/Command/SubscriptionSetKeyAction.php 1 location

@@ 19-38 (lines=20) @@
16
 * @method string getKey()
17
 * @method SubscriptionSetKeyAction setKey(string $key = null)
18
 */
19
class SubscriptionSetKeyAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'key' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('setKey');
37
    }
38
}
39

src/Request/Subscriptions/Command/SubscriptionSetMessagesAction.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method MessageSubscriptionCollection getMessages()
18
 * @method SubscriptionSetMessagesAction setMessages(MessageSubscriptionCollection $messages = null)
19
 */
20
class SubscriptionSetMessagesAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'messages' => [static::TYPE => '\Commercetools\Core\Model\Subscription\MessageSubscriptionCollection'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setMessages');
38
    }
39
}
40

src/Request/Channels/Command/ChannelSetGeoLocation.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method GeoLocation getGeoLocation()
18
 * @method ChannelSetGeoLocation setGeoLocation(GeoLocation $geoLocation = null)
19
 */
20
class ChannelSetGeoLocation extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'geoLocation' => [static::TYPE => '\Commercetools\Core\Model\Common\GeoLocation'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('setGeoLocation');
38
    }
39
}
40

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

@@ 19-38 (lines=20) @@
16
 * @method string getAction()
17
 * @method CustomerAddBillingAddressAction setAction(string $action = null)
18
 */
19
class CustomerAddBillingAddressAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'addressId' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('addBillingAddressId');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getAction()
17
 * @method CustomerAddShippingAddressAction setAction(string $action = null)
18
 */
19
class CustomerAddShippingAddressAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'addressId' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('addShippingAddressId');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getAction()
17
 * @method CustomerRemoveBillingAddressAction setAction(string $action = null)
18
 */
19
class CustomerRemoveBillingAddressAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'addressId' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('removeBillingAddressId');
37
    }
38
}
39

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

@@ 19-38 (lines=20) @@
16
 * @method string getAction()
17
 * @method CustomerRemoveShippingAddressAction setAction(string $action = null)
18
 */
19
class CustomerRemoveShippingAddressAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'addressId' => [static::TYPE => 'string']
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('removeShippingAddressId');
37
    }
38
}
39

src/Request/Categories/Command/CategoryAddAssetAction.php 1 location

@@ 20-49 (lines=30) @@
17
 * @method AssetDraft getAsset()
18
 * @method CategoryAddAssetAction setAsset(AssetDraft $asset = null)
19
 */
20
class CategoryAddAssetAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'asset' => [static::TYPE => '\Commercetools\Core\Model\Common\AssetDraft'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('addAsset');
38
    }
39
40
    /**
41
     * @param AssetDraft $asset
42
     * @param Context|callable $context
43
     * @return CategoryAddAssetAction
44
     */
45
    public static function ofAsset(AssetDraft $asset, $context = null)
46
    {
47
        return static::of($context)->setAsset($asset);
48
    }
49
}
50

src/Request/Categories/Command/CategoryChangeAssetOrderAction.php 1 location

@@ 20-39 (lines=20) @@
17
 * @method array getAssetOrder()
18
 * @method CategoryChangeAssetOrderAction setAssetOrder(array $assetOrder = null)
19
 */
20
class CategoryChangeAssetOrderAction extends AbstractAction
21
{
22
    public function fieldDefinitions()
23
    {
24
        return [
25
            'action' => [static::TYPE => 'string'],
26
            'assetOrder' => [static::TYPE => 'array'],
27
        ];
28
    }
29
30
    /**
31
     * @param array $data
32
     * @param Context|callable $context
33
     */
34
    public function __construct(array $data = [], $context = null)
35
    {
36
        parent::__construct($data, $context);
37
        $this->setAction('changeAssetOrder');
38
    }
39
}
40

src/Request/Categories/Command/CategoryRemoveAssetAction.php 1 location

@@ 19-48 (lines=30) @@
16
 * @method string getAssetId()
17
 * @method CategoryRemoveAssetAction setAssetId(string $assetId = null)
18
 */
19
class CategoryRemoveAssetAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'assetId' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('removeAsset');
37
    }
38
39
    /**
40
     * @param string $assetId
41
     * @param Context|callable $context
42
     * @return CategoryRemoveAssetAction
43
     */
44
    public static function ofAssetId($assetId, $context = null)
45
    {
46
        return static::of($context)->setAssetId($assetId);
47
    }
48
}
49

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

@@ 19-48 (lines=30) @@
16
 * @method string getTaxRoundingMode()
17
 * @method CartChangeTaxRoundingModeAction setTaxRoundingMode(string $taxRoundingMode = null)
18
 */
19
class CartChangeTaxRoundingModeAction extends AbstractAction
20
{
21
    public function fieldDefinitions()
22
    {
23
        return [
24
            'action' => [static::TYPE => 'string'],
25
            'taxRoundingMode' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33
    public function __construct(array $data = [], $context = null)
34
    {
35
        parent::__construct($data, $context);
36
        $this->setAction('changeTaxRoundingMode');
37
    }
38
39
    /**
40
     * @param string $roundingMode
41
     * @param Context|callable $context
42
     * @return CartChangeLineItemQuantityAction
43
     */
44
    public static function ofTaxRoundingMode($roundingMode, $context = null)
45
    {
46
        return static::of($context)->setTaxRoundingMode($roundingMode);
47
    }
48
}
49

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

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