src/Request/ProductTypes/ProductTypeDeleteByKeyRequest.php 1 location
|
@@ 18-42 (lines=25) @@
|
15 |
|
* @link https://dev.commercetools.com/http-api-projects-productTypes.html#delete-product-type-by-key |
16 |
|
* @method ProductType mapResponse(ApiResponseInterface $response) |
17 |
|
*/ |
18 |
|
class ProductTypeDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
19 |
|
{ |
20 |
|
protected $resultClass = '\Commercetools\Core\Model\ProductType\ProductType'; |
21 |
|
|
22 |
|
/** |
23 |
|
* @param string $key |
24 |
|
* @param int $version |
25 |
|
* @param Context $context |
26 |
|
*/ |
27 |
|
public function __construct($key, $version, Context $context = null) |
28 |
|
{ |
29 |
|
parent::__construct(ProductTypesEndpoint::endpoint(), $key, $version, $context); |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param string $key |
34 |
|
* @param int $version |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($key, $version, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Reviews/ReviewByIdGetRequest.php 1 location
|
@@ 18-40 (lines=23) @@
|
15 |
|
* @link https://dev.commercetools.com/http-api-projects-reviews.html#review-by-id |
16 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
17 |
|
*/ |
18 |
|
class ReviewByIdGetRequest extends AbstractByIdGetRequest |
19 |
|
{ |
20 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
21 |
|
|
22 |
|
/** |
23 |
|
* @param string $id |
24 |
|
* @param Context $context |
25 |
|
*/ |
26 |
|
public function __construct($id, Context $context = null) |
27 |
|
{ |
28 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $context); |
29 |
|
} |
30 |
|
|
31 |
|
/** |
32 |
|
* @param string $id |
33 |
|
* @param Context $context |
34 |
|
* @return static |
35 |
|
*/ |
36 |
|
public static function ofId($id, Context $context = null) |
37 |
|
{ |
38 |
|
return new static($id, $context); |
39 |
|
} |
40 |
|
} |
41 |
|
|
src/Request/Reviews/ReviewCreateRequest.php 1 location
|
@@ 19-41 (lines=23) @@
|
16 |
|
* @link https://dev.commercetools.com/http-api-projects-reviews.html#create-review |
17 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
18 |
|
*/ |
19 |
|
class ReviewCreateRequest extends AbstractCreateRequest |
20 |
|
{ |
21 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
22 |
|
|
23 |
|
/** |
24 |
|
* @param ReviewDraft $review |
25 |
|
* @param Context $context |
26 |
|
*/ |
27 |
|
public function __construct(ReviewDraft $review, Context $context = null) |
28 |
|
{ |
29 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $review, $context); |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param ReviewDraft $review |
34 |
|
* @param Context $context |
35 |
|
* @return static |
36 |
|
*/ |
37 |
|
public static function ofDraft(ReviewDraft $review, Context $context = null) |
38 |
|
{ |
39 |
|
return new static($review, $context); |
40 |
|
} |
41 |
|
} |
42 |
|
|
src/Request/Reviews/ReviewDeleteRequest.php 1 location
|
@@ 18-42 (lines=25) @@
|
15 |
|
* @link https://dev.commercetools.com/http-api-projects-reviews.html#delete-review-by-id |
16 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
17 |
|
*/ |
18 |
|
class ReviewDeleteRequest extends AbstractDeleteRequest |
19 |
|
{ |
20 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
21 |
|
|
22 |
|
/** |
23 |
|
* @param string $id |
24 |
|
* @param int $version |
25 |
|
* @param Context $context |
26 |
|
*/ |
27 |
|
public function __construct($id, $version, Context $context = null) |
28 |
|
{ |
29 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $version, $context); |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param string $id |
34 |
|
* @param int $version |
35 |
|
* @param Context $context |
36 |
|
* @return static |
37 |
|
*/ |
38 |
|
public static function ofIdAndVersion($id, $version, Context $context = null) |
39 |
|
{ |
40 |
|
return new static($id, $version, $context); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Request/Reviews/ReviewUpdateByKeyRequest.php 1 location
|
@@ 19-44 (lines=26) @@
|
16 |
|
* @link https://dev.commercetools.com/http-api-projects-reviews.html#update-review |
17 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
18 |
|
*/ |
19 |
|
class ReviewUpdateByKeyRequest extends AbstractUpdateByKeyRequest |
20 |
|
{ |
21 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
22 |
|
|
23 |
|
/** |
24 |
|
* @param string $key |
25 |
|
* @param string $version |
26 |
|
* @param array $actions |
27 |
|
* @param Context $context |
28 |
|
*/ |
29 |
|
public function __construct($key, $version, array $actions = [], Context $context = null) |
30 |
|
{ |
31 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $key, $version, $actions, $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/Types/TypeDeleteByKeyRequest.php 1 location
|
@@ 19-43 (lines=25) @@
|
16 |
|
* @link https://dev.commercetools.com/http-api-projects-types.html#delete-type-by-key |
17 |
|
* @method Type mapResponse(ApiResponseInterface $response) |
18 |
|
*/ |
19 |
|
class TypeDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
20 |
|
{ |
21 |
|
protected $resultClass = '\Commercetools\Core\Model\Type\Type'; |
22 |
|
|
23 |
|
/** |
24 |
|
* @param string $id |
25 |
|
* @param int $version |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, $version, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(TypesEndpoint::endpoint(), $id, $version, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $key |
35 |
|
* @param int $version |
36 |
|
* @param Context $context |
37 |
|
* @return static |
38 |
|
*/ |
39 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
40 |
|
{ |
41 |
|
return new static($key, $version, $context); |
42 |
|
} |
43 |
|
} |
44 |
|
|
src/Request/Reviews/ReviewByKeyGetRequest.php 1 location
|
@@ 18-40 (lines=23) @@
|
15 |
|
* @package Commercetools\Core\Request\Reviews |
16 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
17 |
|
*/ |
18 |
|
class ReviewByKeyGetRequest extends AbstractByKeyGetRequest |
19 |
|
{ |
20 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
21 |
|
|
22 |
|
/** |
23 |
|
* @param string $key |
24 |
|
* @param Context $context |
25 |
|
*/ |
26 |
|
public function __construct($key, Context $context = null) |
27 |
|
{ |
28 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $key, $context); |
29 |
|
} |
30 |
|
|
31 |
|
/** |
32 |
|
* @param string $key |
33 |
|
* @param Context $context |
34 |
|
* @return static |
35 |
|
*/ |
36 |
|
public static function ofKey($key, Context $context = null) |
37 |
|
{ |
38 |
|
return new static($key, $context); |
39 |
|
} |
40 |
|
} |
41 |
|
|
src/Request/Reviews/ReviewDeleteByKeyRequest.php 1 location
|
@@ 19-43 (lines=25) @@
|
16 |
|
* @link http://dev.commercetools.com/http-api-projects-reviews.html#delete-review-by-key |
17 |
|
* @method Review mapResponse(ApiResponseInterface $response) |
18 |
|
*/ |
19 |
|
class ReviewDeleteByKeyRequest extends AbstractDeleteByKeyRequest |
20 |
|
{ |
21 |
|
protected $resultClass = '\Commercetools\Core\Model\Review\Review'; |
22 |
|
|
23 |
|
/** |
24 |
|
* @param string $id |
25 |
|
* @param int $version |
26 |
|
* @param Context $context |
27 |
|
*/ |
28 |
|
public function __construct($id, $version, Context $context = null) |
29 |
|
{ |
30 |
|
parent::__construct(ReviewsEndpoint::endpoint(), $id, $version, $context); |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param string $key |
35 |
|
* @param int $version |
36 |
|
* @param Context $context |
37 |
|
* @return static |
38 |
|
*/ |
39 |
|
public static function ofKeyAndVersion($key, $version, Context $context = null) |
40 |
|
{ |
41 |
|
return new static($key, $version, $context); |
42 |
|
} |
43 |
|
} |
44 |
|
|
src/Request/Me/MeCartByIdRequest.php 1 location
|
@@ 18-40 (lines=23) @@
|
15 |
|
* @stability |
16 |
|
* @method Cart mapResponse(ApiResponseInterface $response) |
17 |
|
*/ |
18 |
|
class MeCartByIdRequest extends AbstractByIdGetRequest |
19 |
|
{ |
20 |
|
protected $resultClass = '\Commercetools\Core\Model\Cart\Cart'; |
21 |
|
|
22 |
|
/** |
23 |
|
* @param string $id |
24 |
|
* @param Context $context |
25 |
|
*/ |
26 |
|
public function __construct($id, Context $context = null) |
27 |
|
{ |
28 |
|
parent::__construct(MeCartsEndpoint::endpoint(), $id, $context); |
29 |
|
} |
30 |
|
|
31 |
|
/** |
32 |
|
* @param string $id |
33 |
|
* @param Context $context |
34 |
|
* @return static |
35 |
|
*/ |
36 |
|
public static function ofId($id, Context $context = null) |
37 |
|
{ |
38 |
|
return new static($id, $context); |
39 |
|
} |
40 |
|
} |
41 |
|
|