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
Common
ClientLoggingModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
10
11
use
Commercetools\Api\Models\Customer\CustomerReference
;
12
use
Commercetools\Api\Models\Customer\CustomerReferenceModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
ClientLoggingModel
extends
JsonObjectModel
implements
ClientLogging
23
{
28
protected
$clientId
;
29
34
protected
$externalUserId
;
35
40
protected
$customer
;
41
46
protected
$anonymousId
;
47
52
protected
$associate
;
53
54
58
public
function
__construct
(
59
?
string
$clientId
=
null
,
60
?
string
$externalUserId
=
null
,
61
?
CustomerReference
$customer
=
null
,
62
?
string
$anonymousId
=
null
,
63
?
CustomerReference
$associate
=
null
64
) {
65
$this->clientId =
$clientId
;
66
$this->externalUserId =
$externalUserId
;
67
$this->customer =
$customer
;
68
$this->anonymousId =
$anonymousId
;
69
$this->associate =
$associate
;
70
}
71
78
public
function
getClientId
()
79
{
80
if
(is_null($this->clientId)) {
82
$data = $this->
raw
(self::FIELD_CLIENT_ID);
83
if
(is_null($data)) {
84
return
null
;
85
}
86
$this->clientId = (string) $data;
87
}
88
89
return
$this->clientId
;
90
}
91
98
public
function
getExternalUserId
()
99
{
100
if
(is_null($this->externalUserId)) {
102
$data = $this->
raw
(self::FIELD_EXTERNAL_USER_ID);
103
if
(is_null($data)) {
104
return
null
;
105
}
106
$this->externalUserId = (string) $data;
107
}
108
109
return
$this->externalUserId
;
110
}
111
118
public
function
getCustomer
()
119
{
120
if
(is_null($this->customer)) {
122
$data = $this->
raw
(self::FIELD_CUSTOMER);
123
if
(is_null($data)) {
124
return
null
;
125
}
126
127
$this->customer = CustomerReferenceModel::of($data);
128
}
129
130
return
$this->customer
;
131
}
132
139
public
function
getAnonymousId
()
140
{
141
if
(is_null($this->anonymousId)) {
143
$data = $this->
raw
(self::FIELD_ANONYMOUS_ID);
144
if
(is_null($data)) {
145
return
null
;
146
}
147
$this->anonymousId = (string) $data;
148
}
149
150
return
$this->anonymousId
;
151
}
152
159
public
function
getAssociate
()
160
{
161
if
(is_null($this->associate)) {
163
$data = $this->
raw
(self::FIELD_ASSOCIATE);
164
if
(is_null($data)) {
165
return
null
;
166
}
167
168
$this->associate = CustomerReferenceModel::of($data);
169
}
170
171
return
$this->associate
;
172
}
173
174
178
public
function
setClientId
(?
string
$clientId
): void
179
{
180
$this->clientId =
$clientId
;
181
}
182
186
public
function
setExternalUserId
(?
string
$externalUserId
): void
187
{
188
$this->externalUserId =
$externalUserId
;
189
}
190
194
public
function
setCustomer
(?
CustomerReference
$customer
): void
195
{
196
$this->customer =
$customer
;
197
}
198
202
public
function
setAnonymousId
(?
string
$anonymousId
): void
203
{
204
$this->anonymousId =
$anonymousId
;
205
}
206
210
public
function
setAssociate
(?
CustomerReference
$associate
): void
211
{
212
$this->associate =
$associate
;
213
}
214
}
Commercetools\Api\Models\Common\ClientLoggingModel
Definition
ClientLoggingModel.php:23
Commercetools\Api\Models\Common\ClientLoggingModel\$clientId
$clientId
Definition
ClientLoggingModel.php:28
Commercetools\Api\Models\Common\ClientLoggingModel\getClientId
getClientId()
Definition
ClientLoggingModel.php:78
Commercetools\Api\Models\Common\ClientLoggingModel\$anonymousId
$anonymousId
Definition
ClientLoggingModel.php:46
Commercetools\Api\Models\Common\ClientLoggingModel\setAssociate
setAssociate(?CustomerReference $associate)
Definition
ClientLoggingModel.php:210
Commercetools\Api\Models\Common\ClientLoggingModel\$associate
$associate
Definition
ClientLoggingModel.php:52
Commercetools\Api\Models\Common\ClientLoggingModel\getExternalUserId
getExternalUserId()
Definition
ClientLoggingModel.php:98
Commercetools\Api\Models\Common\ClientLoggingModel\getCustomer
getCustomer()
Definition
ClientLoggingModel.php:118
Commercetools\Api\Models\Common\ClientLoggingModel\__construct
__construct(?string $clientId=null, ?string $externalUserId=null, ?CustomerReference $customer=null, ?string $anonymousId=null, ?CustomerReference $associate=null)
Definition
ClientLoggingModel.php:58
Commercetools\Api\Models\Common\ClientLoggingModel\$customer
$customer
Definition
ClientLoggingModel.php:40
Commercetools\Api\Models\Common\ClientLoggingModel\getAssociate
getAssociate()
Definition
ClientLoggingModel.php:159
Commercetools\Api\Models\Common\ClientLoggingModel\getAnonymousId
getAnonymousId()
Definition
ClientLoggingModel.php:139
Commercetools\Api\Models\Common\ClientLoggingModel\setExternalUserId
setExternalUserId(?string $externalUserId)
Definition
ClientLoggingModel.php:186
Commercetools\Api\Models\Common\ClientLoggingModel\setAnonymousId
setAnonymousId(?string $anonymousId)
Definition
ClientLoggingModel.php:202
Commercetools\Api\Models\Common\ClientLoggingModel\setClientId
setClientId(?string $clientId)
Definition
ClientLoggingModel.php:178
Commercetools\Api\Models\Common\ClientLoggingModel\setCustomer
setCustomer(?CustomerReference $customer)
Definition
ClientLoggingModel.php:194
Commercetools\Api\Models\Common\ClientLoggingModel\$externalUserId
$externalUserId
Definition
ClientLoggingModel.php:34
Commercetools\Api\Models\Customer\CustomerReferenceModel
Definition
CustomerReferenceModel.php:23
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\Api\Models\Common\ClientLogging
Definition
ClientLogging.php:16
Commercetools\Api\Models\Customer\CustomerReference
Definition
CustomerReference.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Common
Definition
Address.php:9
Generated by
1.9.8