commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerAddressBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
23final class CustomerAddressBuilder implements Builder
24{
29 private $key;
30
35 private $country;
36
41 private $title;
42
47 private $salutation;
48
53 private $firstName;
54
59 private $lastName;
60
65 private $streetName;
66
71 private $streetNumber;
72
77 private $additionalStreetInfo;
78
83 private $postalCode;
84
89 private $city;
90
95 private $region;
96
101 private $state;
102
107 private $company;
108
113 private $department;
114
119 private $building;
120
125 private $apartment;
126
131 private $pOBox;
132
137 private $phone;
138
143 private $mobile;
144
149 private $email;
150
155 private $fax;
156
161 private $additionalAddressInfo;
162
167 private $externalId;
168
173 private $custom;
174
182 public function getKey()
183 {
184 return $this->key;
185 }
186
193 public function getCountry()
194 {
195 return $this->country;
196 }
197
204 public function getTitle()
205 {
206 return $this->title;
207 }
208
215 public function getSalutation()
216 {
217 return $this->salutation;
218 }
219
226 public function getFirstName()
227 {
228 return $this->firstName;
229 }
230
237 public function getLastName()
238 {
239 return $this->lastName;
240 }
241
248 public function getStreetName()
249 {
250 return $this->streetName;
251 }
252
259 public function getStreetNumber()
260 {
261 return $this->streetNumber;
262 }
263
270 public function getAdditionalStreetInfo()
271 {
272 return $this->additionalStreetInfo;
273 }
274
281 public function getPostalCode()
282 {
283 return $this->postalCode;
284 }
285
292 public function getCity()
293 {
294 return $this->city;
295 }
296
303 public function getRegion()
304 {
305 return $this->region;
306 }
307
314 public function getState()
315 {
316 return $this->state;
317 }
318
325 public function getCompany()
326 {
327 return $this->company;
328 }
329
336 public function getDepartment()
337 {
338 return $this->department;
339 }
340
347 public function getBuilding()
348 {
349 return $this->building;
350 }
351
358 public function getApartment()
359 {
360 return $this->apartment;
361 }
362
369 public function getPOBox()
370 {
371 return $this->pOBox;
372 }
373
380 public function getPhone()
381 {
382 return $this->phone;
383 }
384
391 public function getMobile()
392 {
393 return $this->mobile;
394 }
395
402 public function getEmail()
403 {
404 return $this->email;
405 }
406
413 public function getFax()
414 {
415 return $this->fax;
416 }
417
424 public function getAdditionalAddressInfo()
425 {
426 return $this->additionalAddressInfo;
427 }
428
435 public function getExternalId()
436 {
437 return $this->externalId;
438 }
439
446 public function getCustom()
447 {
448 return $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom;
449 }
450
455 public function withKey(?string $key)
456 {
457 $this->key = $key;
458
459 return $this;
460 }
461
466 public function withCountry(?string $country)
467 {
468 $this->country = $country;
469
470 return $this;
471 }
472
477 public function withTitle(?string $title)
478 {
479 $this->title = $title;
480
481 return $this;
482 }
483
488 public function withSalutation(?string $salutation)
489 {
490 $this->salutation = $salutation;
491
492 return $this;
493 }
494
499 public function withFirstName(?string $firstName)
500 {
501 $this->firstName = $firstName;
502
503 return $this;
504 }
505
510 public function withLastName(?string $lastName)
511 {
512 $this->lastName = $lastName;
513
514 return $this;
515 }
516
521 public function withStreetName(?string $streetName)
522 {
523 $this->streetName = $streetName;
524
525 return $this;
526 }
527
532 public function withStreetNumber(?string $streetNumber)
533 {
534 $this->streetNumber = $streetNumber;
535
536 return $this;
537 }
538
543 public function withAdditionalStreetInfo(?string $additionalStreetInfo)
544 {
545 $this->additionalStreetInfo = $additionalStreetInfo;
546
547 return $this;
548 }
549
554 public function withPostalCode(?string $postalCode)
555 {
556 $this->postalCode = $postalCode;
557
558 return $this;
559 }
560
565 public function withCity(?string $city)
566 {
567 $this->city = $city;
568
569 return $this;
570 }
571
576 public function withRegion(?string $region)
577 {
578 $this->region = $region;
579
580 return $this;
581 }
582
587 public function withState(?string $state)
588 {
589 $this->state = $state;
590
591 return $this;
592 }
593
598 public function withCompany(?string $company)
599 {
600 $this->company = $company;
601
602 return $this;
603 }
604
609 public function withDepartment(?string $department)
610 {
611 $this->department = $department;
612
613 return $this;
614 }
615
620 public function withBuilding(?string $building)
621 {
622 $this->building = $building;
623
624 return $this;
625 }
626
631 public function withApartment(?string $apartment)
632 {
633 $this->apartment = $apartment;
634
635 return $this;
636 }
637
642 public function withPOBox(?string $pOBox)
643 {
644 $this->pOBox = $pOBox;
645
646 return $this;
647 }
648
653 public function withPhone(?string $phone)
654 {
655 $this->phone = $phone;
656
657 return $this;
658 }
659
664 public function withMobile(?string $mobile)
665 {
666 $this->mobile = $mobile;
667
668 return $this;
669 }
670
675 public function withEmail(?string $email)
676 {
677 $this->email = $email;
678
679 return $this;
680 }
681
686 public function withFax(?string $fax)
687 {
688 $this->fax = $fax;
689
690 return $this;
691 }
692
697 public function withAdditionalAddressInfo(?string $additionalAddressInfo)
698 {
699 $this->additionalAddressInfo = $additionalAddressInfo;
700
701 return $this;
702 }
703
708 public function withExternalId(?string $externalId)
709 {
710 $this->externalId = $externalId;
711
712 return $this;
713 }
714
719 public function withCustom(?Custom $custom)
720 {
721 $this->custom = $custom;
722
723 return $this;
724 }
725
730 public function withCustomBuilder(?CustomBuilder $custom)
731 {
732 $this->custom = $custom;
733
734 return $this;
735 }
736
737 public function build(): CustomerAddress
738 {
739 return new CustomerAddressModel(
740 $this->key,
741 $this->country,
742 $this->title,
743 $this->salutation,
744 $this->firstName,
745 $this->lastName,
746 $this->streetName,
747 $this->streetNumber,
748 $this->additionalStreetInfo,
749 $this->postalCode,
750 $this->city,
751 $this->region,
752 $this->state,
753 $this->company,
754 $this->department,
755 $this->building,
756 $this->apartment,
757 $this->pOBox,
758 $this->phone,
759 $this->mobile,
760 $this->email,
761 $this->fax,
762 $this->additionalAddressInfo,
763 $this->externalId,
764 $this->custom instanceof CustomBuilder ? $this->custom->build() : $this->custom
765 );
766 }
767
768 public static function of(): CustomerAddressBuilder
769 {
770 return new self();
771 }
772}