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
222 public function getUpdateProductData()
223 {
224 if (is_null($this->updateProductData)) {
226 $data = $this->raw(self::FIELD_UPDATE_PRODUCT_DATA);
227 if (is_null($data)) {
228 return null;
229 }
230 $this->updateProductData = (bool) $data;
231 }
232
234 }
235
236
240 public function setEmail(?string $email): void
241 {
242 $this->email = $email;
243 }
244
248 public function setPassword(?string $password): void
249 {
250 $this->password = $password;
251 }
252
256 public function setAnonymousCartId(?string $anonymousCartId): void
257 {
258 $this->anonymousCartId = $anonymousCartId;
259 }
260
265 {
266 $this->anonymousCart = $anonymousCart;
267 }
268
273 {
274 $this->anonymousCartSignInMode = $anonymousCartSignInMode;
275 }
276
280 public function setAnonymousId(?string $anonymousId): void
281 {
282 $this->anonymousId = $anonymousId;
283 }
284
288 public function setUpdateProductData(?bool $updateProductData): void
289 {
290 $this->updateProductData = $updateProductData;
291 }
292}
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)