commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerImportBuilder.php
1<?php
2
3declare(strict_types=1);
10
23use DateTimeImmutable;
24use stdClass;
25
29final class CustomerImportBuilder implements Builder
30{
35 private $key;
36
41 private $customerNumber;
42
47 private $email;
48
53 private $password;
54
59 private $stores;
60
65 private $firstName;
66
71 private $lastName;
72
77 private $middleName;
78
83 private $title;
84
89 private $salutation;
90
95 private $externalId;
96
101 private $dateOfBirth;
102
107 private $companyName;
108
113 private $vatId;
114
119 private $isEmailVerified;
120
125 private $customerGroup;
126
131 private $addresses;
132
137 private $defaultBillingAddress;
138
143 private $billingAddresses;
144
149 private $defaultShippingAddress;
150
155 private $shippingAddresses;
156
161 private $locale;
162
167 private $custom;
168
173 private $authenticationMode;
174
181 public function getKey()
182 {
183 return $this->key;
184 }
185
192 public function getCustomerNumber()
193 {
194 return $this->customerNumber;
195 }
196
203 public function getEmail()
204 {
205 return $this->email;
206 }
207
214 public function getPassword()
215 {
216 return $this->password;
217 }
218
225 public function getStores()
226 {
227 return $this->stores;
228 }
229
236 public function getFirstName()
237 {
238 return $this->firstName;
239 }
240
247 public function getLastName()
248 {
249 return $this->lastName;
250 }
251
258 public function getMiddleName()
259 {
260 return $this->middleName;
261 }
262
269 public function getTitle()
270 {
271 return $this->title;
272 }
273
280 public function getSalutation()
281 {
282 return $this->salutation;
283 }
284
291 public function getExternalId()
292 {
293 return $this->externalId;
294 }
295
302 public function getDateOfBirth()
303 {
304 return $this->dateOfBirth;
305 }
306
313 public function getCompanyName()
314 {
315 return $this->companyName;
316 }
317
324 public function getVatId()
325 {
326 return $this->vatId;
327 }
328
335 public function getIsEmailVerified()
336 {
337 return $this->isEmailVerified;
338 }
339
346 public function getCustomerGroup()
347 {
348 return $this->customerGroup instanceof CustomerGroupKeyReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;
349 }
350
357 public function getAddresses()
358 {
359 return $this->addresses;
360 }
361
368 public function getDefaultBillingAddress()
369 {
370 return $this->defaultBillingAddress;
371 }
372
379 public function getBillingAddresses()
380 {
381 return $this->billingAddresses;
382 }
383
391 {
392 return $this->defaultShippingAddress;
393 }
394
401 public function getShippingAddresses()
402 {
403 return $this->shippingAddresses;
404 }
405
412 public function getLocale()
413 {
414 return $this->locale;
415 }
416
423 public function getCustom()
424 {
425 return $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom;
426 }
427
437 public function getAuthenticationMode()
438 {
439 return $this->authenticationMode;
440 }
441
446 public function withKey(?string $key)
447 {
448 $this->key = $key;
449
450 return $this;
451 }
452
457 public function withCustomerNumber(?string $customerNumber)
458 {
459 $this->customerNumber = $customerNumber;
460
461 return $this;
462 }
463
468 public function withEmail(?string $email)
469 {
470 $this->email = $email;
471
472 return $this;
473 }
474
479 public function withPassword(?string $password)
480 {
481 $this->password = $password;
482
483 return $this;
484 }
485
490 public function withStores(?StoreKeyReferenceCollection $stores)
491 {
492 $this->stores = $stores;
493
494 return $this;
495 }
496
501 public function withFirstName(?string $firstName)
502 {
503 $this->firstName = $firstName;
504
505 return $this;
506 }
507
512 public function withLastName(?string $lastName)
513 {
514 $this->lastName = $lastName;
515
516 return $this;
517 }
518
523 public function withMiddleName(?string $middleName)
524 {
525 $this->middleName = $middleName;
526
527 return $this;
528 }
529
534 public function withTitle(?string $title)
535 {
536 $this->title = $title;
537
538 return $this;
539 }
540
545 public function withSalutation(?string $salutation)
546 {
547 $this->salutation = $salutation;
548
549 return $this;
550 }
551
556 public function withExternalId(?string $externalId)
557 {
558 $this->externalId = $externalId;
559
560 return $this;
561 }
562
567 public function withDateOfBirth(?DateTimeImmutable $dateOfBirth)
568 {
569 $this->dateOfBirth = $dateOfBirth;
570
571 return $this;
572 }
573
578 public function withCompanyName(?string $companyName)
579 {
580 $this->companyName = $companyName;
581
582 return $this;
583 }
584
589 public function withVatId(?string $vatId)
590 {
591 $this->vatId = $vatId;
592
593 return $this;
594 }
595
600 public function withIsEmailVerified(?bool $isEmailVerified)
601 {
602 $this->isEmailVerified = $isEmailVerified;
603
604 return $this;
605 }
606
611 public function withCustomerGroup(?CustomerGroupKeyReference $customerGroup)
612 {
613 $this->customerGroup = $customerGroup;
614
615 return $this;
616 }
617
622 public function withAddresses(?CustomerAddressCollection $addresses)
623 {
624 $this->addresses = $addresses;
625
626 return $this;
627 }
628
633 public function withDefaultBillingAddress(?int $defaultBillingAddress)
634 {
635 $this->defaultBillingAddress = $defaultBillingAddress;
636
637 return $this;
638 }
639
644 public function withBillingAddresses(?array $billingAddresses)
645 {
646 $this->billingAddresses = $billingAddresses;
647
648 return $this;
649 }
650
655 public function withDefaultShippingAddress(?int $defaultShippingAddress)
656 {
657 $this->defaultShippingAddress = $defaultShippingAddress;
658
659 return $this;
660 }
661
666 public function withShippingAddresses(?array $shippingAddresses)
667 {
668 $this->shippingAddresses = $shippingAddresses;
669
670 return $this;
671 }
672
677 public function withLocale(?string $locale)
678 {
679 $this->locale = $locale;
680
681 return $this;
682 }
683
688 public function withCustom(?Custom $custom)
689 {
690 $this->custom = $custom;
691
692 return $this;
693 }
694
699 public function withAuthenticationMode(?string $authenticationMode)
700 {
701 $this->authenticationMode = $authenticationMode;
702
703 return $this;
704 }
705
711 {
712 $this->customerGroup = $customerGroup;
713
714 return $this;
715 }
716
721 public function withCustomBuilder(?CustomBuilder $custom)
722 {
723 $this->custom = $custom;
724
725 return $this;
726 }
727
728 public function build(): CustomerImport
729 {
730 return new CustomerImportModel(
731 $this->key,
732 $this->customerNumber,
733 $this->email,
734 $this->password,
735 $this->stores,
736 $this->firstName,
737 $this->lastName,
738 $this->middleName,
739 $this->title,
740 $this->salutation,
741 $this->externalId,
742 $this->dateOfBirth,
743 $this->companyName,
744 $this->vatId,
745 $this->isEmailVerified,
746 $this->customerGroup instanceof CustomerGroupKeyReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup,
747 $this->addresses,
748 $this->defaultBillingAddress,
749 $this->billingAddresses,
750 $this->defaultShippingAddress,
751 $this->shippingAddresses,
752 $this->locale,
753 $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom,
754 $this->authenticationMode
755 );
756 }
757
758 public static function of(): CustomerImportBuilder
759 {
760 return new self();
761 }
762}
withCustomerGroup(?CustomerGroupKeyReference $customerGroup)
withCustomerGroupBuilder(?CustomerGroupKeyReferenceBuilder $customerGroup)