commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerChangePasswordModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $id;
27
32 protected $version;
33
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
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}
__construct(?string $id=null, ?int $version=null, ?string $currentPassword=null, ?string $newPassword=null)