commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
AssociateRole
AssociateRoleDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\AssociateRole
;
10
11
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
12
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
AssociateRoleDraftBuilder
implements
Builder
24
{
29
private
$key;
30
35
private
$name;
36
41
private
$buyerAssignable;
42
47
private
$permissions;
48
53
private
$custom;
54
61
public
function
getKey
()
62
{
63
return
$this->key;
64
}
65
72
public
function
getName
()
73
{
74
return
$this->name;
75
}
76
83
public
function
getBuyerAssignable
()
84
{
85
return
$this->buyerAssignable;
86
}
87
94
public
function
getPermissions
()
95
{
96
return
$this->permissions;
97
}
98
105
public
function
getCustom
()
106
{
107
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
108
}
109
114
public
function
withKey
(?
string
$key)
115
{
116
$this->key = $key;
117
118
return
$this;
119
}
120
125
public
function
withName
(?
string
$name)
126
{
127
$this->name = $name;
128
129
return
$this;
130
}
131
136
public
function
withBuyerAssignable
(?
bool
$buyerAssignable)
137
{
138
$this->buyerAssignable = $buyerAssignable;
139
140
return
$this;
141
}
142
147
public
function
withPermissions
(?array $permissions)
148
{
149
$this->permissions = $permissions;
150
151
return
$this;
152
}
153
158
public
function
withCustom
(?
CustomFieldsDraft
$custom)
159
{
160
$this->custom = $custom;
161
162
return
$this;
163
}
164
169
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
170
{
171
$this->custom = $custom;
172
173
return
$this;
174
}
175
176
public
function
build
():
AssociateRoleDraft
177
{
178
return
new
AssociateRoleDraftModel
(
179
$this->key,
180
$this->name,
181
$this->buyerAssignable,
182
$this->permissions,
183
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom
184
);
185
}
186
187
public
static
function
of
():
AssociateRoleDraftBuilder
188
{
189
return
new
self
();
190
}
191
}
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder
Definition:
AssociateRoleDraftBuilder.php:24
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withKey
withKey(?string $key)
Definition:
AssociateRoleDraftBuilder.php:114
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\getCustom
getCustom()
Definition:
AssociateRoleDraftBuilder.php:105
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\getName
getName()
Definition:
AssociateRoleDraftBuilder.php:72
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withName
withName(?string $name)
Definition:
AssociateRoleDraftBuilder.php:125
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withPermissions
withPermissions(?array $permissions)
Definition:
AssociateRoleDraftBuilder.php:147
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition:
AssociateRoleDraftBuilder.php:169
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\getPermissions
getPermissions()
Definition:
AssociateRoleDraftBuilder.php:94
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\getBuyerAssignable
getBuyerAssignable()
Definition:
AssociateRoleDraftBuilder.php:83
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withBuyerAssignable
withBuyerAssignable(?bool $buyerAssignable)
Definition:
AssociateRoleDraftBuilder.php:136
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\of
static of()
Definition:
AssociateRoleDraftBuilder.php:187
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition:
AssociateRoleDraftBuilder.php:158
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\build
build()
Definition:
AssociateRoleDraftBuilder.php:176
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftBuilder\getKey
getKey()
Definition:
AssociateRoleDraftBuilder.php:61
Commercetools\Api\Models\AssociateRole\AssociateRoleDraftModel
Definition:
AssociateRoleDraftModel.php:23
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition:
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition:
CustomFieldsDraftBuilder.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\AssociateRoleDraft
Definition:
AssociateRoleDraft.php:16
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition:
CustomFieldsDraft.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.1