commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerSigninModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $email;
29
34 protected $password;
35
41
46 protected $anonymousCart;
47
53
58 protected $anonymousId;
59
65
66
70 public function __construct(
71 ?string $email = null,
72 ?string $password = null,
73 ?string $anonymousCartId = null,
75 ?string $anonymousCartSignInMode = null,
76 ?string $anonymousId = null,
77 ?bool $updateProductData = null
78 ) {
79 $this->email = $email;
80 $this->password = $password;
81 $this->anonymousCartId = $anonymousCartId;
82 $this->anonymousCart = $anonymousCart;
83 $this->anonymousCartSignInMode = $anonymousCartSignInMode;
84 $this->anonymousId = $anonymousId;
85 $this->updateProductData = $updateProductData;
86 }
87
94 public function getEmail()
95 {
96 if (is_null($this->email)) {
98 $data = $this->raw(self::FIELD_EMAIL);
99 if (is_null($data)) {
100 return null;
101 }
102 $this->email = (string) $data;
103 }
104
105 return $this->email;
106 }
107
114 public function getPassword()
115 {
116 if (is_null($this->password)) {
118 $data = $this->raw(self::FIELD_PASSWORD);
119 if (is_null($data)) {
120 return null;
121 }
122 $this->password = (string) $data;
123 }
124
125 return $this->password;
126 }
127
134 public function getAnonymousCartId()
135 {
136 if (is_null($this->anonymousCartId)) {
138 $data = $this->raw(self::FIELD_ANONYMOUS_CART_ID);
139 if (is_null($data)) {
140 return null;
141 }
142 $this->anonymousCartId = (string) $data;
143 }
144
146 }
147
154 public function getAnonymousCart()
155 {
156 if (is_null($this->anonymousCart)) {
158 $data = $this->raw(self::FIELD_ANONYMOUS_CART);
159 if (is_null($data)) {
160 return null;
161 }
162
163 $this->anonymousCart = CartResourceIdentifierModel::of($data);
164 }
165
167 }
168
179 {
180 if (is_null($this->anonymousCartSignInMode)) {
182 $data = $this->raw(self::FIELD_ANONYMOUS_CART_SIGN_IN_MODE);
183 if (is_null($data)) {
184 return null;
185 }
186 $this->anonymousCartSignInMode = (string) $data;
187 }
188
190 }
191
199 public function getAnonymousId()
200 {
201 if (is_null($this->anonymousId)) {
203 $data = $this->raw(self::FIELD_ANONYMOUS_ID);
204 if (is_null($data)) {
205 return null;
206 }
207 $this->anonymousId = (string) $data;
208 }
209
210 return $this->anonymousId;
211 }
212
219 public function getUpdateProductData()
220 {
221 if (is_null($this->updateProductData)) {
223 $data = $this->raw(self::FIELD_UPDATE_PRODUCT_DATA);
224 if (is_null($data)) {
225 return null;
226 }
227 $this->updateProductData = (bool) $data;
228 }
229
231 }
232
233
237 public function setEmail(?string $email): void
238 {
239 $this->email = $email;
240 }
241
245 public function setPassword(?string $password): void
246 {
247 $this->password = $password;
248 }
249
253 public function setAnonymousCartId(?string $anonymousCartId): void
254 {
255 $this->anonymousCartId = $anonymousCartId;
256 }
257
262 {
263 $this->anonymousCart = $anonymousCart;
264 }
265
270 {
271 $this->anonymousCartSignInMode = $anonymousCartSignInMode;
272 }
273
277 public function setAnonymousId(?string $anonymousId): void
278 {
279 $this->anonymousId = $anonymousId;
280 }
281
285 public function setUpdateProductData(?bool $updateProductData): void
286 {
287 $this->updateProductData = $updateProductData;
288 }
289}
setAnonymousCart(?CartResourceIdentifier $anonymousCart)
__construct(?string $email=null, ?string $password=null, ?string $anonymousCartId=null, ?CartResourceIdentifier $anonymousCart=null, ?string $anonymousCartSignInMode=null, ?string $anonymousId=null, ?bool $updateProductData=null)