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 PaymentProduct840CustomerAccount extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $accountId = null;
20:
21: /**
22: * @var string|null
23: */
24: public ?string $billingAgreementId = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $companyName = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $contactPhone = null;
35:
36: /**
37: * @var string|null
38: */
39: public ?string $countryCode = null;
40:
41: /**
42: * @var string|null
43: */
44: public ?string $customerAccountStatus = null;
45:
46: /**
47: * @var string|null
48: */
49: public ?string $customerAddressStatus = null;
50:
51: /**
52: * @var string|null
53: */
54: public ?string $firstName = null;
55:
56: /**
57: * @var string|null
58: */
59: public ?string $payerId = null;
60:
61: /**
62: * @var string|null
63: */
64: public ?string $surname = null;
65:
66: /**
67: * @return object
68: */
69: public function toObject(): object
70: {
71: $object = parent::toObject();
72: if (!is_null($this->accountId)) {
73: $object->accountId = $this->accountId;
74: }
75: if (!is_null($this->billingAgreementId)) {
76: $object->billingAgreementId = $this->billingAgreementId;
77: }
78: if (!is_null($this->companyName)) {
79: $object->companyName = $this->companyName;
80: }
81: if (!is_null($this->contactPhone)) {
82: $object->contactPhone = $this->contactPhone;
83: }
84: if (!is_null($this->countryCode)) {
85: $object->countryCode = $this->countryCode;
86: }
87: if (!is_null($this->customerAccountStatus)) {
88: $object->customerAccountStatus = $this->customerAccountStatus;
89: }
90: if (!is_null($this->customerAddressStatus)) {
91: $object->customerAddressStatus = $this->customerAddressStatus;
92: }
93: if (!is_null($this->firstName)) {
94: $object->firstName = $this->firstName;
95: }
96: if (!is_null($this->payerId)) {
97: $object->payerId = $this->payerId;
98: }
99: if (!is_null($this->surname)) {
100: $object->surname = $this->surname;
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): PaymentProduct840CustomerAccount
112: {
113: parent::fromObject($object);
114: if (property_exists($object, 'accountId')) {
115: $this->accountId = $object->accountId;
116: }
117: if (property_exists($object, 'billingAgreementId')) {
118: $this->billingAgreementId = $object->billingAgreementId;
119: }
120: if (property_exists($object, 'companyName')) {
121: $this->companyName = $object->companyName;
122: }
123: if (property_exists($object, 'contactPhone')) {
124: $this->contactPhone = $object->contactPhone;
125: }
126: if (property_exists($object, 'countryCode')) {
127: $this->countryCode = $object->countryCode;
128: }
129: if (property_exists($object, 'customerAccountStatus')) {
130: $this->customerAccountStatus = $object->customerAccountStatus;
131: }
132: if (property_exists($object, 'customerAddressStatus')) {
133: $this->customerAddressStatus = $object->customerAddressStatus;
134: }
135: if (property_exists($object, 'firstName')) {
136: $this->firstName = $object->firstName;
137: }
138: if (property_exists($object, 'payerId')) {
139: $this->payerId = $object->payerId;
140: }
141: if (property_exists($object, 'surname')) {
142: $this->surname = $object->surname;
143: }
144: return $this;
145: }
146: }
147: