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
CustomerChangePasswordModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
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
20
final
class
CustomerChangePasswordModel
extends
JsonObjectModel
implements
CustomerChangePassword
21
{
26
protected
$id
;
27
32
protected
$version
;
33
38
protected
$currentPassword
;
39
44
protected
$newPassword
;
45
46
50
public
function
__construct
(
51
?
string
$id
=
null
,
52
?
int
$version
=
null
,
53
?
string
$currentPassword
=
null
,
54
?
string
$newPassword
=
null
55
) {
56
$this->
id
=
$id
;
57
$this->version =
$version
;
58
$this->currentPassword =
$currentPassword
;
59
$this->newPassword =
$newPassword
;
60
}
61
68
public
function
getId
()
69
{
70
if
(is_null($this->
id
)) {
72
$data = $this->
raw
(self::FIELD_ID);
73
if
(is_null($data)) {
74
return
null
;
75
}
76
$this->
id
= (string) $data;
77
}
78
79
return
$this->id
;
80
}
81
88
public
function
getVersion
()
89
{
90
if
(is_null($this->version)) {
92
$data = $this->
raw
(self::FIELD_VERSION);
93
if
(is_null($data)) {
94
return
null
;
95
}
96
$this->version = (int) $data;
97
}
98
99
return
$this->version
;
100
}
101
109
public
function
getCurrentPassword
()
110
{
111
if
(is_null($this->currentPassword)) {
113
$data = $this->
raw
(self::FIELD_CURRENT_PASSWORD);
114
if
(is_null($data)) {
115
return
null
;
116
}
117
$this->currentPassword = (string) $data;
118
}
119
120
return
$this->currentPassword
;
121
}
122
129
public
function
getNewPassword
()
130
{
131
if
(is_null($this->newPassword)) {
133
$data = $this->
raw
(self::FIELD_NEW_PASSWORD);
134
if
(is_null($data)) {
135
return
null
;
136
}
137
$this->newPassword = (string) $data;
138
}
139
140
return
$this->newPassword
;
141
}
142
143
147
public
function
setId
(?
string
$id
): void
148
{
149
$this->
id
=
$id
;
150
}
151
155
public
function
setVersion
(?
int
$version
): void
156
{
157
$this->version =
$version
;
158
}
159
163
public
function
setCurrentPassword
(?
string
$currentPassword
): void
164
{
165
$this->currentPassword =
$currentPassword
;
166
}
167
171
public
function
setNewPassword
(?
string
$newPassword
): void
172
{
173
$this->newPassword =
$newPassword
;
174
}
175
}
Commercetools\Api\Models\Customer\CustomerChangePasswordModel
Definition
CustomerChangePasswordModel.php:21
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\$newPassword
$newPassword
Definition
CustomerChangePasswordModel.php:44
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\$version
$version
Definition
CustomerChangePasswordModel.php:32
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\$id
$id
Definition
CustomerChangePasswordModel.php:26
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\getCurrentPassword
getCurrentPassword()
Definition
CustomerChangePasswordModel.php:109
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\__construct
__construct(?string $id=null, ?int $version=null, ?string $currentPassword=null, ?string $newPassword=null)
Definition
CustomerChangePasswordModel.php:50
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\setCurrentPassword
setCurrentPassword(?string $currentPassword)
Definition
CustomerChangePasswordModel.php:163
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\setVersion
setVersion(?int $version)
Definition
CustomerChangePasswordModel.php:155
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\$currentPassword
$currentPassword
Definition
CustomerChangePasswordModel.php:38
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\setId
setId(?string $id)
Definition
CustomerChangePasswordModel.php:147
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\setNewPassword
setNewPassword(?string $newPassword)
Definition
CustomerChangePasswordModel.php:171
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\getId
getId()
Definition
CustomerChangePasswordModel.php:68
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\getNewPassword
getNewPassword()
Definition
CustomerChangePasswordModel.php:129
Commercetools\Api\Models\Customer\CustomerChangePasswordModel\getVersion
getVersion()
Definition
CustomerChangePasswordModel.php:88
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\Customer\CustomerChangePassword
Definition
CustomerChangePassword.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition
Customer.php:9
Generated by
1.9.8