1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class GetCustomerDetailsResponse extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $city = null;
20:
21: /**
22: * @var string|null
23: */
24: public ?string $country = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $emailAddress = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $firstName = null;
35:
36: /**
37: * @var string|null
38: */
39: public ?string $fiscalNumber = null;
40:
41: /**
42: * @var string|null
43: */
44: public ?string $languageCode = null;
45:
46: /**
47: * @var string|null
48: */
49: public ?string $phoneNumber = null;
50:
51: /**
52: * @var string|null
53: */
54: public ?string $street = null;
55:
56: /**
57: * @var string|null
58: */
59: public ?string $surname = null;
60:
61: /**
62: * @var string|null
63: */
64: public ?string $zip = null;
65:
66: /**
67: * @return object
68: */
69: public function toObject(): object
70: {
71: $object = parent::toObject();
72: if (!is_null($this->city)) {
73: $object->city = $this->city;
74: }
75: if (!is_null($this->country)) {
76: $object->country = $this->country;
77: }
78: if (!is_null($this->emailAddress)) {
79: $object->emailAddress = $this->emailAddress;
80: }
81: if (!is_null($this->firstName)) {
82: $object->firstName = $this->firstName;
83: }
84: if (!is_null($this->fiscalNumber)) {
85: $object->fiscalNumber = $this->fiscalNumber;
86: }
87: if (!is_null($this->languageCode)) {
88: $object->languageCode = $this->languageCode;
89: }
90: if (!is_null($this->phoneNumber)) {
91: $object->phoneNumber = $this->phoneNumber;
92: }
93: if (!is_null($this->street)) {
94: $object->street = $this->street;
95: }
96: if (!is_null($this->surname)) {
97: $object->surname = $this->surname;
98: }
99: if (!is_null($this->zip)) {
100: $object->zip = $this->zip;
101: }
102: return $object;
103: }
104:
105: /**
106: * @param object $object
107: *
108: * @return $this
109: * @throws UnexpectedValueException
110: */
111: public function fromObject(object $object): GetCustomerDetailsResponse
112: {
113: parent::fromObject($object);
114: if (property_exists($object, 'city')) {
115: $this->city = $object->city;
116: }
117: if (property_exists($object, 'country')) {
118: $this->country = $object->country;
119: }
120: if (property_exists($object, 'emailAddress')) {
121: $this->emailAddress = $object->emailAddress;
122: }
123: if (property_exists($object, 'firstName')) {
124: $this->firstName = $object->firstName;
125: }
126: if (property_exists($object, 'fiscalNumber')) {
127: $this->fiscalNumber = $object->fiscalNumber;
128: }
129: if (property_exists($object, 'languageCode')) {
130: $this->languageCode = $object->languageCode;
131: }
132: if (property_exists($object, 'phoneNumber')) {
133: $this->phoneNumber = $object->phoneNumber;
134: }
135: if (property_exists($object, 'street')) {
136: $this->street = $object->street;
137: }
138: if (property_exists($object, 'surname')) {
139: $this->surname = $object->surname;
140: }
141: if (property_exists($object, 'zip')) {
142: $this->zip = $object->zip;
143: }
144: return $this;
145: }
146: }
147: