Code Duplication    Length = 20-32 lines in 24 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/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/Carts/Command/CartSetLocaleAction.php 1 location

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

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

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

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

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

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