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
MyCustomerChangePasswordModel.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
MyCustomerChangePasswordModel
extends
JsonObjectModel
implements
MyCustomerChangePassword
21
{
26
protected
$version
;
27
32
protected
$currentPassword
;
33
38
protected
$newPassword
;
39
40
44
public
function
__construct
(
45
?
int
$version
=
null
,
46
?
string
$currentPassword
=
null
,
47
?
string
$newPassword
=
null
48
) {
49
$this->version =
$version
;
50
$this->currentPassword =
$currentPassword
;
51
$this->newPassword =
$newPassword
;
52
}
53
60
public
function
getVersion
()
61
{
62
if
(is_null($this->version)) {
64
$data = $this->
raw
(self::FIELD_VERSION);
65
if
(is_null($data)) {
66
return
null
;
67
}
68
$this->version = (int) $data;
69
}
70
71
return
$this->version
;
72
}
73
81
public
function
getCurrentPassword
()
82
{
83
if
(is_null($this->currentPassword)) {
85
$data = $this->
raw
(self::FIELD_CURRENT_PASSWORD);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->currentPassword = (string) $data;
90
}
91
92
return
$this->currentPassword
;
93
}
94
101
public
function
getNewPassword
()
102
{
103
if
(is_null($this->newPassword)) {
105
$data = $this->
raw
(self::FIELD_NEW_PASSWORD);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->newPassword = (string) $data;
110
}
111
112
return
$this->newPassword
;
113
}
114
115
119
public
function
setVersion
(?
int
$version
): void
120
{
121
$this->version =
$version
;
122
}
123
127
public
function
setCurrentPassword
(?
string
$currentPassword
): void
128
{
129
$this->currentPassword =
$currentPassword
;
130
}
131
135
public
function
setNewPassword
(?
string
$newPassword
): void
136
{
137
$this->newPassword =
$newPassword
;
138
}
139
}
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel
Definition
MyCustomerChangePasswordModel.php:21
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\getCurrentPassword
getCurrentPassword()
Definition
MyCustomerChangePasswordModel.php:81
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\setCurrentPassword
setCurrentPassword(?string $currentPassword)
Definition
MyCustomerChangePasswordModel.php:127
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\setNewPassword
setNewPassword(?string $newPassword)
Definition
MyCustomerChangePasswordModel.php:135
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\getNewPassword
getNewPassword()
Definition
MyCustomerChangePasswordModel.php:101
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\setVersion
setVersion(?int $version)
Definition
MyCustomerChangePasswordModel.php:119
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\$version
$version
Definition
MyCustomerChangePasswordModel.php:26
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\getVersion
getVersion()
Definition
MyCustomerChangePasswordModel.php:60
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\$currentPassword
$currentPassword
Definition
MyCustomerChangePasswordModel.php:32
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\$newPassword
$newPassword
Definition
MyCustomerChangePasswordModel.php:38
Commercetools\Api\Models\Customer\MyCustomerChangePasswordModel\__construct
__construct(?int $version=null, ?string $currentPassword=null, ?string $newPassword=null)
Definition
MyCustomerChangePasswordModel.php:44
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\MyCustomerChangePassword
Definition
MyCustomerChangePassword.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition
Customer.php:9
Generated by
1.9.8