commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AddressDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
22final class AddressDraftModel extends JsonObjectModel implements AddressDraft
23{
28 protected $id;
29
34 protected $key;
35
40 protected $country;
41
46 protected $title;
47
52 protected $salutation;
53
58 protected $firstName;
59
64 protected $lastName;
65
70 protected $streetName;
71
76 protected $streetNumber;
77
83
88 protected $postalCode;
89
94 protected $city;
95
100 protected $region;
101
106 protected $state;
107
112 protected $company;
113
118 protected $department;
119
124 protected $building;
125
130 protected $apartment;
131
136 protected $pOBox;
137
142 protected $phone;
143
148 protected $mobile;
149
154 protected $email;
155
160 protected $fax;
161
167
172 protected $externalId;
173
178 protected $custom;
179
180
184 public function __construct(
185 ?string $id = null,
186 ?string $key = null,
187 ?string $country = null,
188 ?string $title = null,
189 ?string $salutation = null,
190 ?string $firstName = null,
191 ?string $lastName = null,
192 ?string $streetName = null,
193 ?string $streetNumber = null,
194 ?string $additionalStreetInfo = null,
195 ?string $postalCode = null,
196 ?string $city = null,
197 ?string $region = null,
198 ?string $state = null,
199 ?string $company = null,
200 ?string $department = null,
201 ?string $building = null,
202 ?string $apartment = null,
203 ?string $pOBox = null,
204 ?string $phone = null,
205 ?string $mobile = null,
206 ?string $email = null,
207 ?string $fax = null,
208 ?string $additionalAddressInfo = null,
209 ?string $externalId = null,
211 ) {
212 $this->id = $id;
213 $this->key = $key;
214 $this->country = $country;
215 $this->title = $title;
216 $this->salutation = $salutation;
217 $this->firstName = $firstName;
218 $this->lastName = $lastName;
219 $this->streetName = $streetName;
220 $this->streetNumber = $streetNumber;
221 $this->additionalStreetInfo = $additionalStreetInfo;
222 $this->postalCode = $postalCode;
223 $this->city = $city;
224 $this->region = $region;
225 $this->state = $state;
226 $this->company = $company;
227 $this->department = $department;
228 $this->building = $building;
229 $this->apartment = $apartment;
230 $this->pOBox = $pOBox;
231 $this->phone = $phone;
232 $this->mobile = $mobile;
233 $this->email = $email;
234 $this->fax = $fax;
235 $this->additionalAddressInfo = $additionalAddressInfo;
236 $this->externalId = $externalId;
237 $this->custom = $custom;
238 }
239
248 public function getId()
249 {
250 if (is_null($this->id)) {
252 $data = $this->raw(self::FIELD_ID);
253 if (is_null($data)) {
254 return null;
255 }
256 $this->id = (string) $data;
257 }
258
259 return $this->id;
260 }
261
268 public function getKey()
269 {
270 if (is_null($this->key)) {
272 $data = $this->raw(self::FIELD_KEY);
273 if (is_null($data)) {
274 return null;
275 }
276 $this->key = (string) $data;
277 }
278
279 return $this->key;
280 }
281
288 public function getCountry()
289 {
290 if (is_null($this->country)) {
292 $data = $this->raw(self::FIELD_COUNTRY);
293 if (is_null($data)) {
294 return null;
295 }
296 $this->country = (string) $data;
297 }
298
299 return $this->country;
300 }
301
308 public function getTitle()
309 {
310 if (is_null($this->title)) {
312 $data = $this->raw(self::FIELD_TITLE);
313 if (is_null($data)) {
314 return null;
315 }
316 $this->title = (string) $data;
317 }
318
319 return $this->title;
320 }
321
328 public function getSalutation()
329 {
330 if (is_null($this->salutation)) {
332 $data = $this->raw(self::FIELD_SALUTATION);
333 if (is_null($data)) {
334 return null;
335 }
336 $this->salutation = (string) $data;
337 }
338
339 return $this->salutation;
340 }
341
348 public function getFirstName()
349 {
350 if (is_null($this->firstName)) {
352 $data = $this->raw(self::FIELD_FIRST_NAME);
353 if (is_null($data)) {
354 return null;
355 }
356 $this->firstName = (string) $data;
357 }
358
359 return $this->firstName;
360 }
361
368 public function getLastName()
369 {
370 if (is_null($this->lastName)) {
372 $data = $this->raw(self::FIELD_LAST_NAME);
373 if (is_null($data)) {
374 return null;
375 }
376 $this->lastName = (string) $data;
377 }
378
379 return $this->lastName;
380 }
381
388 public function getStreetName()
389 {
390 if (is_null($this->streetName)) {
392 $data = $this->raw(self::FIELD_STREET_NAME);
393 if (is_null($data)) {
394 return null;
395 }
396 $this->streetName = (string) $data;
397 }
398
399 return $this->streetName;
400 }
401
408 public function getStreetNumber()
409 {
410 if (is_null($this->streetNumber)) {
412 $data = $this->raw(self::FIELD_STREET_NUMBER);
413 if (is_null($data)) {
414 return null;
415 }
416 $this->streetNumber = (string) $data;
417 }
418
419 return $this->streetNumber;
420 }
421
428 public function getAdditionalStreetInfo()
429 {
430 if (is_null($this->additionalStreetInfo)) {
432 $data = $this->raw(self::FIELD_ADDITIONAL_STREET_INFO);
433 if (is_null($data)) {
434 return null;
435 }
436 $this->additionalStreetInfo = (string) $data;
437 }
438
440 }
441
448 public function getPostalCode()
449 {
450 if (is_null($this->postalCode)) {
452 $data = $this->raw(self::FIELD_POSTAL_CODE);
453 if (is_null($data)) {
454 return null;
455 }
456 $this->postalCode = (string) $data;
457 }
458
459 return $this->postalCode;
460 }
461
468 public function getCity()
469 {
470 if (is_null($this->city)) {
472 $data = $this->raw(self::FIELD_CITY);
473 if (is_null($data)) {
474 return null;
475 }
476 $this->city = (string) $data;
477 }
478
479 return $this->city;
480 }
481
488 public function getRegion()
489 {
490 if (is_null($this->region)) {
492 $data = $this->raw(self::FIELD_REGION);
493 if (is_null($data)) {
494 return null;
495 }
496 $this->region = (string) $data;
497 }
498
499 return $this->region;
500 }
501
508 public function getState()
509 {
510 if (is_null($this->state)) {
512 $data = $this->raw(self::FIELD_STATE);
513 if (is_null($data)) {
514 return null;
515 }
516 $this->state = (string) $data;
517 }
518
519 return $this->state;
520 }
521
528 public function getCompany()
529 {
530 if (is_null($this->company)) {
532 $data = $this->raw(self::FIELD_COMPANY);
533 if (is_null($data)) {
534 return null;
535 }
536 $this->company = (string) $data;
537 }
538
539 return $this->company;
540 }
541
548 public function getDepartment()
549 {
550 if (is_null($this->department)) {
552 $data = $this->raw(self::FIELD_DEPARTMENT);
553 if (is_null($data)) {
554 return null;
555 }
556 $this->department = (string) $data;
557 }
558
559 return $this->department;
560 }
561
568 public function getBuilding()
569 {
570 if (is_null($this->building)) {
572 $data = $this->raw(self::FIELD_BUILDING);
573 if (is_null($data)) {
574 return null;
575 }
576 $this->building = (string) $data;
577 }
578
579 return $this->building;
580 }
581
588 public function getApartment()
589 {
590 if (is_null($this->apartment)) {
592 $data = $this->raw(self::FIELD_APARTMENT);
593 if (is_null($data)) {
594 return null;
595 }
596 $this->apartment = (string) $data;
597 }
598
599 return $this->apartment;
600 }
601
608 public function getPOBox()
609 {
610 if (is_null($this->pOBox)) {
612 $data = $this->raw(self::FIELD_P_O_BOX);
613 if (is_null($data)) {
614 return null;
615 }
616 $this->pOBox = (string) $data;
617 }
618
619 return $this->pOBox;
620 }
621
628 public function getPhone()
629 {
630 if (is_null($this->phone)) {
632 $data = $this->raw(self::FIELD_PHONE);
633 if (is_null($data)) {
634 return null;
635 }
636 $this->phone = (string) $data;
637 }
638
639 return $this->phone;
640 }
641
648 public function getMobile()
649 {
650 if (is_null($this->mobile)) {
652 $data = $this->raw(self::FIELD_MOBILE);
653 if (is_null($data)) {
654 return null;
655 }
656 $this->mobile = (string) $data;
657 }
658
659 return $this->mobile;
660 }
661
668 public function getEmail()
669 {
670 if (is_null($this->email)) {
672 $data = $this->raw(self::FIELD_EMAIL);
673 if (is_null($data)) {
674 return null;
675 }
676 $this->email = (string) $data;
677 }
678
679 return $this->email;
680 }
681
688 public function getFax()
689 {
690 if (is_null($this->fax)) {
692 $data = $this->raw(self::FIELD_FAX);
693 if (is_null($data)) {
694 return null;
695 }
696 $this->fax = (string) $data;
697 }
698
699 return $this->fax;
700 }
701
708 public function getAdditionalAddressInfo()
709 {
710 if (is_null($this->additionalAddressInfo)) {
712 $data = $this->raw(self::FIELD_ADDITIONAL_ADDRESS_INFO);
713 if (is_null($data)) {
714 return null;
715 }
716 $this->additionalAddressInfo = (string) $data;
717 }
718
720 }
721
728 public function getExternalId()
729 {
730 if (is_null($this->externalId)) {
732 $data = $this->raw(self::FIELD_EXTERNAL_ID);
733 if (is_null($data)) {
734 return null;
735 }
736 $this->externalId = (string) $data;
737 }
738
739 return $this->externalId;
740 }
741
748 public function getCustom()
749 {
750 if (is_null($this->custom)) {
752 $data = $this->raw(self::FIELD_CUSTOM);
753 if (is_null($data)) {
754 return null;
755 }
756
757 $this->custom = CustomFieldsDraftModel::of($data);
758 }
759
760 return $this->custom;
761 }
762
763
767 public function setId(?string $id): void
768 {
769 $this->id = $id;
770 }
771
775 public function setKey(?string $key): void
776 {
777 $this->key = $key;
778 }
779
783 public function setCountry(?string $country): void
784 {
785 $this->country = $country;
786 }
787
791 public function setTitle(?string $title): void
792 {
793 $this->title = $title;
794 }
795
799 public function setSalutation(?string $salutation): void
800 {
801 $this->salutation = $salutation;
802 }
803
807 public function setFirstName(?string $firstName): void
808 {
809 $this->firstName = $firstName;
810 }
811
815 public function setLastName(?string $lastName): void
816 {
817 $this->lastName = $lastName;
818 }
819
823 public function setStreetName(?string $streetName): void
824 {
825 $this->streetName = $streetName;
826 }
827
831 public function setStreetNumber(?string $streetNumber): void
832 {
833 $this->streetNumber = $streetNumber;
834 }
835
839 public function setAdditionalStreetInfo(?string $additionalStreetInfo): void
840 {
841 $this->additionalStreetInfo = $additionalStreetInfo;
842 }
843
847 public function setPostalCode(?string $postalCode): void
848 {
849 $this->postalCode = $postalCode;
850 }
851
855 public function setCity(?string $city): void
856 {
857 $this->city = $city;
858 }
859
863 public function setRegion(?string $region): void
864 {
865 $this->region = $region;
866 }
867
871 public function setState(?string $state): void
872 {
873 $this->state = $state;
874 }
875
879 public function setCompany(?string $company): void
880 {
881 $this->company = $company;
882 }
883
887 public function setDepartment(?string $department): void
888 {
889 $this->department = $department;
890 }
891
895 public function setBuilding(?string $building): void
896 {
897 $this->building = $building;
898 }
899
903 public function setApartment(?string $apartment): void
904 {
905 $this->apartment = $apartment;
906 }
907
911 public function setPOBox(?string $pOBox): void
912 {
913 $this->pOBox = $pOBox;
914 }
915
919 public function setPhone(?string $phone): void
920 {
921 $this->phone = $phone;
922 }
923
927 public function setMobile(?string $mobile): void
928 {
929 $this->mobile = $mobile;
930 }
931
935 public function setEmail(?string $email): void
936 {
937 $this->email = $email;
938 }
939
943 public function setFax(?string $fax): void
944 {
945 $this->fax = $fax;
946 }
947
952 {
953 $this->additionalAddressInfo = $additionalAddressInfo;
954 }
955
959 public function setExternalId(?string $externalId): void
960 {
961 $this->externalId = $externalId;
962 }
963
967 public function setCustom(?CustomFieldsDraft $custom): void
968 {
969 $this->custom = $custom;
970 }
971}
__construct(?string $id=null, ?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, ?CustomFieldsDraft $custom=null)
setAdditionalAddressInfo(?string $additionalAddressInfo)