commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ResourceByProjectKeyInStoreKeyByStoreKeyCarts.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}/carts', $args, $client);
27  }
28 
32  {
33  $args = $this->getArgs();
34  if (!is_null($customerId)) {
35  $args['customerId'] = $customerId;
36  }
37 
39  }
43  {
44  $args = $this->getArgs();
45  if (!is_null($key)) {
46  $args['key'] = $key;
47  }
48 
50  }
54  {
55  $args = $this->getArgs();
56 
58  }
61  public function withId(string $ID = null): ResourceByProjectKeyInStoreKeyByStoreKeyCartsByID
62  {
63  $args = $this->getArgs();
64  if (!is_null($ID)) {
65  $args['ID'] = $ID;
66  }
67 
69  }
70 
75  public function get($body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartsGet
76  {
77  $args = $this->getArgs();
78 
79  return new ByProjectKeyInStoreKeyByStoreKeyCartsGet($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
80  }
85  public function head($body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartsHead
86  {
87  $args = $this->getArgs();
88 
89  return new ByProjectKeyInStoreKeyByStoreKeyCartsHead($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
90  }
95  public function post(?CartDraft $body = null, array $headers = []): ByProjectKeyInStoreKeyByStoreKeyCartsPost
96  {
97  $args = $this->getArgs();
98 
99  return new ByProjectKeyInStoreKeyByStoreKeyCartsPost($args['projectKey'], $args['storeKey'], $body, $headers, $this->getClient());
100  }
101 }