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
AssociateRole
AssociateRoleBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\AssociateRole
;
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\Api\Models\Type\CustomFields
;
18
use
Commercetools\Api\Models\Type\CustomFieldsBuilder
;
19
use
Commercetools\Base\Builder
;
20
use
Commercetools\Base\DateTimeImmutableCollection
;
21
use
Commercetools\Base\JsonObject
;
22
use
Commercetools\Base\JsonObjectModel
;
23
use
Commercetools\Base\MapperFactory
;
24
use DateTimeImmutable;
25
use stdClass;
26
30
final
class
AssociateRoleBuilder
implements
Builder
31
{
36
private
$id;
37
42
private
$version;
43
48
private
$createdAt;
49
54
private
$lastModifiedAt;
55
60
private
$lastModifiedBy;
61
66
private
$createdBy;
67
72
private
$key;
73
78
private
$buyerAssignable;
79
84
private
$name;
85
90
private
$permissions;
91
96
private
$custom;
97
104
public
function
getId
()
105
{
106
return
$this->id;
107
}
108
115
public
function
getVersion
()
116
{
117
return
$this->version;
118
}
119
126
public
function
getCreatedAt
()
127
{
128
return
$this->createdAt;
129
}
130
137
public
function
getLastModifiedAt
()
138
{
139
return
$this->lastModifiedAt;
140
}
141
148
public
function
getLastModifiedBy
()
149
{
150
return
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy;
151
}
152
159
public
function
getCreatedBy
()
160
{
161
return
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy;
162
}
163
170
public
function
getKey
()
171
{
172
return
$this->key;
173
}
174
181
public
function
getBuyerAssignable
()
182
{
183
return
$this->buyerAssignable;
184
}
185
192
public
function
getName
()
193
{
194
return
$this->name;
195
}
196
203
public
function
getPermissions
()
204
{
205
return
$this->permissions;
206
}
207
214
public
function
getCustom
()
215
{
216
return
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom;
217
}
218
223
public
function
withId
(?
string
$id)
224
{
225
$this->
id
= $id;
226
227
return
$this;
228
}
229
234
public
function
withVersion
(?
int
$version)
235
{
236
$this->version = $version;
237
238
return
$this;
239
}
240
245
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
246
{
247
$this->createdAt = $createdAt;
248
249
return
$this;
250
}
251
256
public
function
withLastModifiedAt
(?DateTimeImmutable $lastModifiedAt)
257
{
258
$this->lastModifiedAt = $lastModifiedAt;
259
260
return
$this;
261
}
262
267
public
function
withLastModifiedBy
(?
LastModifiedBy
$lastModifiedBy)
268
{
269
$this->lastModifiedBy = $lastModifiedBy;
270
271
return
$this;
272
}
273
278
public
function
withCreatedBy
(?
CreatedBy
$createdBy)
279
{
280
$this->createdBy = $createdBy;
281
282
return
$this;
283
}
284
289
public
function
withKey
(?
string
$key)
290
{
291
$this->key = $key;
292
293
return
$this;
294
}
295
300
public
function
withBuyerAssignable
(?
bool
$buyerAssignable)
301
{
302
$this->buyerAssignable = $buyerAssignable;
303
304
return
$this;
305
}
306
311
public
function
withName
(?
string
$name)
312
{
313
$this->name = $name;
314
315
return
$this;
316
}
317
322
public
function
withPermissions
(?array $permissions)
323
{
324
$this->permissions = $permissions;
325
326
return
$this;
327
}
328
333
public
function
withCustom
(?
CustomFields
$custom)
334
{
335
$this->custom = $custom;
336
337
return
$this;
338
}
339
344
public
function
withLastModifiedByBuilder
(?
LastModifiedByBuilder
$lastModifiedBy)
345
{
346
$this->lastModifiedBy = $lastModifiedBy;
347
348
return
$this;
349
}
350
355
public
function
withCreatedByBuilder
(?
CreatedByBuilder
$createdBy)
356
{
357
$this->createdBy = $createdBy;
358
359
return
$this;
360
}
361
366
public
function
withCustomBuilder
(?
CustomFieldsBuilder
$custom)
367
{
368
$this->custom = $custom;
369
370
return
$this;
371
}
372
373
public
function
build
():
AssociateRole
374
{
375
return
new
AssociateRoleModel
(
376
$this->
id
,
377
$this->version,
378
$this->createdAt,
379
$this->lastModifiedAt,
380
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy,
381
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy,
382
$this->key,
383
$this->buyerAssignable,
384
$this->name,
385
$this->permissions,
386
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom
387
);
388
}
389
390
public
static
function
of
():
AssociateRoleBuilder
391
{
392
return
new
self
();
393
}
394
}
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder
Definition
AssociateRoleBuilder.php:31
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getPermissions
getPermissions()
Definition
AssociateRoleBuilder.php:203
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\of
static of()
Definition
AssociateRoleBuilder.php:390
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\build
build()
Definition
AssociateRoleBuilder.php:373
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withKey
withKey(?string $key)
Definition
AssociateRoleBuilder.php:289
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withBuyerAssignable
withBuyerAssignable(?bool $buyerAssignable)
Definition
AssociateRoleBuilder.php:300
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getName
getName()
Definition
AssociateRoleBuilder.php:192
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsBuilder $custom)
Definition
AssociateRoleBuilder.php:366
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getLastModifiedBy
getLastModifiedBy()
Definition
AssociateRoleBuilder.php:148
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getBuyerAssignable
getBuyerAssignable()
Definition
AssociateRoleBuilder.php:181
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withCustom
withCustom(?CustomFields $custom)
Definition
AssociateRoleBuilder.php:333
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withCreatedByBuilder
withCreatedByBuilder(?CreatedByBuilder $createdBy)
Definition
AssociateRoleBuilder.php:355
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withId
withId(?string $id)
Definition
AssociateRoleBuilder.php:223
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withLastModifiedByBuilder
withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
Definition
AssociateRoleBuilder.php:344
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getLastModifiedAt
getLastModifiedAt()
Definition
AssociateRoleBuilder.php:137
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getId
getId()
Definition
AssociateRoleBuilder.php:104
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getCustom
getCustom()
Definition
AssociateRoleBuilder.php:214
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withLastModifiedAt
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Definition
AssociateRoleBuilder.php:256
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withPermissions
withPermissions(?array $permissions)
Definition
AssociateRoleBuilder.php:322
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withCreatedBy
withCreatedBy(?CreatedBy $createdBy)
Definition
AssociateRoleBuilder.php:278
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withName
withName(?string $name)
Definition
AssociateRoleBuilder.php:311
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getCreatedAt
getCreatedAt()
Definition
AssociateRoleBuilder.php:126
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getVersion
getVersion()
Definition
AssociateRoleBuilder.php:115
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withLastModifiedBy
withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
Definition
AssociateRoleBuilder.php:267
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getKey
getKey()
Definition
AssociateRoleBuilder.php:170
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withVersion
withVersion(?int $version)
Definition
AssociateRoleBuilder.php:234
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\getCreatedBy
getCreatedBy()
Definition
AssociateRoleBuilder.php:159
Commercetools\Api\Models\AssociateRole\AssociateRoleBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
AssociateRoleBuilder.php:245
Commercetools\Api\Models\AssociateRole\AssociateRoleModel
Definition
AssociateRoleModel.php:30
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\Type\CustomFieldsBuilder
Definition
CustomFieldsBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsBuilder\build
build()
Definition
CustomFieldsBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\AssociateRole\AssociateRole
Definition
AssociateRole.php:20
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\Type\CustomFields
Definition
CustomFields.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\AssociateRole
Definition
AssociateRole.php:9
Generated by
1.9.8