commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
BaseAddressBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class BaseAddressBuilder implements Builder
22{
27 private $id;
28
33 private $key;
34
39 private $country;
40
45 private $title;
46
51 private $salutation;
52
57 private $firstName;
58
63 private $lastName;
64
69 private $streetName;
70
75 private $streetNumber;
76
81 private $additionalStreetInfo;
82
87 private $postalCode;
88
93 private $city;
94
99 private $region;
100
105 private $state;
106
111 private $company;
112
117 private $department;
118
123 private $building;
124
129 private $apartment;
130
135 private $pOBox;
136
141 private $phone;
142
147 private $mobile;
148
153 private $email;
154
159 private $fax;
160
165 private $additionalAddressInfo;
166
171 private $externalId;
172
181 public function getId()
182 {
183 return $this->id;
184 }
185
192 public function getKey()
193 {
194 return $this->key;
195 }
196
203 public function getCountry()
204 {
205 return $this->country;
206 }
207
214 public function getTitle()
215 {
216 return $this->title;
217 }
218
225 public function getSalutation()
226 {
227 return $this->salutation;
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 getStreetName()
259 {
260 return $this->streetName;
261 }
262
269 public function getStreetNumber()
270 {
271 return $this->streetNumber;
272 }
273
280 public function getAdditionalStreetInfo()
281 {
282 return $this->additionalStreetInfo;
283 }
284
291 public function getPostalCode()
292 {
293 return $this->postalCode;
294 }
295
302 public function getCity()
303 {
304 return $this->city;
305 }
306
313 public function getRegion()
314 {
315 return $this->region;
316 }
317
324 public function getState()
325 {
326 return $this->state;
327 }
328
335 public function getCompany()
336 {
337 return $this->company;
338 }
339
346 public function getDepartment()
347 {
348 return $this->department;
349 }
350
357 public function getBuilding()
358 {
359 return $this->building;
360 }
361
368 public function getApartment()
369 {
370 return $this->apartment;
371 }
372
379 public function getPOBox()
380 {
381 return $this->pOBox;
382 }
383
390 public function getPhone()
391 {
392 return $this->phone;
393 }
394
401 public function getMobile()
402 {
403 return $this->mobile;
404 }
405
412 public function getEmail()
413 {
414 return $this->email;
415 }
416
423 public function getFax()
424 {
425 return $this->fax;
426 }
427
434 public function getAdditionalAddressInfo()
435 {
436 return $this->additionalAddressInfo;
437 }
438
445 public function getExternalId()
446 {
447 return $this->externalId;
448 }
449
454 public function withId(?string $id)
455 {
456 $this->id = $id;
457
458 return $this;
459 }
460
465 public function withKey(?string $key)
466 {
467 $this->key = $key;
468
469 return $this;
470 }
471
476 public function withCountry(?string $country)
477 {
478 $this->country = $country;
479
480 return $this;
481 }
482
487 public function withTitle(?string $title)
488 {
489 $this->title = $title;
490
491 return $this;
492 }
493
498 public function withSalutation(?string $salutation)
499 {
500 $this->salutation = $salutation;
501
502 return $this;
503 }
504
509 public function withFirstName(?string $firstName)
510 {
511 $this->firstName = $firstName;
512
513 return $this;
514 }
515
520 public function withLastName(?string $lastName)
521 {
522 $this->lastName = $lastName;
523
524 return $this;
525 }
526
531 public function withStreetName(?string $streetName)
532 {
533 $this->streetName = $streetName;
534
535 return $this;
536 }
537
542 public function withStreetNumber(?string $streetNumber)
543 {
544 $this->streetNumber = $streetNumber;
545
546 return $this;
547 }
548
553 public function withAdditionalStreetInfo(?string $additionalStreetInfo)
554 {
555 $this->additionalStreetInfo = $additionalStreetInfo;
556
557 return $this;
558 }
559
564 public function withPostalCode(?string $postalCode)
565 {
566 $this->postalCode = $postalCode;
567
568 return $this;
569 }
570
575 public function withCity(?string $city)
576 {
577 $this->city = $city;
578
579 return $this;
580 }
581
586 public function withRegion(?string $region)
587 {
588 $this->region = $region;
589
590 return $this;
591 }
592
597 public function withState(?string $state)
598 {
599 $this->state = $state;
600
601 return $this;
602 }
603
608 public function withCompany(?string $company)
609 {
610 $this->company = $company;
611
612 return $this;
613 }
614
619 public function withDepartment(?string $department)
620 {
621 $this->department = $department;
622
623 return $this;
624 }
625
630 public function withBuilding(?string $building)
631 {
632 $this->building = $building;
633
634 return $this;
635 }
636
641 public function withApartment(?string $apartment)
642 {
643 $this->apartment = $apartment;
644
645 return $this;
646 }
647
652 public function withPOBox(?string $pOBox)
653 {
654 $this->pOBox = $pOBox;
655
656 return $this;
657 }
658
663 public function withPhone(?string $phone)
664 {
665 $this->phone = $phone;
666
667 return $this;
668 }
669
674 public function withMobile(?string $mobile)
675 {
676 $this->mobile = $mobile;
677
678 return $this;
679 }
680
685 public function withEmail(?string $email)
686 {
687 $this->email = $email;
688
689 return $this;
690 }
691
696 public function withFax(?string $fax)
697 {
698 $this->fax = $fax;
699
700 return $this;
701 }
702
707 public function withAdditionalAddressInfo(?string $additionalAddressInfo)
708 {
709 $this->additionalAddressInfo = $additionalAddressInfo;
710
711 return $this;
712 }
713
718 public function withExternalId(?string $externalId)
719 {
720 $this->externalId = $externalId;
721
722 return $this;
723 }
724
725
726 public function build(): BaseAddress
727 {
728 return new BaseAddressModel(
729 $this->id,
730 $this->key,
731 $this->country,
732 $this->title,
733 $this->salutation,
734 $this->firstName,
735 $this->lastName,
736 $this->streetName,
737 $this->streetNumber,
738 $this->additionalStreetInfo,
739 $this->postalCode,
740 $this->city,
741 $this->region,
742 $this->state,
743 $this->company,
744 $this->department,
745 $this->building,
746 $this->apartment,
747 $this->pOBox,
748 $this->phone,
749 $this->mobile,
750 $this->email,
751 $this->fax,
752 $this->additionalAddressInfo,
753 $this->externalId
754 );
755 }
756
757 public static function of(): BaseAddressBuilder
758 {
759 return new self();
760 }
761}
withAdditionalAddressInfo(?string $additionalAddressInfo)