commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-history
src
Models
ChangeHistory
ModifiedByBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeHistory
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\Reference
;
18
use
Commercetools\History\Models\Common\ReferenceBuilder
;
19
23
final
class
ModifiedByBuilder
implements
Builder
24
{
29
private
$isPlatformClient;
30
35
private
$id;
36
41
private
$type;
42
47
private
$clientId;
48
53
private
$anonymousId;
54
59
private
$customer;
60
65
private
$associate;
66
73
public
function
getIsPlatformClient
()
74
{
75
return
$this->isPlatformClient;
76
}
77
85
public
function
getId
()
86
{
87
return
$this->id;
88
}
89
101
public
function
getType
()
102
{
103
return
$this->type;
104
}
105
113
public
function
getClientId
()
114
{
115
return
$this->clientId;
116
}
117
124
public
function
getAnonymousId
()
125
{
126
return
$this->anonymousId;
127
}
128
136
public
function
getCustomer
()
137
{
138
return
$this->customer instanceof
ReferenceBuilder
? $this->customer->
build
() : $this->customer;
139
}
140
147
public
function
getAssociate
()
148
{
149
return
$this->associate instanceof
ReferenceBuilder
? $this->associate->
build
() : $this->associate;
150
}
151
156
public
function
withIsPlatformClient
(?
bool
$isPlatformClient)
157
{
158
$this->isPlatformClient = $isPlatformClient;
159
160
return
$this;
161
}
162
167
public
function
withId
(?
string
$id)
168
{
169
$this->
id
= $id;
170
171
return
$this;
172
}
173
178
public
function
withType
(?
string
$type)
179
{
180
$this->type = $type;
181
182
return
$this;
183
}
184
189
public
function
withClientId
(?
string
$clientId)
190
{
191
$this->clientId = $clientId;
192
193
return
$this;
194
}
195
200
public
function
withAnonymousId
(?
string
$anonymousId)
201
{
202
$this->anonymousId = $anonymousId;
203
204
return
$this;
205
}
206
211
public
function
withCustomer
(?
Reference
$customer)
212
{
213
$this->customer = $customer;
214
215
return
$this;
216
}
217
222
public
function
withAssociate
(?
Reference
$associate)
223
{
224
$this->associate = $associate;
225
226
return
$this;
227
}
228
233
public
function
withCustomerBuilder
(?
ReferenceBuilder
$customer)
234
{
235
$this->customer = $customer;
236
237
return
$this;
238
}
239
244
public
function
withAssociateBuilder
(?
ReferenceBuilder
$associate)
245
{
246
$this->associate = $associate;
247
248
return
$this;
249
}
250
251
public
function
build
():
ModifiedBy
252
{
253
return
new
ModifiedByModel
(
254
$this->isPlatformClient,
255
$this->
id
,
256
$this->type,
257
$this->clientId,
258
$this->anonymousId,
259
$this->customer instanceof
ReferenceBuilder
? $this->customer->
build
() : $this->customer,
260
$this->associate instanceof
ReferenceBuilder
? $this->associate->
build
() : $this->associate
261
);
262
}
263
264
public
static
function
of
():
ModifiedByBuilder
265
{
266
return
new
self
();
267
}
268
}
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder
Definition
ModifiedByBuilder.php:24
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getClientId
getClientId()
Definition
ModifiedByBuilder.php:113
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getCustomer
getCustomer()
Definition
ModifiedByBuilder.php:136
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withCustomer
withCustomer(?Reference $customer)
Definition
ModifiedByBuilder.php:211
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getAssociate
getAssociate()
Definition
ModifiedByBuilder.php:147
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withType
withType(?string $type)
Definition
ModifiedByBuilder.php:178
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withId
withId(?string $id)
Definition
ModifiedByBuilder.php:167
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withAssociate
withAssociate(?Reference $associate)
Definition
ModifiedByBuilder.php:222
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getIsPlatformClient
getIsPlatformClient()
Definition
ModifiedByBuilder.php:73
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getAnonymousId
getAnonymousId()
Definition
ModifiedByBuilder.php:124
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getType
getType()
Definition
ModifiedByBuilder.php:101
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withIsPlatformClient
withIsPlatformClient(?bool $isPlatformClient)
Definition
ModifiedByBuilder.php:156
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\getId
getId()
Definition
ModifiedByBuilder.php:85
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withAnonymousId
withAnonymousId(?string $anonymousId)
Definition
ModifiedByBuilder.php:200
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\build
build()
Definition
ModifiedByBuilder.php:251
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\of
static of()
Definition
ModifiedByBuilder.php:264
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withAssociateBuilder
withAssociateBuilder(?ReferenceBuilder $associate)
Definition
ModifiedByBuilder.php:244
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withClientId
withClientId(?string $clientId)
Definition
ModifiedByBuilder.php:189
Commercetools\History\Models\ChangeHistory\ModifiedByBuilder\withCustomerBuilder
withCustomerBuilder(?ReferenceBuilder $customer)
Definition
ModifiedByBuilder.php:233
Commercetools\History\Models\ChangeHistory\ModifiedByModel
Definition
ModifiedByModel.php:23
Commercetools\History\Models\Common\ReferenceBuilder
Definition
ReferenceBuilder.php:22
Commercetools\History\Models\Common\ReferenceBuilder\build
build()
Definition
ReferenceBuilder.php:76
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\ChangeHistory\ModifiedBy
Definition
ModifiedBy.php:16
Commercetools\History\Models\Common\Reference
Definition
Reference.php:15
Commercetools\History\Models\ChangeHistory
Definition
ErrorObject.php:9
Generated by
1.9.8