-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathProductSearchProjectionParamsBuilder.php
More file actions
301 lines (241 loc) · 7.64 KB
/
Copy pathProductSearchProjectionParamsBuilder.php
File metadata and controls
301 lines (241 loc) · 7.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<?php
declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/
namespace Commercetools\Api\Models\ProductSearch;
use Commercetools\Base\Builder;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;
/**
* @implements Builder<ProductSearchProjectionParams>
*/
final class ProductSearchProjectionParamsBuilder implements Builder
{
/**
* @var ?array
*/
private $expand;
/**
* @var ?bool
*/
private $staged;
/**
* @var ?string
*/
private $priceCurrency;
/**
* @var ?string
*/
private $priceCountry;
/**
* @var ?string
*/
private $priceCustomerGroup;
/**
* @var ?array
*/
private $priceCustomerGroupAssignments;
/**
* @var ?string
*/
private $priceChannel;
/**
* @var ?array
*/
private $localeProjection;
/**
* @var ?string
*/
private $storeProjection;
/**
* <p>Expands a <code>value</code> of type <a href="ctp:api:type:Reference">Reference</a> in a <a href="ctp:api:type:ProductProjection">ProductProjection</a>.
* In case the referenced object does not exist, the API returns the non-expanded reference.</p>
*
* @return null|array
*/
public function getExpand()
{
return $this->expand;
}
/**
* <p>Set to <code>true</code> to retrieve the <a href="ctp:api:type:CurrentStaged">staged</a> Product Projection</p>
*
* @return null|bool
*/
public function getStaged()
{
return $this->staged;
}
/**
* <p>The currency used for <a href="/../api/pricing-and-discounts-overview#product-price-selection">Product price selection</a>.</p>
*
* @return null|string
*/
public function getPriceCurrency()
{
return $this->priceCurrency;
}
/**
* <p>The country used for <a href="/../api/pricing-and-discounts-overview#product-price-selection">Product price selection</a>. It can be used only <em>in conjunction with</em> the <code>priceCurrency</code> parameter.</p>
*
* @return null|string
*/
public function getPriceCountry()
{
return $this->priceCountry;
}
/**
* <p><code>id</code> of an existing <a href="ctp:api:type:CustomerGroup">CustomerGroup</a> used for <a href="/../api/pricing-and-discounts-overview#product-price-selection">Product price selection</a>. It can be used only <em>in conjunction with</em> the <code>priceCurrency</code> parameter.</p>
*
* @return null|string
*/
public function getPriceCustomerGroup()
{
return $this->priceCustomerGroup;
}
/**
* <p>IDs of existing <a href="ctp:api:type:CustomerGroup">CustomerGroups</a> used for <a href="/../api/pricing-and-discounts-overview#product-price-selection">Product price selection</a>, when using <a href="/../api/customers-overview#customer-groups">multiple Customer Groups</a>. It can be used only <em>in conjunction with</em> the <code>priceCurrency</code> parameter.</p>
*
* @return null|array
*/
public function getPriceCustomerGroupAssignments()
{
return $this->priceCustomerGroupAssignments;
}
/**
* <p><code>id</code> of an existing <a href="ctp:api:type:Channel">Channel</a> used for <a href="/../api/pricing-and-discounts-overview#product-price-selection">Product price selection</a>. It can be used only <em>in conjunction with</em> the <code>priceCurrency</code> parameter.</p>
*
* @return null|string
*/
public function getPriceChannel()
{
return $this->priceChannel;
}
/**
* <p>Used for <a href="ctp:api:type:ProductProjectionLocales">locale-based projection</a>.</p>
*
* @return null|array
*/
public function getLocaleProjection()
{
return $this->localeProjection;
}
/**
* <p><code>key</code> of an existing <a href="ctp:api:type:Store">Store</a>.
* If the Store has defined <code>languages</code>, <code>countries</code>, <code>distributionChannels</code>, or <code>supplyChannels</code>,
* they are used for projections based on <a href="ctp:api:type:ProductProjectionLocales">locale</a>, <a href="ctp:api:type:ProductProjectionPrices">price</a>,
* and <a href="ctp:api:type:ProductProjectionInventoryEntries">inventory</a>.</p>
* <p>For Projects with active <a href="/api/projects/product-selections">Product Selections</a>, the API does not take the <a href="/api/project-configuration-overview#products-available-in-store">availability of the Product in the specified Store</a> into account.</p>
* <p><a href="/api/projects/product-tailoring">Product Tailoring</a> modifies the product information returned in API responses. However, you can only specify <a href="/api/search-query-language#simple-expressions">query expressions</a> for the original Product data, not for tailored data.</p>
*
* @return null|string
*/
public function getStoreProjection()
{
return $this->storeProjection;
}
/**
* @param ?array $expand
* @return $this
*/
public function withExpand(?array $expand)
{
$this->expand = $expand;
return $this;
}
/**
* @param ?bool $staged
* @return $this
*/
public function withStaged(?bool $staged)
{
$this->staged = $staged;
return $this;
}
/**
* @param ?string $priceCurrency
* @return $this
*/
public function withPriceCurrency(?string $priceCurrency)
{
$this->priceCurrency = $priceCurrency;
return $this;
}
/**
* @param ?string $priceCountry
* @return $this
*/
public function withPriceCountry(?string $priceCountry)
{
$this->priceCountry = $priceCountry;
return $this;
}
/**
* @param ?string $priceCustomerGroup
* @return $this
*/
public function withPriceCustomerGroup(?string $priceCustomerGroup)
{
$this->priceCustomerGroup = $priceCustomerGroup;
return $this;
}
/**
* @param ?array $priceCustomerGroupAssignments
* @return $this
*/
public function withPriceCustomerGroupAssignments(?array $priceCustomerGroupAssignments)
{
$this->priceCustomerGroupAssignments = $priceCustomerGroupAssignments;
return $this;
}
/**
* @param ?string $priceChannel
* @return $this
*/
public function withPriceChannel(?string $priceChannel)
{
$this->priceChannel = $priceChannel;
return $this;
}
/**
* @param ?array $localeProjection
* @return $this
*/
public function withLocaleProjection(?array $localeProjection)
{
$this->localeProjection = $localeProjection;
return $this;
}
/**
* @param ?string $storeProjection
* @return $this
*/
public function withStoreProjection(?string $storeProjection)
{
$this->storeProjection = $storeProjection;
return $this;
}
public function build(): ProductSearchProjectionParams
{
return new ProductSearchProjectionParamsModel(
$this->expand,
$this->staged,
$this->priceCurrency,
$this->priceCountry,
$this->priceCustomerGroup,
$this->priceCustomerGroupAssignments,
$this->priceChannel,
$this->localeProjection,
$this->storeProjection
);
}
public static function of(): ProductSearchProjectionParamsBuilder
{
return new self();
}
}