commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ResourceByProjectKeyOrders.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}/orders', $args, $client);
27  }
28 
32  {
33  $args = $this->getArgs();
34 
35  return new ResourceByProjectKeyOrdersImport($args, $this->getClient());
36  }
40  {
41  $args = $this->getArgs();
42 
43  return new ResourceByProjectKeyOrdersQuotes($args, $this->getClient());
44  }
47  public function withOrderNumber(string $orderNumber = null): ResourceByProjectKeyOrdersOrderNumberByOrderNumber
48  {
49  $args = $this->getArgs();
50  if (!is_null($orderNumber)) {
51  $args['orderNumber'] = $orderNumber;
52  }
53 
55  }
59  {
60  $args = $this->getArgs();
61 
62  return new ResourceByProjectKeyOrdersEdits($args, $this->getClient());
63  }
66  public function withId(string $ID = null): ResourceByProjectKeyOrdersByID
67  {
68  $args = $this->getArgs();
69  if (!is_null($ID)) {
70  $args['ID'] = $ID;
71  }
72 
73  return new ResourceByProjectKeyOrdersByID($args, $this->getClient());
74  }
78  {
79  $args = $this->getArgs();
80 
81  return new ResourceByProjectKeyOrdersSearch($args, $this->getClient());
82  }
83 
88  public function get($body = null, array $headers = []): ByProjectKeyOrdersGet
89  {
90  $args = $this->getArgs();
91 
92  return new ByProjectKeyOrdersGet($args['projectKey'], $body, $headers, $this->getClient());
93  }
98  public function head($body = null, array $headers = []): ByProjectKeyOrdersHead
99  {
100  $args = $this->getArgs();
101 
102  return new ByProjectKeyOrdersHead($args['projectKey'], $body, $headers, $this->getClient());
103  }
108  public function post(?OrderFromCartDraft $body = null, array $headers = []): ByProjectKeyOrdersPost
109  {
110  $args = $this->getArgs();
111 
112  return new ByProjectKeyOrdersPost($args['projectKey'], $body, $headers, $this->getClient());
113  }
114 }
post(?OrderFromCartDraft $body=null, array $headers=[])