commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CustomerAddressModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $key;
29
34 protected $country;
35
40 protected $title;
41
46 protected $salutation;
47
52 protected $firstName;
53
58 protected $lastName;
59
64 protected $streetName;
65
70 protected $streetNumber;
71
77
82 protected $postalCode;
83
88 protected $city;
89
94 protected $region;
95
100 protected $state;
101
106 protected $company;
107
112 protected $department;
113
118 protected $building;
119
124 protected $apartment;
125
130 protected $pOBox;
131
136 protected $phone;
137
142 protected $mobile;
143
148 protected $email;
149
154 protected $fax;
155
161
166 protected $externalId;
167
172 protected $custom;
173
174
178 public function __construct(
179 ?string $key = null,
180 ?string $country = null,
181 ?string $title = null,
182 ?string $salutation = null,
183 ?string $firstName = null,
184 ?string $lastName = null,
185 ?string $streetName = null,
186 ?string $streetNumber = null,
187 ?string $additionalStreetInfo = null,
188 ?string $postalCode = null,
189 ?string $city = null,
190 ?string $region = null,
191 ?string $state = null,
192 ?string $company = null,
193 ?string $department = null,
194 ?string $building = null,
195 ?string $apartment = null,
196 ?string $pOBox = null,
197 ?string $phone = null,
198 ?string $mobile = null,
199 ?string $email = null,
200 ?string $fax = null,
201 ?string $additionalAddressInfo = null,
202 ?string $externalId = null,
203 ?Custom $custom = null
204 ) {
205 $this->key = $key;
206 $this->country = $country;
207 $this->title = $title;
208 $this->salutation = $salutation;
209 $this->firstName = $firstName;
210 $this->lastName = $lastName;
211 $this->streetName = $streetName;
212 $this->streetNumber = $streetNumber;
213 $this->additionalStreetInfo = $additionalStreetInfo;
214 $this->postalCode = $postalCode;
215 $this->city = $city;
216 $this->region = $region;
217 $this->state = $state;
218 $this->company = $company;
219 $this->department = $department;
220 $this->building = $building;
221 $this->apartment = $apartment;
222 $this->pOBox = $pOBox;
223 $this->phone = $phone;
224 $this->mobile = $mobile;
225 $this->email = $email;
226 $this->fax = $fax;
227 $this->additionalAddressInfo = $additionalAddressInfo;
228 $this->externalId = $externalId;
229 $this->custom = $custom;
230 }
231
239 public function getKey()
240 {
241 if (is_null($this->key)) {
243 $data = $this->raw(self::FIELD_KEY);
244 if (is_null($data)) {
245 return null;
246 }
247 $this->key = (string) $data;
248 }
249
250 return $this->key;
251 }
252
259 public function getCountry()
260 {
261 if (is_null($this->country)) {
263 $data = $this->raw(self::FIELD_COUNTRY);
264 if (is_null($data)) {
265 return null;
266 }
267 $this->country = (string) $data;
268 }
269
270 return $this->country;
271 }
272
279 public function getTitle()
280 {
281 if (is_null($this->title)) {
283 $data = $this->raw(self::FIELD_TITLE);
284 if (is_null($data)) {
285 return null;
286 }
287 $this->title = (string) $data;
288 }
289
290 return $this->title;
291 }
292
299 public function getSalutation()
300 {
301 if (is_null($this->salutation)) {
303 $data = $this->raw(self::FIELD_SALUTATION);
304 if (is_null($data)) {
305 return null;
306 }
307 $this->salutation = (string) $data;
308 }
309
310 return $this->salutation;
311 }
312
319 public function getFirstName()
320 {
321 if (is_null($this->firstName)) {
323 $data = $this->raw(self::FIELD_FIRST_NAME);
324 if (is_null($data)) {
325 return null;
326 }
327 $this->firstName = (string) $data;
328 }
329
330 return $this->firstName;
331 }
332
339 public function getLastName()
340 {
341 if (is_null($this->lastName)) {
343 $data = $this->raw(self::FIELD_LAST_NAME);
344 if (is_null($data)) {
345 return null;
346 }
347 $this->lastName = (string) $data;
348 }
349
350 return $this->lastName;
351 }
352
359 public function getStreetName()
360 {
361 if (is_null($this->streetName)) {
363 $data = $this->raw(self::FIELD_STREET_NAME);
364 if (is_null($data)) {
365 return null;
366 }
367 $this->streetName = (string) $data;
368 }
369
370 return $this->streetName;
371 }
372
379 public function getStreetNumber()
380 {
381 if (is_null($this->streetNumber)) {
383 $data = $this->raw(self::FIELD_STREET_NUMBER);
384 if (is_null($data)) {
385 return null;
386 }
387 $this->streetNumber = (string) $data;
388 }
389
390 return $this->streetNumber;
391 }
392
399 public function getAdditionalStreetInfo()
400 {
401 if (is_null($this->additionalStreetInfo)) {
403 $data = $this->raw(self::FIELD_ADDITIONAL_STREET_INFO);
404 if (is_null($data)) {
405 return null;
406 }
407 $this->additionalStreetInfo = (string) $data;
408 }
409
411 }
412
419 public function getPostalCode()
420 {
421 if (is_null($this->postalCode)) {
423 $data = $this->raw(self::FIELD_POSTAL_CODE);
424 if (is_null($data)) {
425 return null;
426 }
427 $this->postalCode = (string) $data;
428 }
429
430 return $this->postalCode;
431 }
432
439 public function getCity()
440 {
441 if (is_null($this->city)) {
443 $data = $this->raw(self::FIELD_CITY);
444 if (is_null($data)) {
445 return null;
446 }
447 $this->city = (string) $data;
448 }
449
450 return $this->city;
451 }
452
459 public function getRegion()
460 {
461 if (is_null($this->region)) {
463 $data = $this->raw(self::FIELD_REGION);
464 if (is_null($data)) {
465 return null;
466 }
467 $this->region = (string) $data;
468 }
469
470 return $this->region;
471 }
472
479 public function getState()
480 {
481 if (is_null($this->state)) {
483 $data = $this->raw(self::FIELD_STATE);
484 if (is_null($data)) {
485 return null;
486 }
487 $this->state = (string) $data;
488 }
489
490 return $this->state;
491 }
492
499 public function getCompany()
500 {
501 if (is_null($this->company)) {
503 $data = $this->raw(self::FIELD_COMPANY);
504 if (is_null($data)) {
505 return null;
506 }
507 $this->company = (string) $data;
508 }
509
510 return $this->company;
511 }
512
519 public function getDepartment()
520 {
521 if (is_null($this->department)) {
523 $data = $this->raw(self::FIELD_DEPARTMENT);
524 if (is_null($data)) {
525 return null;
526 }
527 $this->department = (string) $data;
528 }
529
530 return $this->department;
531 }
532
539 public function getBuilding()
540 {
541 if (is_null($this->building)) {
543 $data = $this->raw(self::FIELD_BUILDING);
544 if (is_null($data)) {
545 return null;
546 }
547 $this->building = (string) $data;
548 }
549
550 return $this->building;
551 }
552
559 public function getApartment()
560 {
561 if (is_null($this->apartment)) {
563 $data = $this->raw(self::FIELD_APARTMENT);
564 if (is_null($data)) {
565 return null;
566 }
567 $this->apartment = (string) $data;
568 }
569
570 return $this->apartment;
571 }
572
579 public function getPOBox()
580 {
581 if (is_null($this->pOBox)) {
583 $data = $this->raw(self::FIELD_P_O_BOX);
584 if (is_null($data)) {
585 return null;
586 }
587 $this->pOBox = (string) $data;
588 }
589
590 return $this->pOBox;
591 }
592
599 public function getPhone()
600 {
601 if (is_null($this->phone)) {
603 $data = $this->raw(self::FIELD_PHONE);
604 if (is_null($data)) {
605 return null;
606 }
607 $this->phone = (string) $data;
608 }
609
610 return $this->phone;
611 }
612
619 public function getMobile()
620 {
621 if (is_null($this->mobile)) {
623 $data = $this->raw(self::FIELD_MOBILE);
624 if (is_null($data)) {
625 return null;
626 }
627 $this->mobile = (string) $data;
628 }
629
630 return $this->mobile;
631 }
632
639 public function getEmail()
640 {
641 if (is_null($this->email)) {
643 $data = $this->raw(self::FIELD_EMAIL);
644 if (is_null($data)) {
645 return null;
646 }
647 $this->email = (string) $data;
648 }
649
650 return $this->email;
651 }
652
659 public function getFax()
660 {
661 if (is_null($this->fax)) {
663 $data = $this->raw(self::FIELD_FAX);
664 if (is_null($data)) {
665 return null;
666 }
667 $this->fax = (string) $data;
668 }
669
670 return $this->fax;
671 }
672
679 public function getAdditionalAddressInfo()
680 {
681 if (is_null($this->additionalAddressInfo)) {
683 $data = $this->raw(self::FIELD_ADDITIONAL_ADDRESS_INFO);
684 if (is_null($data)) {
685 return null;
686 }
687 $this->additionalAddressInfo = (string) $data;
688 }
689
691 }
692
699 public function getExternalId()
700 {
701 if (is_null($this->externalId)) {
703 $data = $this->raw(self::FIELD_EXTERNAL_ID);
704 if (is_null($data)) {
705 return null;
706 }
707 $this->externalId = (string) $data;
708 }
709
710 return $this->externalId;
711 }
712
719 public function getCustom()
720 {
721 if (is_null($this->custom)) {
723 $data = $this->raw(self::FIELD_CUSTOM);
724 if (is_null($data)) {
725 return null;
726 }
727
728 $this->custom = CustomModel::of($data);
729 }
730
731 return $this->custom;
732 }
733
734
738 public function setKey(?string $key): void
739 {
740 $this->key = $key;
741 }
742
746 public function setCountry(?string $country): void
747 {
748 $this->country = $country;
749 }
750
754 public function setTitle(?string $title): void
755 {
756 $this->title = $title;
757 }
758
762 public function setSalutation(?string $salutation): void
763 {
764 $this->salutation = $salutation;
765 }
766
770 public function setFirstName(?string $firstName): void
771 {
772 $this->firstName = $firstName;
773 }
774
778 public function setLastName(?string $lastName): void
779 {
780 $this->lastName = $lastName;
781 }
782
786 public function setStreetName(?string $streetName): void
787 {
788 $this->streetName = $streetName;
789 }
790
794 public function setStreetNumber(?string $streetNumber): void
795 {
796 $this->streetNumber = $streetNumber;
797 }
798
802 public function setAdditionalStreetInfo(?string $additionalStreetInfo): void
803 {
804 $this->additionalStreetInfo = $additionalStreetInfo;
805 }
806
810 public function setPostalCode(?string $postalCode): void
811 {
812 $this->postalCode = $postalCode;
813 }
814
818 public function setCity(?string $city): void
819 {
820 $this->city = $city;
821 }
822
826 public function setRegion(?string $region): void
827 {
828 $this->region = $region;
829 }
830
834 public function setState(?string $state): void
835 {
836 $this->state = $state;
837 }
838
842 public function setCompany(?string $company): void
843 {
844 $this->company = $company;
845 }
846
850 public function setDepartment(?string $department): void
851 {
852 $this->department = $department;
853 }
854
858 public function setBuilding(?string $building): void
859 {
860 $this->building = $building;
861 }
862
866 public function setApartment(?string $apartment): void
867 {
868 $this->apartment = $apartment;
869 }
870
874 public function setPOBox(?string $pOBox): void
875 {
876 $this->pOBox = $pOBox;
877 }
878
882 public function setPhone(?string $phone): void
883 {
884 $this->phone = $phone;
885 }
886
890 public function setMobile(?string $mobile): void
891 {
892 $this->mobile = $mobile;
893 }
894
898 public function setEmail(?string $email): void
899 {
900 $this->email = $email;
901 }
902
906 public function setFax(?string $fax): void
907 {
908 $this->fax = $fax;
909 }
910
915 {
916 $this->additionalAddressInfo = $additionalAddressInfo;
917 }
918
922 public function setExternalId(?string $externalId): void
923 {
924 $this->externalId = $externalId;
925 }
926
930 public function setCustom(?Custom $custom): void
931 {
932 $this->custom = $custom;
933 }
934}
__construct(?string $key=null, ?string $country=null, ?string $title=null, ?string $salutation=null, ?string $firstName=null, ?string $lastName=null, ?string $streetName=null, ?string $streetNumber=null, ?string $additionalStreetInfo=null, ?string $postalCode=null, ?string $city=null, ?string $region=null, ?string $state=null, ?string $company=null, ?string $department=null, ?string $building=null, ?string $apartment=null, ?string $pOBox=null, ?string $phone=null, ?string $mobile=null, ?string $email=null, ?string $fax=null, ?string $additionalAddressInfo=null, ?string $externalId=null, ?Custom $custom=null)