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
Customer
CustomerTokenBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
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 DateTimeImmutable;
17
use stdClass;
18
22
final
class
CustomerTokenBuilder
implements
Builder
23
{
28
private
$id;
29
34
private
$customerId;
35
40
private
$value;
41
46
private
$expiresAt;
47
52
private
$createdAt;
53
58
private
$lastModifiedAt;
59
66
public
function
getId
()
67
{
68
return
$this->id;
69
}
70
77
public
function
getCustomerId
()
78
{
79
return
$this->customerId;
80
}
81
88
public
function
getValue
()
89
{
90
return
$this->value;
91
}
92
99
public
function
getExpiresAt
()
100
{
101
return
$this->expiresAt;
102
}
103
110
public
function
getCreatedAt
()
111
{
112
return
$this->createdAt;
113
}
114
121
public
function
getLastModifiedAt
()
122
{
123
return
$this->lastModifiedAt;
124
}
125
130
public
function
withId
(?
string
$id)
131
{
132
$this->
id
= $id;
133
134
return
$this;
135
}
136
141
public
function
withCustomerId
(?
string
$customerId)
142
{
143
$this->customerId = $customerId;
144
145
return
$this;
146
}
147
152
public
function
withValue
(?
string
$value)
153
{
154
$this->value = $value;
155
156
return
$this;
157
}
158
163
public
function
withExpiresAt
(?DateTimeImmutable $expiresAt)
164
{
165
$this->expiresAt = $expiresAt;
166
167
return
$this;
168
}
169
174
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
175
{
176
$this->createdAt = $createdAt;
177
178
return
$this;
179
}
180
185
public
function
withLastModifiedAt
(?DateTimeImmutable $lastModifiedAt)
186
{
187
$this->lastModifiedAt = $lastModifiedAt;
188
189
return
$this;
190
}
191
192
193
public
function
build
():
CustomerToken
194
{
195
return
new
CustomerTokenModel
(
196
$this->
id
,
197
$this->customerId,
198
$this->value,
199
$this->expiresAt,
200
$this->createdAt,
201
$this->lastModifiedAt
202
);
203
}
204
205
public
static
function
of
():
CustomerTokenBuilder
206
{
207
return
new
self
();
208
}
209
}
Commercetools\Api\Models\Customer\CustomerTokenBuilder
Definition
CustomerTokenBuilder.php:23
Commercetools\Api\Models\Customer\CustomerTokenBuilder\of
static of()
Definition
CustomerTokenBuilder.php:205
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withCustomerId
withCustomerId(?string $customerId)
Definition
CustomerTokenBuilder.php:141
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
CustomerTokenBuilder.php:174
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getCustomerId
getCustomerId()
Definition
CustomerTokenBuilder.php:77
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withId
withId(?string $id)
Definition
CustomerTokenBuilder.php:130
Commercetools\Api\Models\Customer\CustomerTokenBuilder\build
build()
Definition
CustomerTokenBuilder.php:193
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getId
getId()
Definition
CustomerTokenBuilder.php:66
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getCreatedAt
getCreatedAt()
Definition
CustomerTokenBuilder.php:110
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withLastModifiedAt
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Definition
CustomerTokenBuilder.php:185
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getLastModifiedAt
getLastModifiedAt()
Definition
CustomerTokenBuilder.php:121
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withValue
withValue(?string $value)
Definition
CustomerTokenBuilder.php:152
Commercetools\Api\Models\Customer\CustomerTokenBuilder\withExpiresAt
withExpiresAt(?DateTimeImmutable $expiresAt)
Definition
CustomerTokenBuilder.php:163
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getValue
getValue()
Definition
CustomerTokenBuilder.php:88
Commercetools\Api\Models\Customer\CustomerTokenBuilder\getExpiresAt
getExpiresAt()
Definition
CustomerTokenBuilder.php:99
Commercetools\Api\Models\Customer\CustomerTokenModel
Definition
CustomerTokenModel.php:22
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Customer\CustomerToken
Definition
CustomerToken.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition
Customer.php:9
Generated by
1.9.8