| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | use Worldline\Connect\Sdk\Domain\DataObject; |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class LodgingRoom extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | public $dailyRoomRate = null; |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public $dailyRoomRateCurrencyCode = null; |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public $dailyRoomTaxAmount = null; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public $dailyRoomTaxAmountCurrencyCode = null; |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public $numberOfNightsAtRoomRate = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public $roomLocation = null; |
| 45: | |
| 46: | |
| 47: | |
| 48: | |
| 49: | public $roomNumber = null; |
| 50: | |
| 51: | |
| 52: | |
| 53: | |
| 54: | public $typeOfBed = null; |
| 55: | |
| 56: | |
| 57: | |
| 58: | |
| 59: | public $typeOfRoom = null; |
| 60: | |
| 61: | |
| 62: | |
| 63: | |
| 64: | public function toObject() |
| 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: | |
| 99: | |
| 100: | |
| 101: | |
| 102: | public function fromObject($object) |
| 103: | { |
| 104: | parent::fromObject($object); |
| 105: | if (property_exists($object, 'dailyRoomRate')) { |
| 106: | $this->dailyRoomRate = $object->dailyRoomRate; |
| 107: | } |
| 108: | if (property_exists($object, 'dailyRoomRateCurrencyCode')) { |
| 109: | $this->dailyRoomRateCurrencyCode = $object->dailyRoomRateCurrencyCode; |
| 110: | } |
| 111: | if (property_exists($object, 'dailyRoomTaxAmount')) { |
| 112: | $this->dailyRoomTaxAmount = $object->dailyRoomTaxAmount; |
| 113: | } |
| 114: | if (property_exists($object, 'dailyRoomTaxAmountCurrencyCode')) { |
| 115: | $this->dailyRoomTaxAmountCurrencyCode = $object->dailyRoomTaxAmountCurrencyCode; |
| 116: | } |
| 117: | if (property_exists($object, 'numberOfNightsAtRoomRate')) { |
| 118: | $this->numberOfNightsAtRoomRate = $object->numberOfNightsAtRoomRate; |
| 119: | } |
| 120: | if (property_exists($object, 'roomLocation')) { |
| 121: | $this->roomLocation = $object->roomLocation; |
| 122: | } |
| 123: | if (property_exists($object, 'roomNumber')) { |
| 124: | $this->roomNumber = $object->roomNumber; |
| 125: | } |
| 126: | if (property_exists($object, 'typeOfBed')) { |
| 127: | $this->typeOfBed = $object->typeOfBed; |
| 128: | } |
| 129: | if (property_exists($object, 'typeOfRoom')) { |
| 130: | $this->typeOfRoom = $object->typeOfRoom; |
| 131: | } |
| 132: | return $this; |
| 133: | } |
| 134: | } |
| 135: | |