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 AirlineFlightLeg extends DataObject
15: {
16: /**
17: * @var string
18: */
19: public $airlineClass = null;
20:
21: /**
22: * @var string
23: */
24: public $arrivalAirport = null;
25:
26: /**
27: * @var string
28: */
29: public $arrivalTime = null;
30:
31: /**
32: * @var string
33: */
34: public $carrierCode = null;
35:
36: /**
37: * @var string
38: */
39: public $conjunctionTicket = null;
40:
41: /**
42: * @var string
43: */
44: public $couponNumber = null;
45:
46: /**
47: * @var string
48: */
49: public $date = null;
50:
51: /**
52: * @var string
53: */
54: public $departureTime = null;
55:
56: /**
57: * @var string
58: */
59: public $endorsementOrRestriction = null;
60:
61: /**
62: * @var string
63: */
64: public $exchangeTicket = null;
65:
66: /**
67: * @var string
68: */
69: public $fare = null;
70:
71: /**
72: * @var string
73: */
74: public $fareBasis = null;
75:
76: /**
77: * @var int
78: */
79: public $fee = null;
80:
81: /**
82: * @var string
83: */
84: public $flightNumber = null;
85:
86: /**
87: * @var int
88: */
89: public $number = null;
90:
91: /**
92: * @var string
93: */
94: public $originAirport = null;
95:
96: /**
97: * @var string
98: */
99: public $passengerClass = null;
100:
101: /**
102: * @var string
103: * @deprecated Use passengerClass instead
104: */
105: public $serviceClass = null;
106:
107: /**
108: * @var string
109: */
110: public $stopoverCode = null;
111:
112: /**
113: * @var int
114: */
115: public $taxes = null;
116:
117: /**
118: * @return object
119: */
120: public function toObject()
121: {
122: $object = parent::toObject();
123: if (!is_null($this->airlineClass)) {
124: $object->airlineClass = $this->airlineClass;
125: }
126: if (!is_null($this->arrivalAirport)) {
127: $object->arrivalAirport = $this->arrivalAirport;
128: }
129: if (!is_null($this->arrivalTime)) {
130: $object->arrivalTime = $this->arrivalTime;
131: }
132: if (!is_null($this->carrierCode)) {
133: $object->carrierCode = $this->carrierCode;
134: }
135: if (!is_null($this->conjunctionTicket)) {
136: $object->conjunctionTicket = $this->conjunctionTicket;
137: }
138: if (!is_null($this->couponNumber)) {
139: $object->couponNumber = $this->couponNumber;
140: }
141: if (!is_null($this->date)) {
142: $object->date = $this->date;
143: }
144: if (!is_null($this->departureTime)) {
145: $object->departureTime = $this->departureTime;
146: }
147: if (!is_null($this->endorsementOrRestriction)) {
148: $object->endorsementOrRestriction = $this->endorsementOrRestriction;
149: }
150: if (!is_null($this->exchangeTicket)) {
151: $object->exchangeTicket = $this->exchangeTicket;
152: }
153: if (!is_null($this->fare)) {
154: $object->fare = $this->fare;
155: }
156: if (!is_null($this->fareBasis)) {
157: $object->fareBasis = $this->fareBasis;
158: }
159: if (!is_null($this->fee)) {
160: $object->fee = $this->fee;
161: }
162: if (!is_null($this->flightNumber)) {
163: $object->flightNumber = $this->flightNumber;
164: }
165: if (!is_null($this->number)) {
166: $object->number = $this->number;
167: }
168: if (!is_null($this->originAirport)) {
169: $object->originAirport = $this->originAirport;
170: }
171: if (!is_null($this->passengerClass)) {
172: $object->passengerClass = $this->passengerClass;
173: }
174: if (!is_null($this->serviceClass)) {
175: $object->serviceClass = $this->serviceClass;
176: }
177: if (!is_null($this->stopoverCode)) {
178: $object->stopoverCode = $this->stopoverCode;
179: }
180: if (!is_null($this->taxes)) {
181: $object->taxes = $this->taxes;
182: }
183: return $object;
184: }
185:
186: /**
187: * @param object $object
188: * @return $this
189: * @throws UnexpectedValueException
190: */
191: public function fromObject($object)
192: {
193: parent::fromObject($object);
194: if (property_exists($object, 'airlineClass')) {
195: $this->airlineClass = $object->airlineClass;
196: }
197: if (property_exists($object, 'arrivalAirport')) {
198: $this->arrivalAirport = $object->arrivalAirport;
199: }
200: if (property_exists($object, 'arrivalTime')) {
201: $this->arrivalTime = $object->arrivalTime;
202: }
203: if (property_exists($object, 'carrierCode')) {
204: $this->carrierCode = $object->carrierCode;
205: }
206: if (property_exists($object, 'conjunctionTicket')) {
207: $this->conjunctionTicket = $object->conjunctionTicket;
208: }
209: if (property_exists($object, 'couponNumber')) {
210: $this->couponNumber = $object->couponNumber;
211: }
212: if (property_exists($object, 'date')) {
213: $this->date = $object->date;
214: }
215: if (property_exists($object, 'departureTime')) {
216: $this->departureTime = $object->departureTime;
217: }
218: if (property_exists($object, 'endorsementOrRestriction')) {
219: $this->endorsementOrRestriction = $object->endorsementOrRestriction;
220: }
221: if (property_exists($object, 'exchangeTicket')) {
222: $this->exchangeTicket = $object->exchangeTicket;
223: }
224: if (property_exists($object, 'fare')) {
225: $this->fare = $object->fare;
226: }
227: if (property_exists($object, 'fareBasis')) {
228: $this->fareBasis = $object->fareBasis;
229: }
230: if (property_exists($object, 'fee')) {
231: $this->fee = $object->fee;
232: }
233: if (property_exists($object, 'flightNumber')) {
234: $this->flightNumber = $object->flightNumber;
235: }
236: if (property_exists($object, 'number')) {
237: $this->number = $object->number;
238: }
239: if (property_exists($object, 'originAirport')) {
240: $this->originAirport = $object->originAirport;
241: }
242: if (property_exists($object, 'passengerClass')) {
243: $this->passengerClass = $object->passengerClass;
244: }
245: if (property_exists($object, 'serviceClass')) {
246: $this->serviceClass = $object->serviceClass;
247: }
248: if (property_exists($object, 'stopoverCode')) {
249: $this->stopoverCode = $object->stopoverCode;
250: }
251: if (property_exists($object, 'taxes')) {
252: $this->taxes = $object->taxes;
253: }
254: return $this;
255: }
256: }
257: