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 LodgingRoom extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $dailyRoomRate = null;
20:
21: /**
22: * @var string|null
23: */
24: public ?string $dailyRoomRateCurrencyCode = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $dailyRoomTaxAmount = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $dailyRoomTaxAmountCurrencyCode = null;
35:
36: /**
37: * @var int|null
38: */
39: public ?int $numberOfNightsAtRoomRate = null;
40:
41: /**
42: * @var string|null
43: */
44: public ?string $roomLocation = null;
45:
46: /**
47: * @var string|null
48: */
49: public ?string $roomNumber = null;
50:
51: /**
52: * @var string|null
53: */
54: public ?string $typeOfBed = null;
55:
56: /**
57: * @var string|null
58: */
59: public ?string $typeOfRoom = null;
60:
61: /**
62: * @return object
63: */
64: public function toObject(): object
65: {
66: $object = parent::toObject();
67: if (!is_null($this->dailyRoomRate)) {
68: $object->dailyRoomRate = $this->dailyRoomRate;
69: }
70: if (!is_null($this->dailyRoomRateCurrencyCode)) {
71: $object->dailyRoomRateCurrencyCode = $this->dailyRoomRateCurrencyCode;
72: }
73: if (!is_null($this->dailyRoomTaxAmount)) {
74: $object->dailyRoomTaxAmount = $this->dailyRoomTaxAmount;
75: }
76: if (!is_null($this->dailyRoomTaxAmountCurrencyCode)) {
77: $object->dailyRoomTaxAmountCurrencyCode = $this->dailyRoomTaxAmountCurrencyCode;
78: }
79: if (!is_null($this->numberOfNightsAtRoomRate)) {
80: $object->numberOfNightsAtRoomRate = $this->numberOfNightsAtRoomRate;
81: }
82: if (!is_null($this->roomLocation)) {
83: $object->roomLocation = $this->roomLocation;
84: }
85: if (!is_null($this->roomNumber)) {
86: $object->roomNumber = $this->roomNumber;
87: }
88: if (!is_null($this->typeOfBed)) {
89: $object->typeOfBed = $this->typeOfBed;
90: }
91: if (!is_null($this->typeOfRoom)) {
92: $object->typeOfRoom = $this->typeOfRoom;
93: }
94: return $object;
95: }
96:
97: /**
98: * @param object $object
99: *
100: * @return $this
101: * @throws UnexpectedValueException
102: */
103: public function fromObject(object $object): LodgingRoom
104: {
105: parent::fromObject($object);
106: if (property_exists($object, 'dailyRoomRate')) {
107: $this->dailyRoomRate = $object->dailyRoomRate;
108: }
109: if (property_exists($object, 'dailyRoomRateCurrencyCode')) {
110: $this->dailyRoomRateCurrencyCode = $object->dailyRoomRateCurrencyCode;
111: }
112: if (property_exists($object, 'dailyRoomTaxAmount')) {
113: $this->dailyRoomTaxAmount = $object->dailyRoomTaxAmount;
114: }
115: if (property_exists($object, 'dailyRoomTaxAmountCurrencyCode')) {
116: $this->dailyRoomTaxAmountCurrencyCode = $object->dailyRoomTaxAmountCurrencyCode;
117: }
118: if (property_exists($object, 'numberOfNightsAtRoomRate')) {
119: $this->numberOfNightsAtRoomRate = $object->numberOfNightsAtRoomRate;
120: }
121: if (property_exists($object, 'roomLocation')) {
122: $this->roomLocation = $object->roomLocation;
123: }
124: if (property_exists($object, 'roomNumber')) {
125: $this->roomNumber = $object->roomNumber;
126: }
127: if (property_exists($object, 'typeOfBed')) {
128: $this->typeOfBed = $object->typeOfBed;
129: }
130: if (property_exists($object, 'typeOfRoom')) {
131: $this->typeOfRoom = $object->typeOfRoom;
132: }
133: return $this;
134: }
135: }
136: