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
ModifiedByModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeHistory
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
use
Commercetools\History\Models\Common\Reference
;
17
use
Commercetools\History\Models\Common\ReferenceModel
;
18
22
final
class
ModifiedByModel
extends
JsonObjectModel
implements
ModifiedBy
23
{
24
25
30
protected
$isPlatformClient
;
31
36
protected
$id
;
37
42
protected
$type
;
43
48
protected
$clientId
;
49
54
protected
$anonymousId
;
55
60
protected
$customer
;
61
66
protected
$associate
;
67
68
72
public
function
__construct
(
73
?
bool
$isPlatformClient
=
null
,
74
?
string
$id
=
null
,
75
?
string
$type
=
null
,
76
?
string
$clientId
=
null
,
77
?
string
$anonymousId
=
null
,
78
?
Reference
$customer
=
null
,
79
?
Reference
$associate
=
null
80
) {
81
$this->isPlatformClient =
$isPlatformClient
;
82
$this->
id
=
$id
;
83
$this->type =
$type
;
84
$this->clientId =
$clientId
;
85
$this->anonymousId =
$anonymousId
;
86
$this->customer =
$customer
;
87
$this->associate =
$associate
;
88
89
}
90
97
public
function
getIsPlatformClient
()
98
{
99
if
(is_null($this->isPlatformClient)) {
101
$data = $this->
raw
(self::FIELD_IS_PLATFORM_CLIENT);
102
if
(is_null($data)) {
103
return
null
;
104
}
105
$this->isPlatformClient = (bool) $data;
106
}
107
108
return
$this->isPlatformClient
;
109
}
110
118
public
function
getId
()
119
{
120
if
(is_null($this->
id
)) {
122
$data = $this->
raw
(self::FIELD_ID);
123
if
(is_null($data)) {
124
return
null
;
125
}
126
$this->
id
= (string) $data;
127
}
128
129
return
$this->id
;
130
}
131
143
public
function
getType
()
144
{
145
if
(is_null($this->type)) {
147
$data = $this->
raw
(self::FIELD_TYPE);
148
if
(is_null($data)) {
149
return
null
;
150
}
151
$this->type = (string) $data;
152
}
153
154
return
$this->type
;
155
}
156
164
public
function
getClientId
()
165
{
166
if
(is_null($this->clientId)) {
168
$data = $this->
raw
(self::FIELD_CLIENT_ID);
169
if
(is_null($data)) {
170
return
null
;
171
}
172
$this->clientId = (string) $data;
173
}
174
175
return
$this->clientId
;
176
}
177
184
public
function
getAnonymousId
()
185
{
186
if
(is_null($this->anonymousId)) {
188
$data = $this->
raw
(self::FIELD_ANONYMOUS_ID);
189
if
(is_null($data)) {
190
return
null
;
191
}
192
$this->anonymousId = (string) $data;
193
}
194
195
return
$this->anonymousId
;
196
}
197
205
public
function
getCustomer
()
206
{
207
if
(is_null($this->customer)) {
209
$data = $this->
raw
(self::FIELD_CUSTOMER);
210
if
(is_null($data)) {
211
return
null
;
212
}
213
214
$this->customer = ReferenceModel::of($data);
215
}
216
217
return
$this->customer
;
218
}
219
226
public
function
getAssociate
()
227
{
228
if
(is_null($this->associate)) {
230
$data = $this->
raw
(self::FIELD_ASSOCIATE);
231
if
(is_null($data)) {
232
return
null
;
233
}
234
235
$this->associate = ReferenceModel::of($data);
236
}
237
238
return
$this->associate
;
239
}
240
241
245
public
function
setIsPlatformClient
(?
bool
$isPlatformClient
): void
246
{
247
$this->isPlatformClient =
$isPlatformClient
;
248
}
249
253
public
function
setId
(?
string
$id
): void
254
{
255
$this->
id
=
$id
;
256
}
257
261
public
function
setType
(?
string
$type
): void
262
{
263
$this->type =
$type
;
264
}
265
269
public
function
setClientId
(?
string
$clientId
): void
270
{
271
$this->clientId =
$clientId
;
272
}
273
277
public
function
setAnonymousId
(?
string
$anonymousId
): void
278
{
279
$this->anonymousId =
$anonymousId
;
280
}
281
285
public
function
setCustomer
(?
Reference
$customer
): void
286
{
287
$this->customer =
$customer
;
288
}
289
293
public
function
setAssociate
(?
Reference
$associate
): void
294
{
295
$this->associate =
$associate
;
296
}
297
298
299
300
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
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\ModifiedByModel
Definition
ModifiedByModel.php:23
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getCustomer
getCustomer()
Definition
ModifiedByModel.php:205
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getType
getType()
Definition
ModifiedByModel.php:143
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$associate
$associate
Definition
ModifiedByModel.php:66
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getClientId
getClientId()
Definition
ModifiedByModel.php:164
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$clientId
$clientId
Definition
ModifiedByModel.php:48
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getAssociate
getAssociate()
Definition
ModifiedByModel.php:226
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$type
$type
Definition
ModifiedByModel.php:42
Commercetools\History\Models\ChangeHistory\ModifiedByModel\__construct
__construct(?bool $isPlatformClient=null, ?string $id=null, ?string $type=null, ?string $clientId=null, ?string $anonymousId=null, ?Reference $customer=null, ?Reference $associate=null)
Definition
ModifiedByModel.php:72
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getIsPlatformClient
getIsPlatformClient()
Definition
ModifiedByModel.php:97
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setCustomer
setCustomer(?Reference $customer)
Definition
ModifiedByModel.php:285
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$id
$id
Definition
ModifiedByModel.php:36
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setAssociate
setAssociate(?Reference $associate)
Definition
ModifiedByModel.php:293
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setAnonymousId
setAnonymousId(?string $anonymousId)
Definition
ModifiedByModel.php:277
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setType
setType(?string $type)
Definition
ModifiedByModel.php:261
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setClientId
setClientId(?string $clientId)
Definition
ModifiedByModel.php:269
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$anonymousId
$anonymousId
Definition
ModifiedByModel.php:54
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setId
setId(?string $id)
Definition
ModifiedByModel.php:253
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$customer
$customer
Definition
ModifiedByModel.php:60
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getAnonymousId
getAnonymousId()
Definition
ModifiedByModel.php:184
Commercetools\History\Models\ChangeHistory\ModifiedByModel\$isPlatformClient
$isPlatformClient
Definition
ModifiedByModel.php:30
Commercetools\History\Models\ChangeHistory\ModifiedByModel\getId
getId()
Definition
ModifiedByModel.php:118
Commercetools\History\Models\ChangeHistory\ModifiedByModel\setIsPlatformClient
setIsPlatformClient(?bool $isPlatformClient)
Definition
ModifiedByModel.php:245
Commercetools\History\Models\Common\ReferenceModel
Definition
ReferenceModel.php:21
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