Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 6.18.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments authored and jenkins committed Dec 11, 2020
1 parent 5186713 commit eb4fc5f
Show file tree
Hide file tree
Showing 9 changed files with 572 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Ingenico/Connect/Sdk/RequestHeaderGenerator.php
Expand Up @@ -11,7 +11,7 @@
*/
class RequestHeaderGenerator
{
const SDK_VERSION = '6.17.0';
const SDK_VERSION = '6.18.0';

const AUTHORIZATION_ID = 'GCS';

Expand Down
Expand Up @@ -18,6 +18,11 @@ class AdditionalOrderInputAirlineData extends DataObject
*/
public $airlineData = null;

/**
* @var LodgingData
*/
public $lodgingData = null;

/**
* @return object
*/
Expand All @@ -27,6 +32,9 @@ public function toObject()
if (!is_null($this->airlineData)) {
$object->airlineData = $this->airlineData->toObject();
}
if (!is_null($this->lodgingData)) {
$object->lodgingData = $this->lodgingData->toObject();
}
return $object;
}

Expand All @@ -45,6 +53,13 @@ public function fromObject($object)
$value = new AirlineData();
$this->airlineData = $value->fromObject($object->airlineData);
}
if (property_exists($object, 'lodgingData')) {
if (!is_object($object->lodgingData)) {
throw new UnexpectedValueException('value \'' . print_r($object->lodgingData, true) . '\' is not an object');
}
$value = new LodgingData();
$this->lodgingData = $value->fromObject($object->lodgingData);
}
return $this;
}
}
68 changes: 68 additions & 0 deletions src/Ingenico/Connect/Sdk/Domain/Definitions/LodgingCharge.php
@@ -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 src/Ingenico/Connect/Sdk/Domain/Definitions/LodgingData.php
@@ -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;
}
}

0 comments on commit eb4fc5f

Please sign in to comment.