commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CustomerImportBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
23 use DateTimeImmutable;
24 use stdClass;
25 
29 final 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 
347  public function getCustomerGroup()
348  {
349  return $this->customerGroup instanceof CustomerGroupKeyReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;
350  }
351 
358  public function getAddresses()
359  {
360  return $this->addresses;
361  }
362 
369  public function getDefaultBillingAddress()
370  {
371  return $this->defaultBillingAddress;
372  }
373 
380  public function getBillingAddresses()
381  {
382  return $this->billingAddresses;
383  }
384 
391  public function getDefaultShippingAddress()
392  {
393  return $this->defaultShippingAddress;
394  }
395 
402  public function getShippingAddresses()
403  {
404  return $this->shippingAddresses;
405  }
406 
413  public function getLocale()
414  {
415  return $this->locale;
416  }
417 
424  public function getCustom()
425  {
426  return $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom;
427  }
428 
438  public function getAuthenticationMode()
439  {
440  return $this->authenticationMode;
441  }
442 
447  public function withKey(?string $key)
448  {
449  $this->key = $key;
450 
451  return $this;
452  }
453 
458  public function withCustomerNumber(?string $customerNumber)
459  {
460  $this->customerNumber = $customerNumber;
461 
462  return $this;
463  }
464 
469  public function withEmail(?string $email)
470  {
471  $this->email = $email;
472 
473  return $this;
474  }
475 
480  public function withPassword(?string $password)
481  {
482  $this->password = $password;
483 
484  return $this;
485  }
486 
491  public function withStores(?StoreKeyReferenceCollection $stores)
492  {
493  $this->stores = $stores;
494 
495  return $this;
496  }
497 
502  public function withFirstName(?string $firstName)
503  {
504  $this->firstName = $firstName;
505 
506  return $this;
507  }
508 
513  public function withLastName(?string $lastName)
514  {
515  $this->lastName = $lastName;
516 
517  return $this;
518  }
519 
524  public function withMiddleName(?string $middleName)
525  {
526  $this->middleName = $middleName;
527 
528  return $this;
529  }
530 
535  public function withTitle(?string $title)
536  {
537  $this->title = $title;
538 
539  return $this;
540  }
541 
546  public function withSalutation(?string $salutation)
547  {
548  $this->salutation = $salutation;
549 
550  return $this;
551  }
552 
557  public function withExternalId(?string $externalId)
558  {
559  $this->externalId = $externalId;
560 
561  return $this;
562  }
563 
568  public function withDateOfBirth(?DateTimeImmutable $dateOfBirth)
569  {
570  $this->dateOfBirth = $dateOfBirth;
571 
572  return $this;
573  }
574 
579  public function withCompanyName(?string $companyName)
580  {
581  $this->companyName = $companyName;
582 
583  return $this;
584  }
585 
590  public function withVatId(?string $vatId)
591  {
592  $this->vatId = $vatId;
593 
594  return $this;
595  }
596 
601  public function withIsEmailVerified(?bool $isEmailVerified)
602  {
603  $this->isEmailVerified = $isEmailVerified;
604 
605  return $this;
606  }
607 
612  public function withCustomerGroup(?CustomerGroupKeyReference $customerGroup)
613  {
614  $this->customerGroup = $customerGroup;
615 
616  return $this;
617  }
618 
623  public function withAddresses(?CustomerAddressCollection $addresses)
624  {
625  $this->addresses = $addresses;
626 
627  return $this;
628  }
629 
634  public function withDefaultBillingAddress(?int $defaultBillingAddress)
635  {
636  $this->defaultBillingAddress = $defaultBillingAddress;
637 
638  return $this;
639  }
640 
645  public function withBillingAddresses(?array $billingAddresses)
646  {
647  $this->billingAddresses = $billingAddresses;
648 
649  return $this;
650  }
651 
656  public function withDefaultShippingAddress(?int $defaultShippingAddress)
657  {
658  $this->defaultShippingAddress = $defaultShippingAddress;
659 
660  return $this;
661  }
662 
667  public function withShippingAddresses(?array $shippingAddresses)
668  {
669  $this->shippingAddresses = $shippingAddresses;
670 
671  return $this;
672  }
673 
678  public function withLocale(?string $locale)
679  {
680  $this->locale = $locale;
681 
682  return $this;
683  }
684 
689  public function withCustom(?Custom $custom)
690  {
691  $this->custom = $custom;
692 
693  return $this;
694  }
695 
700  public function withAuthenticationMode(?string $authenticationMode)
701  {
702  $this->authenticationMode = $authenticationMode;
703 
704  return $this;
705  }
706 
712  {
713  $this->customerGroup = $customerGroup;
714 
715  return $this;
716  }
717 
722  public function withCustomBuilder(?CustomBuilder $custom)
723  {
724  $this->custom = $custom;
725 
726  return $this;
727  }
728 
729  public function build(): CustomerImport
730  {
731  return new CustomerImportModel(
732  $this->key,
733  $this->customerNumber,
734  $this->email,
735  $this->password,
736  $this->stores,
737  $this->firstName,
738  $this->lastName,
739  $this->middleName,
740  $this->title,
741  $this->salutation,
742  $this->externalId,
743  $this->dateOfBirth,
744  $this->companyName,
745  $this->vatId,
746  $this->isEmailVerified,
747  $this->customerGroup instanceof CustomerGroupKeyReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup,
748  $this->addresses,
749  $this->defaultBillingAddress,
750  $this->billingAddresses,
751  $this->defaultShippingAddress,
752  $this->shippingAddresses,
753  $this->locale,
754  $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom,
755  $this->authenticationMode
756  );
757  }
758 
759  public static function of(): CustomerImportBuilder
760  {
761  return new self();
762  }
763 }
withCustomerGroup(?CustomerGroupKeyReference $customerGroup)
withCustomerGroupBuilder(?CustomerGroupKeyReferenceBuilder $customerGroup)