commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ResourceByProjectKeyMeCarts.php
1<?php
2
3declare(strict_types=1);
10
13use GuzzleHttp\ClientInterface;
14use Psr\Http\Message\UploadedFileInterface;
15
20{
24 public function __construct(array $args = [], ClientInterface $client = null)
25 {
26 parent::__construct('/{projectKey}/me/carts', $args, $client);
27 }
28
31 public function withId(string $ID = null): ResourceByProjectKeyMeCartsByID
32 {
33 $args = $this->getArgs();
34 if (!is_null($ID)) {
35 $args['ID'] = $ID;
36 }
37
38 return new ResourceByProjectKeyMeCartsByID($args, $this->getClient());
39 }
43 {
44 $args = $this->getArgs();
45
46 return new ResourceByProjectKeyMeCartsReplicate($args, $this->getClient());
47 }
48
53 public function get($body = null, array $headers = []): ByProjectKeyMeCartsGet
54 {
55 $args = $this->getArgs();
56
57 return new ByProjectKeyMeCartsGet($args['projectKey'], $body, $headers, $this->getClient());
58 }
63 public function head($body = null, array $headers = []): ByProjectKeyMeCartsHead
64 {
65 $args = $this->getArgs();
66
67 return new ByProjectKeyMeCartsHead($args['projectKey'], $body, $headers, $this->getClient());
68 }
73 public function post(?MyCartDraft $body = null, array $headers = []): ByProjectKeyMeCartsPost
74 {
75 $args = $this->getArgs();
76
77 return new ByProjectKeyMeCartsPost($args['projectKey'], $body, $headers, $this->getClient());
78 }
79}