commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ResourceByProjectKeyMeOrders.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}/me/orders', $args, $client);
27  }
28 
31  public function withId(string $ID = null): ResourceByProjectKeyMeOrdersByID
32  {
33  $args = $this->getArgs();
34  if (!is_null($ID)) {
35  $args['ID'] = $ID;
36  }
37 
38  return new ResourceByProjectKeyMeOrdersByID($args, $this->getClient());
39  }
43  {
44  $args = $this->getArgs();
45 
46  return new ResourceByProjectKeyMeOrdersQuotes($args, $this->getClient());
47  }
48 
53  public function get($body = null, array $headers = []): ByProjectKeyMeOrdersGet
54  {
55  $args = $this->getArgs();
56 
57  return new ByProjectKeyMeOrdersGet($args['projectKey'], $body, $headers, $this->getClient());
58  }
63  public function head($body = null, array $headers = []): ByProjectKeyMeOrdersHead
64  {
65  $args = $this->getArgs();
66 
67  return new ByProjectKeyMeOrdersHead($args['projectKey'], $body, $headers, $this->getClient());
68  }
73  public function post(?MyOrderFromCartDraft $body = null, array $headers = []): ByProjectKeyMeOrdersPost
74  {
75  $args = $this->getArgs();
76 
77  return new ByProjectKeyMeOrdersPost($args['projectKey'], $body, $headers, $this->getClient());
78  }
79 }
post(?MyOrderFromCartDraft $body=null, array $headers=[])