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 Creditor extends DataObject
15: {
16: /**
17: * @var string
18: */
19: public $additionalAddressInfo = null;
20:
21: /**
22: * @var string
23: */
24: public $city = null;
25:
26: /**
27: * @var string
28: */
29: public $countryCode = null;
30:
31: /**
32: * @var string
33: */
34: public $houseNumber = null;
35:
36: /**
37: * @var string
38: */
39: public $iban = null;
40:
41: /**
42: * @var string
43: */
44: public $id = null;
45:
46: /**
47: * @var string
48: */
49: public $name = null;
50:
51: /**
52: * @var string
53: */
54: public $referenceParty = null;
55:
56: /**
57: * @var string
58: */
59: public $referencePartyId = null;
60:
61: /**
62: * @var string
63: */
64: public $street = null;
65:
66: /**
67: * @var string
68: */
69: public $zip = null;
70:
71: /**
72: * @return object
73: */
74: public function toObject()
75: {
76: $object = parent::toObject();
77: if (!is_null($this->additionalAddressInfo)) {
78: $object->additionalAddressInfo = $this->additionalAddressInfo;
79: }
80: if (!is_null($this->city)) {
81: $object->city = $this->city;
82: }
83: if (!is_null($this->countryCode)) {
84: $object->countryCode = $this->countryCode;
85: }
86: if (!is_null($this->houseNumber)) {
87: $object->houseNumber = $this->houseNumber;
88: }
89: if (!is_null($this->iban)) {
90: $object->iban = $this->iban;
91: }
92: if (!is_null($this->id)) {
93: $object->id = $this->id;
94: }
95: if (!is_null($this->name)) {
96: $object->name = $this->name;
97: }
98: if (!is_null($this->referenceParty)) {
99: $object->referenceParty = $this->referenceParty;
100: }
101: if (!is_null($this->referencePartyId)) {
102: $object->referencePartyId = $this->referencePartyId;
103: }
104: if (!is_null($this->street)) {
105: $object->street = $this->street;
106: }
107: if (!is_null($this->zip)) {
108: $object->zip = $this->zip;
109: }
110: return $object;
111: }
112:
113: /**
114: * @param object $object
115: * @return $this
116: * @throws UnexpectedValueException
117: */
118: public function fromObject($object)
119: {
120: parent::fromObject($object);
121: if (property_exists($object, 'additionalAddressInfo')) {
122: $this->additionalAddressInfo = $object->additionalAddressInfo;
123: }
124: if (property_exists($object, 'city')) {
125: $this->city = $object->city;
126: }
127: if (property_exists($object, 'countryCode')) {
128: $this->countryCode = $object->countryCode;
129: }
130: if (property_exists($object, 'houseNumber')) {
131: $this->houseNumber = $object->houseNumber;
132: }
133: if (property_exists($object, 'iban')) {
134: $this->iban = $object->iban;
135: }
136: if (property_exists($object, 'id')) {
137: $this->id = $object->id;
138: }
139: if (property_exists($object, 'name')) {
140: $this->name = $object->name;
141: }
142: if (property_exists($object, 'referenceParty')) {
143: $this->referenceParty = $object->referenceParty;
144: }
145: if (property_exists($object, 'referencePartyId')) {
146: $this->referencePartyId = $object->referencePartyId;
147: }
148: if (property_exists($object, 'street')) {
149: $this->street = $object->street;
150: }
151: if (property_exists($object, 'zip')) {
152: $this->zip = $object->zip;
153: }
154: return $this;
155: }
156: }
157: