src/Request/Me/MeCartByIdRequest.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* @method Cart mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Cart mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class MeCartByIdRequest extends AbstractByIdGetRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Cart\Cart'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(MeCartsEndpoint::endpoint(), $id, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $id |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofId($id, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($id, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Me/MeCartCreateRequest.php 1 location
|
@@ 22-44 (lines=23) @@
|
19 |
|
* @method Cart mapResponse(ApiResponseInterface $response) |
20 |
|
* @method Cart mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
21 |
|
*/ |
22 |
|
class MeCartCreateRequest extends AbstractCreateRequest |
23 |
|
{ |
24 |
|
protected $resultClass = '\Commercetools\Core\Model\Cart\Cart'; |
25 |
|
|
26 |
|
/** |
27 |
|
* @param MyCartDraft $cartDraft |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct(MyCartDraft $cartDraft, Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(MeCartsEndpoint::endpoint(), $cartDraft, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param MyCartDraft $cartDraft |
37 |
|
* @param Context $context |
38 |
|
* @return static |
39 |
|
*/ |
40 |
|
public static function ofDraft(MyCartDraft $cartDraft, Context $context = null) |
41 |
|
{ |
42 |
|
return new static($cartDraft, $context); |
43 |
|
} |
44 |
|
} |
45 |
|
|
src/Request/Me/MeOrderByIdRequest.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* @method Order mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Order mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class MeOrderByIdRequest extends AbstractByIdGetRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Order\Order'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(MeOrdersEndpoint::endpoint(), $id, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $id |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofId($id, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($id, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Products/ProductByIdGetRequest.php 1 location
|
@@ 22-46 (lines=25) @@
|
19 |
|
* @method Product mapResponse(ApiResponseInterface $response) |
20 |
|
* @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
21 |
|
*/ |
22 |
|
class ProductByIdGetRequest extends AbstractByIdGetRequest |
23 |
|
{ |
24 |
|
use PriceSelectTrait; |
25 |
|
|
26 |
|
protected $resultClass = '\Commercetools\Core\Model\Product\Product'; |
27 |
|
|
28 |
|
/** |
29 |
|
* @param string $id |
30 |
|
* @param Context $context |
31 |
|
*/ |
32 |
|
public function __construct($id, Context $context = null) |
33 |
|
{ |
34 |
|
parent::__construct(ProductsEndpoint::endpoint(), $id, $context); |
35 |
|
} |
36 |
|
|
37 |
|
/** |
38 |
|
* @param string $id |
39 |
|
* @param Context $context |
40 |
|
* @return static |
41 |
|
*/ |
42 |
|
public static function ofId($id, Context $context = null) |
43 |
|
{ |
44 |
|
return new static($id, $context); |
45 |
|
} |
46 |
|
} |
47 |
|
|
src/Request/Products/ProductByKeyGetRequest.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* @method Product mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ProductByKeyGetRequest extends AbstractByKeyGetRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Product\Product'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $key |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($key, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(ProductsEndpoint::endpoint(), $key, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $key |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofKey($key, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($key, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Products/ProductDeleteByKeyRequest.php 1 location
|
@@ 20-44 (lines=25) @@
|
17 |
|
* @method Product mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ProductDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Product\Product'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $key |
26 |
|
* @param int $version |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($key, $version, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ProductsEndpoint::endpoint(), $key, $version, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param string $key |
36 |
|
* @param int $version |
37 |
|
* @param Context $context |
38 |
|
* @return static |
39 |
|
*/ |
40 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
41 |
|
{ |
42 |
|
return new static($key, $version, $context); |
43 |
|
} |
44 |
|
} |
45 |
|
|
src/Request/Products/ProductUpdateByKeyRequest.php 1 location
|
@@ 20-45 (lines=26) @@
|
17 |
|
* @method Product mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ProductUpdateByKeyRequest extends AbstractUpdateByKeyRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Product\Product'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $key |
26 |
|
* @param string $version |
27 |
|
* @param array $actions |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct($key, $version, array $actions = [], Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(ProductsEndpoint::endpoint(), $key, $version, $actions, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param string $key |
37 |
|
* @param int $version |
38 |
|
* @param Context $context |
39 |
|
* @return static |
40 |
|
*/ |
41 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
42 |
|
{ |
43 |
|
return new static($key, $version, [], $context); |
44 |
|
} |
45 |
|
} |
46 |
|
|
src/Request/ProductTypes/ProductTypeDeleteByKeyRequest.php 1 location
|
@@ 20-44 (lines=25) @@
|
17 |
|
* @method ProductType mapResponse(ApiResponseInterface $response) |
18 |
|
* @method ProductType mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ProductTypeDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\ProductType\ProductType'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $key |
26 |
|
* @param int $version |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($key, $version, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ProductTypesEndpoint::endpoint(), $key, $version, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param string $key |
36 |
|
* @param int $version |
37 |
|
* @param Context $context |
38 |
|
* @return static |
39 |
|
*/ |
40 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
41 |
|
{ |
42 |
|
return new static($key, $version, $context); |
43 |
|
} |
44 |
|
} |
45 |
|
|
src/Request/Reviews/ReviewByIdGetRequest.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ReviewByIdGetRequest extends AbstractByIdGetRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $id |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofId($id, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($id, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Reviews/ReviewByKeyGetRequest.php 1 location
|
@@ 21-43 (lines=23) @@
|
18 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class ReviewByKeyGetRequest extends AbstractByKeyGetRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param string $key |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($key, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $key, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param string $key |
36 |
|
* @param Context $context |
37 |
|
* @return static |
38 |
|
*/ |
39 |
|
public static function ofKey($key, Context $context = null) |
40 |
|
{ |
41 |
|
return new static($key, $context); |
42 |
|
} |
43 |
|
} |
44 |
|
|
src/Request/Reviews/ReviewCreateRequest.php 1 location
|
@@ 21-43 (lines=23) @@
|
18 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class ReviewCreateRequest extends AbstractCreateRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param ReviewDraft $review |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct(ReviewDraft $review, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $review, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param ReviewDraft $review |
36 |
|
* @param Context $context |
37 |
|
* @return static |
38 |
|
*/ |
39 |
|
public static function ofDraft(ReviewDraft $review, Context $context = null) |
40 |
|
{ |
41 |
|
return new static($review, $context); |
42 |
|
} |
43 |
|
} |
44 |
|
|
src/Request/Reviews/ReviewDeleteByKeyRequest.php 1 location
|
@@ 21-45 (lines=25) @@
|
18 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class ReviewDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param string $id |
27 |
|
* @param int $version |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct($id, $version, Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $version, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param string $key |
37 |
|
* @param int $version |
38 |
|
* @param Context $context |
39 |
|
* @return static |
40 |
|
*/ |
41 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
42 |
|
{ |
43 |
|
return new static($key, $version, $context); |
44 |
|
} |
45 |
|
} |
46 |
|
|
src/Request/Reviews/ReviewDeleteRequest.php 1 location
|
@@ 20-44 (lines=25) @@
|
17 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class ReviewDeleteRequest extends AbstractDeleteRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param int $version |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($id, $version, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $version, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param string $id |
36 |
|
* @param int $version |
37 |
|
* @param Context $context |
38 |
|
* @return static |
39 |
|
*/ |
40 |
|
public static function ofIdAndVersion($id, $version, Context $context = null) |
41 |
|
{ |
42 |
|
return new static($id, $version, $context); |
43 |
|
} |
44 |
|
} |
45 |
|
|
src/Request/Reviews/ReviewUpdateByKeyRequest.php 1 location
|
@@ 21-46 (lines=26) @@
|
18 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class ReviewUpdateByKeyRequest extends AbstractUpdateByKeyRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param string $key |
27 |
|
* @param string $version |
28 |
|
* @param array $actions |
29 |
|
* @param Context $context |
30 |
|
*/ |
31 |
|
public function __construct($key, $version, array $actions = [], Context $context = null) |
32 |
|
{ |
33 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $key, $version, $actions, $context); |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @param string $key |
38 |
|
* @param int $version |
39 |
|
* @param Context $context |
40 |
|
* @return static |
41 |
|
*/ |
42 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
43 |
|
{ |
44 |
|
return new static($key, $version, [], $context); |
45 |
|
} |
46 |
|
} |
47 |
|
|
src/Request/Subscriptions/SubscriptionByIdGetRequest.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class SubscriptionByIdGetRequest extends AbstractByIdGetRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $id, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $id |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofId($id, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($id, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Subscriptions/SubscriptionByKeyGetRequest.php 1 location
|
@@ 19-41 (lines=23) @@
|
16 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
17 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
18 |
|
*/ |
19 |
|
class SubscriptionByKeyGetRequest extends AbstractByKeyGetRequest |
20 |
|
{ |
21 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
22 |
|
|
23 |
|
/** |
24 |
|
* @param string $key |
25 |
|
* @param Context $context |
26 |
|
*/ |
27 |
|
public function __construct($key, Context $context = null) |
28 |
|
{ |
29 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $key, $context); |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param string $key |
34 |
|
* @param Context $context |
35 |
|
* @return static |
36 |
|
*/ |
37 |
|
public static function ofKey($key, Context $context = null) |
38 |
|
{ |
39 |
|
return new static($key, $context); |
40 |
|
} |
41 |
|
} |
42 |
|
|
src/Request/Subscriptions/SubscriptionCreateRequest.php 1 location
|
@@ 21-43 (lines=23) @@
|
18 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class SubscriptionCreateRequest extends AbstractCreateRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param SubscriptionDraft $subscription |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct(SubscriptionDraft $subscription, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $subscription, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param SubscriptionDraft $subscription |
36 |
|
* @param Context $context |
37 |
|
* @return static |
38 |
|
*/ |
39 |
|
public static function ofDraft(SubscriptionDraft $subscription, Context $context = null) |
40 |
|
{ |
41 |
|
return new static($subscription, $context); |
42 |
|
} |
43 |
|
} |
44 |
|
|
src/Request/Subscriptions/SubscriptionDeleteByKeyRequest.php 1 location
|
@@ 21-45 (lines=25) @@
|
18 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class SubscriptionDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param string $key |
27 |
|
* @param int $version |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct($key, $version, Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $key, $version, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param string $key |
37 |
|
* @param int $version |
38 |
|
* @param Context $context |
39 |
|
* @return static |
40 |
|
*/ |
41 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
42 |
|
{ |
43 |
|
return new static($key, $version, $context); |
44 |
|
} |
45 |
|
} |
46 |
|
|
src/Request/Subscriptions/SubscriptionDeleteRequest.php 1 location
|
@@ 20-44 (lines=25) @@
|
17 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class SubscriptionDeleteRequest extends AbstractDeleteRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $id |
26 |
|
* @param int $version |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($id, $version, Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $id, $version, $context); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param string $id |
36 |
|
* @param int $version |
37 |
|
* @param Context $context |
38 |
|
* @return static |
39 |
|
*/ |
40 |
|
public static function ofIdAndVersion($id, $version, Context $context = null) |
41 |
|
{ |
42 |
|
return new static($id, $version, $context); |
43 |
|
} |
44 |
|
} |
45 |
|
|
src/Request/Subscriptions/SubscriptionUpdateByKeyRequest.php 1 location
|
@@ 20-45 (lines=26) @@
|
17 |
|
* @method Subscription mapResponse(ApiResponseInterface $response) |
18 |
|
* @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
19 |
|
*/ |
20 |
|
class SubscriptionUpdateByKeyRequest extends AbstractUpdateByKeyRequest |
21 |
|
{ |
22 |
|
protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription'; |
23 |
|
|
24 |
|
/** |
25 |
|
* @param string $key |
26 |
|
* @param string $version |
27 |
|
* @param array $actions |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct($key, $version, array $actions = [], Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(SubscriptionsEndpoint::endpoint(), $key, $version, $actions, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param string $key |
37 |
|
* @param int $version |
38 |
|
* @param Context $context |
39 |
|
* @return static |
40 |
|
*/ |
41 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
42 |
|
{ |
43 |
|
return new static($key, $version, [], $context); |
44 |
|
} |
45 |
|
} |
46 |
|
|
src/Request/Types/TypeDeleteByKeyRequest.php 1 location
|
@@ 21-45 (lines=25) @@
|
18 |
|
* @method Type mapResponse(ApiResponseInterface $response) |
19 |
|
* @method Type mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null) |
20 |
|
*/ |
21 |
|
class TypeDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
22 |
|
{ |
23 |
|
protected $resultClass = '\Commercetools\Core\Model\Type\Type'; |
24 |
|
|
25 |
|
/** |
26 |
|
* @param string $key |
27 |
|
* @param int $version |
28 |
|
* @param Context $context |
29 |
|
*/ |
30 |
|
public function __construct($key, $version, Context $context = null) |
31 |
|
{ |
32 |
|
parent::__construct(TypesEndpoint::endpoint(), $key, $version, $context); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param string $key |
37 |
|
* @param int $version |
38 |
|
* @param Context $context |
39 |
|
* @return static |
40 |
|
*/ |
41 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
42 |
|
{ |
43 |
|
return new static($key, $version, $context); |
44 |
|
} |
45 |
|
} |
46 |
|
|