commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Zone
ZoneBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Zone
;
10
11
use
Commercetools\Api\Models\Common\BaseResource
;
12
use
Commercetools\Api\Models\Common\BaseResourceBuilder
;
13
use
Commercetools\Api\Models\Common\CreatedBy
;
14
use
Commercetools\Api\Models\Common\CreatedByBuilder
;
15
use
Commercetools\Api\Models\Common\LastModifiedBy
;
16
use
Commercetools\Api\Models\Common\LastModifiedByBuilder
;
17
use
Commercetools\Base\Builder
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use
Commercetools\Base\JsonObjectModel
;
21
use
Commercetools\Base\MapperFactory
;
22
use DateTimeImmutable;
23
use stdClass;
24
28
final
class
ZoneBuilder
implements
Builder
29
{
34
private
$id;
35
40
private
$version;
41
46
private
$createdAt;
47
52
private
$lastModifiedAt;
53
58
private
$lastModifiedBy;
59
64
private
$createdBy;
65
70
private
$key;
71
76
private
$name;
77
82
private
$description;
83
88
private
$locations;
89
96
public
function
getId
()
97
{
98
return
$this->id;
99
}
100
107
public
function
getVersion
()
108
{
109
return
$this->version;
110
}
111
118
public
function
getCreatedAt
()
119
{
120
return
$this->createdAt;
121
}
122
129
public
function
getLastModifiedAt
()
130
{
131
return
$this->lastModifiedAt;
132
}
133
140
public
function
getLastModifiedBy
()
141
{
142
return
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy;
143
}
144
151
public
function
getCreatedBy
()
152
{
153
return
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy;
154
}
155
162
public
function
getKey
()
163
{
164
return
$this->key;
165
}
166
173
public
function
getName
()
174
{
175
return
$this->name;
176
}
177
184
public
function
getDescription
()
185
{
186
return
$this->description;
187
}
188
195
public
function
getLocations
()
196
{
197
return
$this->locations;
198
}
199
204
public
function
withId
(?
string
$id)
205
{
206
$this->
id
= $id;
207
208
return
$this;
209
}
210
215
public
function
withVersion
(?
int
$version)
216
{
217
$this->version = $version;
218
219
return
$this;
220
}
221
226
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
227
{
228
$this->createdAt = $createdAt;
229
230
return
$this;
231
}
232
237
public
function
withLastModifiedAt
(?DateTimeImmutable $lastModifiedAt)
238
{
239
$this->lastModifiedAt = $lastModifiedAt;
240
241
return
$this;
242
}
243
248
public
function
withLastModifiedBy
(?
LastModifiedBy
$lastModifiedBy)
249
{
250
$this->lastModifiedBy = $lastModifiedBy;
251
252
return
$this;
253
}
254
259
public
function
withCreatedBy
(?
CreatedBy
$createdBy)
260
{
261
$this->createdBy = $createdBy;
262
263
return
$this;
264
}
265
270
public
function
withKey
(?
string
$key)
271
{
272
$this->key = $key;
273
274
return
$this;
275
}
276
281
public
function
withName
(?
string
$name)
282
{
283
$this->name = $name;
284
285
return
$this;
286
}
287
292
public
function
withDescription
(?
string
$description)
293
{
294
$this->description = $description;
295
296
return
$this;
297
}
298
303
public
function
withLocations
(?
LocationCollection
$locations)
304
{
305
$this->locations = $locations;
306
307
return
$this;
308
}
309
314
public
function
withLastModifiedByBuilder
(?
LastModifiedByBuilder
$lastModifiedBy)
315
{
316
$this->lastModifiedBy = $lastModifiedBy;
317
318
return
$this;
319
}
320
325
public
function
withCreatedByBuilder
(?
CreatedByBuilder
$createdBy)
326
{
327
$this->createdBy = $createdBy;
328
329
return
$this;
330
}
331
332
public
function
build
():
Zone
333
{
334
return
new
ZoneModel
(
335
$this->
id
,
336
$this->version,
337
$this->createdAt,
338
$this->lastModifiedAt,
339
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy,
340
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy,
341
$this->key,
342
$this->name,
343
$this->description,
344
$this->locations
345
);
346
}
347
348
public
static
function
of
():
ZoneBuilder
349
{
350
return
new
self
();
351
}
352
}
Commercetools\Api\Models\Common\BaseResourceBuilder
Definition
BaseResourceBuilder.php:491
Commercetools\Api\Models\Common\CreatedByBuilder
Definition
CreatedByBuilder.php:24
Commercetools\Api\Models\Common\CreatedByBuilder\build
build()
Definition
CreatedByBuilder.php:226
Commercetools\Api\Models\Common\LastModifiedByBuilder
Definition
LastModifiedByBuilder.php:24
Commercetools\Api\Models\Common\LastModifiedByBuilder\build
build()
Definition
LastModifiedByBuilder.php:226
Commercetools\Api\Models\Zone\LocationCollection
Definition
LocationCollection.php:22
Commercetools\Api\Models\Zone\ZoneBuilder
Definition
ZoneBuilder.php:29
Commercetools\Api\Models\Zone\ZoneBuilder\withCreatedBy
withCreatedBy(?CreatedBy $createdBy)
Definition
ZoneBuilder.php:259
Commercetools\Api\Models\Zone\ZoneBuilder\withLocations
withLocations(?LocationCollection $locations)
Definition
ZoneBuilder.php:303
Commercetools\Api\Models\Zone\ZoneBuilder\getCreatedAt
getCreatedAt()
Definition
ZoneBuilder.php:118
Commercetools\Api\Models\Zone\ZoneBuilder\getId
getId()
Definition
ZoneBuilder.php:96
Commercetools\Api\Models\Zone\ZoneBuilder\withLastModifiedAt
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Definition
ZoneBuilder.php:237
Commercetools\Api\Models\Zone\ZoneBuilder\withDescription
withDescription(?string $description)
Definition
ZoneBuilder.php:292
Commercetools\Api\Models\Zone\ZoneBuilder\withId
withId(?string $id)
Definition
ZoneBuilder.php:204
Commercetools\Api\Models\Zone\ZoneBuilder\withLastModifiedBy
withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
Definition
ZoneBuilder.php:248
Commercetools\Api\Models\Zone\ZoneBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
ZoneBuilder.php:226
Commercetools\Api\Models\Zone\ZoneBuilder\build
build()
Definition
ZoneBuilder.php:332
Commercetools\Api\Models\Zone\ZoneBuilder\getLastModifiedAt
getLastModifiedAt()
Definition
ZoneBuilder.php:129
Commercetools\Api\Models\Zone\ZoneBuilder\getName
getName()
Definition
ZoneBuilder.php:173
Commercetools\Api\Models\Zone\ZoneBuilder\getLocations
getLocations()
Definition
ZoneBuilder.php:195
Commercetools\Api\Models\Zone\ZoneBuilder\withKey
withKey(?string $key)
Definition
ZoneBuilder.php:270
Commercetools\Api\Models\Zone\ZoneBuilder\getCreatedBy
getCreatedBy()
Definition
ZoneBuilder.php:151
Commercetools\Api\Models\Zone\ZoneBuilder\getKey
getKey()
Definition
ZoneBuilder.php:162
Commercetools\Api\Models\Zone\ZoneBuilder\withName
withName(?string $name)
Definition
ZoneBuilder.php:281
Commercetools\Api\Models\Zone\ZoneBuilder\withCreatedByBuilder
withCreatedByBuilder(?CreatedByBuilder $createdBy)
Definition
ZoneBuilder.php:325
Commercetools\Api\Models\Zone\ZoneBuilder\of
static of()
Definition
ZoneBuilder.php:348
Commercetools\Api\Models\Zone\ZoneBuilder\getVersion
getVersion()
Definition
ZoneBuilder.php:107
Commercetools\Api\Models\Zone\ZoneBuilder\getDescription
getDescription()
Definition
ZoneBuilder.php:184
Commercetools\Api\Models\Zone\ZoneBuilder\getLastModifiedBy
getLastModifiedBy()
Definition
ZoneBuilder.php:140
Commercetools\Api\Models\Zone\ZoneBuilder\withVersion
withVersion(?int $version)
Definition
ZoneBuilder.php:215
Commercetools\Api\Models\Zone\ZoneBuilder\withLastModifiedByBuilder
withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
Definition
ZoneBuilder.php:314
Commercetools\Api\Models\Zone\ZoneModel
Definition
ZoneModel.php:28
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\BaseResource
Definition
BaseResource.php:250
Commercetools\Api\Models\Common\CreatedBy
Definition
CreatedBy.php:16
Commercetools\Api\Models\Common\LastModifiedBy
Definition
LastModifiedBy.php:16
Commercetools\Api\Models\Zone\Zone
Definition
Zone.php:19
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Zone
Definition
Location.php:9
Generated by
1.9.8