commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CustomerAddressModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
28  protected $key;
29 
34  protected $title;
35 
40  protected $salutation;
41 
46  protected $firstName;
47 
52  protected $lastName;
53 
58  protected $streetName;
59 
64  protected $streetNumber;
65 
71 
76  protected $postalCode;
77 
82  protected $city;
83 
88  protected $region;
89 
94  protected $state;
95 
100  protected $country;
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 $title = null,
181  ?string $salutation = null,
182  ?string $firstName = null,
183  ?string $lastName = null,
184  ?string $streetName = null,
185  ?string $streetNumber = null,
186  ?string $additionalStreetInfo = null,
187  ?string $postalCode = null,
188  ?string $city = null,
189  ?string $region = null,
190  ?string $state = null,
191  ?string $country = 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->title = $title;
207  $this->salutation = $salutation;
208  $this->firstName = $firstName;
209  $this->lastName = $lastName;
210  $this->streetName = $streetName;
211  $this->streetNumber = $streetNumber;
212  $this->additionalStreetInfo = $additionalStreetInfo;
213  $this->postalCode = $postalCode;
214  $this->city = $city;
215  $this->region = $region;
216  $this->state = $state;
217  $this->country = $country;
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 
257  public function getTitle()
258  {
259  if (is_null($this->title)) {
261  $data = $this->raw(self::FIELD_TITLE);
262  if (is_null($data)) {
263  return null;
264  }
265  $this->title = (string) $data;
266  }
267 
268  return $this->title;
269  }
270 
275  public function getSalutation()
276  {
277  if (is_null($this->salutation)) {
279  $data = $this->raw(self::FIELD_SALUTATION);
280  if (is_null($data)) {
281  return null;
282  }
283  $this->salutation = (string) $data;
284  }
285 
286  return $this->salutation;
287  }
288 
293  public function getFirstName()
294  {
295  if (is_null($this->firstName)) {
297  $data = $this->raw(self::FIELD_FIRST_NAME);
298  if (is_null($data)) {
299  return null;
300  }
301  $this->firstName = (string) $data;
302  }
303 
304  return $this->firstName;
305  }
306 
311  public function getLastName()
312  {
313  if (is_null($this->lastName)) {
315  $data = $this->raw(self::FIELD_LAST_NAME);
316  if (is_null($data)) {
317  return null;
318  }
319  $this->lastName = (string) $data;
320  }
321 
322  return $this->lastName;
323  }
324 
329  public function getStreetName()
330  {
331  if (is_null($this->streetName)) {
333  $data = $this->raw(self::FIELD_STREET_NAME);
334  if (is_null($data)) {
335  return null;
336  }
337  $this->streetName = (string) $data;
338  }
339 
340  return $this->streetName;
341  }
342 
347  public function getStreetNumber()
348  {
349  if (is_null($this->streetNumber)) {
351  $data = $this->raw(self::FIELD_STREET_NUMBER);
352  if (is_null($data)) {
353  return null;
354  }
355  $this->streetNumber = (string) $data;
356  }
357 
358  return $this->streetNumber;
359  }
360 
365  public function getAdditionalStreetInfo()
366  {
367  if (is_null($this->additionalStreetInfo)) {
369  $data = $this->raw(self::FIELD_ADDITIONAL_STREET_INFO);
370  if (is_null($data)) {
371  return null;
372  }
373  $this->additionalStreetInfo = (string) $data;
374  }
375 
377  }
378 
383  public function getPostalCode()
384  {
385  if (is_null($this->postalCode)) {
387  $data = $this->raw(self::FIELD_POSTAL_CODE);
388  if (is_null($data)) {
389  return null;
390  }
391  $this->postalCode = (string) $data;
392  }
393 
394  return $this->postalCode;
395  }
396 
401  public function getCity()
402  {
403  if (is_null($this->city)) {
405  $data = $this->raw(self::FIELD_CITY);
406  if (is_null($data)) {
407  return null;
408  }
409  $this->city = (string) $data;
410  }
411 
412  return $this->city;
413  }
414 
419  public function getRegion()
420  {
421  if (is_null($this->region)) {
423  $data = $this->raw(self::FIELD_REGION);
424  if (is_null($data)) {
425  return null;
426  }
427  $this->region = (string) $data;
428  }
429 
430  return $this->region;
431  }
432 
437  public function getState()
438  {
439  if (is_null($this->state)) {
441  $data = $this->raw(self::FIELD_STATE);
442  if (is_null($data)) {
443  return null;
444  }
445  $this->state = (string) $data;
446  }
447 
448  return $this->state;
449  }
450 
457  public function getCountry()
458  {
459  if (is_null($this->country)) {
461  $data = $this->raw(self::FIELD_COUNTRY);
462  if (is_null($data)) {
463  return null;
464  }
465  $this->country = (string) $data;
466  }
467 
468  return $this->country;
469  }
470 
475  public function getCompany()
476  {
477  if (is_null($this->company)) {
479  $data = $this->raw(self::FIELD_COMPANY);
480  if (is_null($data)) {
481  return null;
482  }
483  $this->company = (string) $data;
484  }
485 
486  return $this->company;
487  }
488 
493  public function getDepartment()
494  {
495  if (is_null($this->department)) {
497  $data = $this->raw(self::FIELD_DEPARTMENT);
498  if (is_null($data)) {
499  return null;
500  }
501  $this->department = (string) $data;
502  }
503 
504  return $this->department;
505  }
506 
511  public function getBuilding()
512  {
513  if (is_null($this->building)) {
515  $data = $this->raw(self::FIELD_BUILDING);
516  if (is_null($data)) {
517  return null;
518  }
519  $this->building = (string) $data;
520  }
521 
522  return $this->building;
523  }
524 
529  public function getApartment()
530  {
531  if (is_null($this->apartment)) {
533  $data = $this->raw(self::FIELD_APARTMENT);
534  if (is_null($data)) {
535  return null;
536  }
537  $this->apartment = (string) $data;
538  }
539 
540  return $this->apartment;
541  }
542 
547  public function getPOBox()
548  {
549  if (is_null($this->pOBox)) {
551  $data = $this->raw(self::FIELD_P_O_BOX);
552  if (is_null($data)) {
553  return null;
554  }
555  $this->pOBox = (string) $data;
556  }
557 
558  return $this->pOBox;
559  }
560 
565  public function getPhone()
566  {
567  if (is_null($this->phone)) {
569  $data = $this->raw(self::FIELD_PHONE);
570  if (is_null($data)) {
571  return null;
572  }
573  $this->phone = (string) $data;
574  }
575 
576  return $this->phone;
577  }
578 
583  public function getMobile()
584  {
585  if (is_null($this->mobile)) {
587  $data = $this->raw(self::FIELD_MOBILE);
588  if (is_null($data)) {
589  return null;
590  }
591  $this->mobile = (string) $data;
592  }
593 
594  return $this->mobile;
595  }
596 
601  public function getEmail()
602  {
603  if (is_null($this->email)) {
605  $data = $this->raw(self::FIELD_EMAIL);
606  if (is_null($data)) {
607  return null;
608  }
609  $this->email = (string) $data;
610  }
611 
612  return $this->email;
613  }
614 
619  public function getFax()
620  {
621  if (is_null($this->fax)) {
623  $data = $this->raw(self::FIELD_FAX);
624  if (is_null($data)) {
625  return null;
626  }
627  $this->fax = (string) $data;
628  }
629 
630  return $this->fax;
631  }
632 
637  public function getAdditionalAddressInfo()
638  {
639  if (is_null($this->additionalAddressInfo)) {
641  $data = $this->raw(self::FIELD_ADDITIONAL_ADDRESS_INFO);
642  if (is_null($data)) {
643  return null;
644  }
645  $this->additionalAddressInfo = (string) $data;
646  }
647 
649  }
650 
655  public function getExternalId()
656  {
657  if (is_null($this->externalId)) {
659  $data = $this->raw(self::FIELD_EXTERNAL_ID);
660  if (is_null($data)) {
661  return null;
662  }
663  $this->externalId = (string) $data;
664  }
665 
666  return $this->externalId;
667  }
668 
675  public function getCustom()
676  {
677  if (is_null($this->custom)) {
679  $data = $this->raw(self::FIELD_CUSTOM);
680  if (is_null($data)) {
681  return null;
682  }
683 
684  $this->custom = CustomModel::of($data);
685  }
686 
687  return $this->custom;
688  }
689 
690 
694  public function setKey(?string $key): void
695  {
696  $this->key = $key;
697  }
698 
702  public function setTitle(?string $title): void
703  {
704  $this->title = $title;
705  }
706 
710  public function setSalutation(?string $salutation): void
711  {
712  $this->salutation = $salutation;
713  }
714 
718  public function setFirstName(?string $firstName): void
719  {
720  $this->firstName = $firstName;
721  }
722 
726  public function setLastName(?string $lastName): void
727  {
728  $this->lastName = $lastName;
729  }
730 
734  public function setStreetName(?string $streetName): void
735  {
736  $this->streetName = $streetName;
737  }
738 
742  public function setStreetNumber(?string $streetNumber): void
743  {
744  $this->streetNumber = $streetNumber;
745  }
746 
750  public function setAdditionalStreetInfo(?string $additionalStreetInfo): void
751  {
752  $this->additionalStreetInfo = $additionalStreetInfo;
753  }
754 
758  public function setPostalCode(?string $postalCode): void
759  {
760  $this->postalCode = $postalCode;
761  }
762 
766  public function setCity(?string $city): void
767  {
768  $this->city = $city;
769  }
770 
774  public function setRegion(?string $region): void
775  {
776  $this->region = $region;
777  }
778 
782  public function setState(?string $state): void
783  {
784  $this->state = $state;
785  }
786 
790  public function setCountry(?string $country): void
791  {
792  $this->country = $country;
793  }
794 
798  public function setCompany(?string $company): void
799  {
800  $this->company = $company;
801  }
802 
806  public function setDepartment(?string $department): void
807  {
808  $this->department = $department;
809  }
810 
814  public function setBuilding(?string $building): void
815  {
816  $this->building = $building;
817  }
818 
822  public function setApartment(?string $apartment): void
823  {
824  $this->apartment = $apartment;
825  }
826 
830  public function setPOBox(?string $pOBox): void
831  {
832  $this->pOBox = $pOBox;
833  }
834 
838  public function setPhone(?string $phone): void
839  {
840  $this->phone = $phone;
841  }
842 
846  public function setMobile(?string $mobile): void
847  {
848  $this->mobile = $mobile;
849  }
850 
854  public function setEmail(?string $email): void
855  {
856  $this->email = $email;
857  }
858 
862  public function setFax(?string $fax): void
863  {
864  $this->fax = $fax;
865  }
866 
870  public function setAdditionalAddressInfo(?string $additionalAddressInfo): void
871  {
872  $this->additionalAddressInfo = $additionalAddressInfo;
873  }
874 
878  public function setExternalId(?string $externalId): void
879  {
880  $this->externalId = $externalId;
881  }
882 
886  public function setCustom(?Custom $custom): void
887  {
888  $this->custom = $custom;
889  }
890 }
__construct(?string $key=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 $country=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)