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
LastModifiedByBuilder.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\CustomerReferenceBuilder
;
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
LastModifiedByBuilder
implements
Builder
24
{
29
private
$clientId;
30
35
private
$externalUserId;
36
41
private
$customer;
42
47
private
$anonymousId;
48
53
private
$associate;
54
59
private
$attributedTo;
60
67
public
function
getClientId
()
68
{
69
return
$this->clientId;
70
}
71
78
public
function
getExternalUserId
()
79
{
80
return
$this->externalUserId;
81
}
82
89
public
function
getCustomer
()
90
{
91
return
$this->customer instanceof
CustomerReferenceBuilder
? $this->customer->
build
() : $this->customer;
92
}
93
100
public
function
getAnonymousId
()
101
{
102
return
$this->anonymousId;
103
}
104
111
public
function
getAssociate
()
112
{
113
return
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate;
114
}
115
122
public
function
getAttributedTo
()
123
{
124
return
$this->attributedTo instanceof
AttributionBuilder
? $this->attributedTo->
build
() : $this->attributedTo;
125
}
126
131
public
function
withClientId
(?
string
$clientId)
132
{
133
$this->clientId = $clientId;
134
135
return
$this;
136
}
137
142
public
function
withExternalUserId
(?
string
$externalUserId)
143
{
144
$this->externalUserId = $externalUserId;
145
146
return
$this;
147
}
148
153
public
function
withCustomer
(?
CustomerReference
$customer)
154
{
155
$this->customer = $customer;
156
157
return
$this;
158
}
159
164
public
function
withAnonymousId
(?
string
$anonymousId)
165
{
166
$this->anonymousId = $anonymousId;
167
168
return
$this;
169
}
170
175
public
function
withAssociate
(?
CustomerReference
$associate)
176
{
177
$this->associate = $associate;
178
179
return
$this;
180
}
181
186
public
function
withAttributedTo
(?
Attribution
$attributedTo)
187
{
188
$this->attributedTo = $attributedTo;
189
190
return
$this;
191
}
192
197
public
function
withCustomerBuilder
(?
CustomerReferenceBuilder
$customer)
198
{
199
$this->customer = $customer;
200
201
return
$this;
202
}
203
208
public
function
withAssociateBuilder
(?
CustomerReferenceBuilder
$associate)
209
{
210
$this->associate = $associate;
211
212
return
$this;
213
}
214
219
public
function
withAttributedToBuilder
(?
AttributionBuilder
$attributedTo)
220
{
221
$this->attributedTo = $attributedTo;
222
223
return
$this;
224
}
225
226
public
function
build
():
LastModifiedBy
227
{
228
return
new
LastModifiedByModel
(
229
$this->clientId,
230
$this->externalUserId,
231
$this->customer instanceof
CustomerReferenceBuilder
? $this->customer->
build
() : $this->customer,
232
$this->anonymousId,
233
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate,
234
$this->attributedTo instanceof
AttributionBuilder
? $this->attributedTo->
build
() : $this->attributedTo
235
);
236
}
237
238
public
static
function
of
():
LastModifiedByBuilder
239
{
240
return
new
self
();
241
}
242
}
Commercetools\Api\Models\Common\AttributionBuilder
Definition
AttributionBuilder.php:22
Commercetools\Api\Models\Common\AttributionBuilder\build
build()
Definition
AttributionBuilder.php:80
Commercetools\Api\Models\Common\LastModifiedByBuilder
Definition
LastModifiedByBuilder.php:24
Commercetools\Api\Models\Common\LastModifiedByBuilder\withAttributedTo
withAttributedTo(?Attribution $attributedTo)
Definition
LastModifiedByBuilder.php:186
Commercetools\Api\Models\Common\LastModifiedByBuilder\build
build()
Definition
LastModifiedByBuilder.php:226
Commercetools\Api\Models\Common\LastModifiedByBuilder\withCustomer
withCustomer(?CustomerReference $customer)
Definition
LastModifiedByBuilder.php:153
Commercetools\Api\Models\Common\LastModifiedByBuilder\withClientId
withClientId(?string $clientId)
Definition
LastModifiedByBuilder.php:131
Commercetools\Api\Models\Common\LastModifiedByBuilder\getAssociate
getAssociate()
Definition
LastModifiedByBuilder.php:111
Commercetools\Api\Models\Common\LastModifiedByBuilder\withAnonymousId
withAnonymousId(?string $anonymousId)
Definition
LastModifiedByBuilder.php:164
Commercetools\Api\Models\Common\LastModifiedByBuilder\withAssociate
withAssociate(?CustomerReference $associate)
Definition
LastModifiedByBuilder.php:175
Commercetools\Api\Models\Common\LastModifiedByBuilder\withExternalUserId
withExternalUserId(?string $externalUserId)
Definition
LastModifiedByBuilder.php:142
Commercetools\Api\Models\Common\LastModifiedByBuilder\getAttributedTo
getAttributedTo()
Definition
LastModifiedByBuilder.php:122
Commercetools\Api\Models\Common\LastModifiedByBuilder\getCustomer
getCustomer()
Definition
LastModifiedByBuilder.php:89
Commercetools\Api\Models\Common\LastModifiedByBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerReferenceBuilder $customer)
Definition
LastModifiedByBuilder.php:197
Commercetools\Api\Models\Common\LastModifiedByBuilder\withAttributedToBuilder
withAttributedToBuilder(?AttributionBuilder $attributedTo)
Definition
LastModifiedByBuilder.php:219
Commercetools\Api\Models\Common\LastModifiedByBuilder\of
static of()
Definition
LastModifiedByBuilder.php:238
Commercetools\Api\Models\Common\LastModifiedByBuilder\getAnonymousId
getAnonymousId()
Definition
LastModifiedByBuilder.php:100
Commercetools\Api\Models\Common\LastModifiedByBuilder\withAssociateBuilder
withAssociateBuilder(?CustomerReferenceBuilder $associate)
Definition
LastModifiedByBuilder.php:208
Commercetools\Api\Models\Common\LastModifiedByBuilder\getExternalUserId
getExternalUserId()
Definition
LastModifiedByBuilder.php:78
Commercetools\Api\Models\Common\LastModifiedByBuilder\getClientId
getClientId()
Definition
LastModifiedByBuilder.php:67
Commercetools\Api\Models\Common\LastModifiedByModel
Definition
LastModifiedByModel.php:23
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
Definition
CustomerReferenceBuilder.php:24
Commercetools\Api\Models\Customer\CustomerReferenceBuilder\build
build()
Definition
CustomerReferenceBuilder.php:92
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\Attribution
Definition
Attribution.php:15
Commercetools\Api\Models\Common\LastModifiedBy
Definition
LastModifiedBy.php:16
Commercetools\Api\Models\Customer\CustomerReference
Definition
CustomerReference.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Common
Definition
Address.php:9
Generated by
1.9.8