commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ApiRequestBuilder.php
1<?php
2
4
9use GuzzleHttp\ClientInterface;
10
11class ApiRequestBuilder extends Builder
12{
16 private $projectKey;
17
21 public function __construct(string $projectKey, ClientInterface $client, array $args = [])
22 {
23 parent::__construct($client, $args);
24 $this->projectKey = $projectKey;
25 }
26
27 public function with(): ResourceByProjectKey
28 {
29 return $this->withProjectKey($this->projectKey);
30 }
31
36 public function get($body = null, array $headers = []): Resource\ByProjectKeyGet
37 {
38 return $this->with()->get($body, $headers);
39 }
40
45 public function post(?ProjectUpdate $body = null, array $headers = []): Resource\ByProjectKeyPost
46 {
47 return $this->with()->post($body, $headers);
48 }
49
51 {
52 return $this->with()->cartDiscounts();
53 }
54
55 public function carts(): Resource\ResourceByProjectKeyCarts
56 {
57 return $this->with()->carts();
58 }
59
60 public function categories(): Resource\ResourceByProjectKeyCategories
61 {
62 return $this->with()->categories();
63 }
64
65 public function channels(): Resource\ResourceByProjectKeyChannels
66 {
67 return $this->with()->channels();
68 }
69
71 {
72 return $this->with()->customerGroups();
73 }
74
76 {
77 return $this->with()->customObjects();
78 }
79
80 public function customers(): Resource\ResourceByProjectKeyCustomers
81 {
82 return $this->with()->customers();
83 }
84
86 {
87 return $this->with()->discountCodes();
88 }
89
90 public function graphql(): Resource\ResourceByProjectKeyGraphql
91 {
92 return $this->with()->graphql();
93 }
94
95 public function inventory(): Resource\ResourceByProjectKeyInventory
96 {
97 return $this->with()->inventory();
98 }
99
100 public function login(): Resource\ResourceByProjectKeyLogin
101 {
102 return $this->with()->login();
103 }
104
105 public function messages(): Resource\ResourceByProjectKeyMessages
106 {
107 return $this->with()->messages();
108 }
109
110 public function orders(): Resource\ResourceByProjectKeyOrders
111 {
112 return $this->with()->orders();
113 }
114
115 public function payments(): Resource\ResourceByProjectKeyPayments
116 {
117 return $this->with()->payments();
118 }
119
120 public function products(): Resource\ResourceByProjectKeyProducts
121 {
122 return $this->with()->products();
123 }
124
126 {
127 return $this->with()->productDiscounts();
128 }
129
131 {
132 return $this->with()->productProjections();
133 }
134
136 {
137 return $this->with()->productTypes();
138 }
139
140 public function reviews(): Resource\ResourceByProjectKeyReviews
141 {
142 return $this->with()->reviews();
143 }
144
146 {
147 return $this->with()->shippingMethods();
148 }
149
151 {
152 return $this->with()->shoppingLists();
153 }
154
155 public function states(): Resource\ResourceByProjectKeyStates
156 {
157 return $this->with()->states();
158 }
159
161 {
162 return $this->with()->subscriptions();
163 }
164
166 {
167 return $this->with()->taxCategories();
168 }
169
170 public function types(): Resource\ResourceByProjectKeyTypes
171 {
172 return $this->with()->types();
173 }
174
175 public function zones(): Resource\ResourceByProjectKeyZones
176 {
177 return $this->with()->zones();
178 }
179
180 public function me(): Resource\ResourceByProjectKeyMe
181 {
182 return $this->with()->me();
183 }
184
185 public function extensions(): Resource\ResourceByProjectKeyExtensions
186 {
187 return $this->with()->extensions();
188 }
189
190 public function apiClients(): Resource\ResourceByProjectKeyApiClients
191 {
192 return $this->with()->apiClients();
193 }
194
195 public function stores(): Resource\ResourceByProjectKeyStores
196 {
197 return $this->with()->stores();
198 }
199
200 public function inStore(string $storeKey): Resource\ResourceByProjectKeyInStoreKeyByStoreKey
201 {
202 return $this->with()->inStoreKeyWithStoreKeyValue($storeKey);
203 }
204}
post(?ProjectUpdate $body=null, array $headers=[])
__construct(string $projectKey, ClientInterface $client, array $args=[])