commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ResourceByProjectKeyInStoreKeyByStoreKeyCartDiscounts.php
1 <?php
2 
3 declare(strict_types=1);
10 
13 use GuzzleHttp\ClientInterface;
14 use Psr\Http\Message\UploadedFileInterface;
15 
20 {
24  public function __construct(array $args = [], ClientInterface $client = null)
25  {
26  parent::__construct('/{projectKey}/in-store/key={storeKey}/cart-discounts', $args, $client);
27  }
28 
32  {
33  $args = $this->getArgs();
34  if (!is_null($key)) {
35  $args['key'] = $key;
36  }
37 
39  }
43  {
44  $args = $this->getArgs();
45  if (!is_null($ID)) {
46  $args['ID'] = $ID;
47  }
48 
50  }
51 
56  public function get($body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartDiscountsGet
57  {
58  $args = $this->getArgs();
59 
60  return new ByProjectKeyInStoreKeyByStoreKeyCartDiscountsGet($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
61  }
66  public function head($body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartDiscountsHead
67  {
68  $args = $this->getArgs();
69 
70  return new ByProjectKeyInStoreKeyByStoreKeyCartDiscountsHead($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
71  }
76  public function post(?CartDiscountDraft $body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartDiscountsPost
77  {
78  $args = $this->getArgs();
79 
80  return new ByProjectKeyInStoreKeyByStoreKeyCartDiscountsPost($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
81  }
82 }