This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5186713
commit eb4fc5f
Showing
9 changed files
with
572 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/Ingenico/Connect/Sdk/Domain/Definitions/LodgingCharge.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/* | ||
* This class was auto-generated from the API references found at | ||
* https://epayments-api.developer-ingenico.com/s2sapi/v1/ | ||
*/ | ||
namespace Ingenico\Connect\Sdk\Domain\Definitions; | ||
|
||
use Ingenico\Connect\Sdk\DataObject; | ||
use UnexpectedValueException; | ||
|
||
/** | ||
* @package Ingenico\Connect\Sdk\Domain\Definitions | ||
*/ | ||
class LodgingCharge extends DataObject | ||
{ | ||
/** | ||
* @var int | ||
*/ | ||
public $chargeAmount = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $chargeAmountCurrencyCode = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $chargeType = null; | ||
|
||
/** | ||
* @return object | ||
*/ | ||
public function toObject() | ||
{ | ||
$object = parent::toObject(); | ||
if (!is_null($this->chargeAmount)) { | ||
$object->chargeAmount = $this->chargeAmount; | ||
} | ||
if (!is_null($this->chargeAmountCurrencyCode)) { | ||
$object->chargeAmountCurrencyCode = $this->chargeAmountCurrencyCode; | ||
} | ||
if (!is_null($this->chargeType)) { | ||
$object->chargeType = $this->chargeType; | ||
} | ||
return $object; | ||
} | ||
|
||
/** | ||
* @param object $object | ||
* @return $this | ||
* @throws UnexpectedValueException | ||
*/ | ||
public function fromObject($object) | ||
{ | ||
parent::fromObject($object); | ||
if (property_exists($object, 'chargeAmount')) { | ||
$this->chargeAmount = $object->chargeAmount; | ||
} | ||
if (property_exists($object, 'chargeAmountCurrencyCode')) { | ||
$this->chargeAmountCurrencyCode = $object->chargeAmountCurrencyCode; | ||
} | ||
if (property_exists($object, 'chargeType')) { | ||
$this->chargeType = $object->chargeType; | ||
} | ||
return $this; | ||
} | ||
} |
235 changes: 235 additions & 0 deletions
235
src/Ingenico/Connect/Sdk/Domain/Definitions/LodgingData.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
<?php | ||
/* | ||
* This class was auto-generated from the API references found at | ||
* https://epayments-api.developer-ingenico.com/s2sapi/v1/ | ||
*/ | ||
namespace Ingenico\Connect\Sdk\Domain\Definitions; | ||
|
||
use Ingenico\Connect\Sdk\DataObject; | ||
use UnexpectedValueException; | ||
|
||
/** | ||
* @package Ingenico\Connect\Sdk\Domain\Definitions | ||
*/ | ||
class LodgingData extends DataObject | ||
{ | ||
/** | ||
* @var LodgingCharge[] | ||
*/ | ||
public $charges = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $checkInDate = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $checkOutDate = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $folioNumber = null; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $isConfirmedReservation = null; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $isFacilityFireSafetyConform = null; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $isNoShow = null; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $isPreferenceSmokingRoom = null; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $numberOfAdults = null; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $numberOfNights = null; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $numberOfRooms = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $programCode = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $propertyCustomerServicePhoneNumber = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $propertyPhoneNumber = null; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $renterName = null; | ||
|
||
/** | ||
* @var LodgingRoom[] | ||
*/ | ||
public $rooms = null; | ||
|
||
/** | ||
* @return object | ||
*/ | ||
public function toObject() | ||
{ | ||
$object = parent::toObject(); | ||
if (!is_null($this->charges)) { | ||
$object->charges = []; | ||
foreach ($this->charges as $element) { | ||
if (!is_null($element)) { | ||
$object->charges[] = $element->toObject(); | ||
} | ||
} | ||
} | ||
if (!is_null($this->checkInDate)) { | ||
$object->checkInDate = $this->checkInDate; | ||
} | ||
if (!is_null($this->checkOutDate)) { | ||
$object->checkOutDate = $this->checkOutDate; | ||
} | ||
if (!is_null($this->folioNumber)) { | ||
$object->folioNumber = $this->folioNumber; | ||
} | ||
if (!is_null($this->isConfirmedReservation)) { | ||
$object->isConfirmedReservation = $this->isConfirmedReservation; | ||
} | ||
if (!is_null($this->isFacilityFireSafetyConform)) { | ||
$object->isFacilityFireSafetyConform = $this->isFacilityFireSafetyConform; | ||
} | ||
if (!is_null($this->isNoShow)) { | ||
$object->isNoShow = $this->isNoShow; | ||
} | ||
if (!is_null($this->isPreferenceSmokingRoom)) { | ||
$object->isPreferenceSmokingRoom = $this->isPreferenceSmokingRoom; | ||
} | ||
if (!is_null($this->numberOfAdults)) { | ||
$object->numberOfAdults = $this->numberOfAdults; | ||
} | ||
if (!is_null($this->numberOfNights)) { | ||
$object->numberOfNights = $this->numberOfNights; | ||
} | ||
if (!is_null($this->numberOfRooms)) { | ||
$object->numberOfRooms = $this->numberOfRooms; | ||
} | ||
if (!is_null($this->programCode)) { | ||
$object->programCode = $this->programCode; | ||
} | ||
if (!is_null($this->propertyCustomerServicePhoneNumber)) { | ||
$object->propertyCustomerServicePhoneNumber = $this->propertyCustomerServicePhoneNumber; | ||
} | ||
if (!is_null($this->propertyPhoneNumber)) { | ||
$object->propertyPhoneNumber = $this->propertyPhoneNumber; | ||
} | ||
if (!is_null($this->renterName)) { | ||
$object->renterName = $this->renterName; | ||
} | ||
if (!is_null($this->rooms)) { | ||
$object->rooms = []; | ||
foreach ($this->rooms as $element) { | ||
if (!is_null($element)) { | ||
$object->rooms[] = $element->toObject(); | ||
} | ||
} | ||
} | ||
return $object; | ||
} | ||
|
||
/** | ||
* @param object $object | ||
* @return $this | ||
* @throws UnexpectedValueException | ||
*/ | ||
public function fromObject($object) | ||
{ | ||
parent::fromObject($object); | ||
if (property_exists($object, 'charges')) { | ||
if (!is_array($object->charges) && !is_object($object->charges)) { | ||
throw new UnexpectedValueException('value \'' . print_r($object->charges, true) . '\' is not an array or object'); | ||
} | ||
$this->charges = []; | ||
foreach ($object->charges as $element) { | ||
$value = new LodgingCharge(); | ||
$this->charges[] = $value->fromObject($element); | ||
} | ||
} | ||
if (property_exists($object, 'checkInDate')) { | ||
$this->checkInDate = $object->checkInDate; | ||
} | ||
if (property_exists($object, 'checkOutDate')) { | ||
$this->checkOutDate = $object->checkOutDate; | ||
} | ||
if (property_exists($object, 'folioNumber')) { | ||
$this->folioNumber = $object->folioNumber; | ||
} | ||
if (property_exists($object, 'isConfirmedReservation')) { | ||
$this->isConfirmedReservation = $object->isConfirmedReservation; | ||
} | ||
if (property_exists($object, 'isFacilityFireSafetyConform')) { | ||
$this->isFacilityFireSafetyConform = $object->isFacilityFireSafetyConform; | ||
} | ||
if (property_exists($object, 'isNoShow')) { | ||
$this->isNoShow = $object->isNoShow; | ||
} | ||
if (property_exists($object, 'isPreferenceSmokingRoom')) { | ||
$this->isPreferenceSmokingRoom = $object->isPreferenceSmokingRoom; | ||
} | ||
if (property_exists($object, 'numberOfAdults')) { | ||
$this->numberOfAdults = $object->numberOfAdults; | ||
} | ||
if (property_exists($object, 'numberOfNights')) { | ||
$this->numberOfNights = $object->numberOfNights; | ||
} | ||
if (property_exists($object, 'numberOfRooms')) { | ||
$this->numberOfRooms = $object->numberOfRooms; | ||
} | ||
if (property_exists($object, 'programCode')) { | ||
$this->programCode = $object->programCode; | ||
} | ||
if (property_exists($object, 'propertyCustomerServicePhoneNumber')) { | ||
$this->propertyCustomerServicePhoneNumber = $object->propertyCustomerServicePhoneNumber; | ||
} | ||
if (property_exists($object, 'propertyPhoneNumber')) { | ||
$this->propertyPhoneNumber = $object->propertyPhoneNumber; | ||
} | ||
if (property_exists($object, 'renterName')) { | ||
$this->renterName = $object->renterName; | ||
} | ||
if (property_exists($object, 'rooms')) { | ||
if (!is_array($object->rooms) && !is_object($object->rooms)) { | ||
throw new UnexpectedValueException('value \'' . print_r($object->rooms, true) . '\' is not an array or object'); | ||
} | ||
$this->rooms = []; | ||
foreach ($object->rooms as $element) { | ||
$value = new LodgingRoom(); | ||
$this->rooms[] = $value->fromObject($element); | ||
} | ||
} | ||
return $this; | ||
} | ||
} |
Oops, something went wrong.