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
18: */
19: public $accountId = null;
20:
21: /**
22: * @var string
23: */
24: public $billingAgreementId = null;
25:
26: /**
27: * @var string
28: */
29: public $companyName = null;
30:
31: /**
32: * @var string
33: */
34: public $contactPhone = null;
35:
36: /**
37: * @var string
38: */
39: public $countryCode = null;
40:
41: /**
42: * @var string
43: */
44: public $customerAccountStatus = null;
45:
46: /**
47: * @var string
48: */
49: public $customerAddressStatus = null;
50:
51: /**
52: * @var string
53: */
54: public $firstName = null;
55:
56: /**
57: * @var string
58: */
59: public $payerId = null;
60:
61: /**
62: * @var string
63: */
64: public $surname = null;
65:
66: /**
67: * @return object
68: */
69: public function toObject()
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: * @return $this
108: * @throws UnexpectedValueException
109: */
110: public function fromObject($object)
111: {
112: parent::fromObject($object);
113: if (property_exists($object, 'accountId')) {
114: $this->accountId = $object->accountId;
115: }
116: if (property_exists($object, 'billingAgreementId')) {
117: $this->billingAgreementId = $object->billingAgreementId;
118: }
119: if (property_exists($object, 'companyName')) {
120: $this->companyName = $object->companyName;
121: }
122: if (property_exists($object, 'contactPhone')) {
123: $this->contactPhone = $object->contactPhone;
124: }
125: if (property_exists($object, 'countryCode')) {
126: $this->countryCode = $object->countryCode;
127: }
128: if (property_exists($object, 'customerAccountStatus')) {
129: $this->customerAccountStatus = $object->customerAccountStatus;
130: }
131: if (property_exists($object, 'customerAddressStatus')) {
132: $this->customerAddressStatus = $object->customerAddressStatus;
133: }
134: if (property_exists($object, 'firstName')) {
135: $this->firstName = $object->firstName;
136: }
137: if (property_exists($object, 'payerId')) {
138: $this->payerId = $object->payerId;
139: }
140: if (property_exists($object, 'surname')) {
141: $this->surname = $object->surname;
142: }
143: return $this;
144: }
145: }
146: