GET | /EventBookings |
---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
// @DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
class PagingMetadata implements JsonSerializable
{
public function __construct(
/** @description Starting Record */
// @DataMember
// @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
/** @var string|null */
public ?string $Offset=null,
/** @description Number of records to return (PageSize) */
// @DataMember
// @ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
/** @var string|null */
public ?string $Limit=null,
/** @description Total Number of Records in a Full Reponse (if no paging) */
// @DataMember
// @ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")
/** @var int */
public int $TotalRecords=0,
/** @description Total Number of Records in this Reponse (on this page) */
// @DataMember
// @ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")
/** @var int */
public int $ResponseRecords=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Offset'])) $this->Offset = $o['Offset'];
if (isset($o['Limit'])) $this->Limit = $o['Limit'];
if (isset($o['TotalRecords'])) $this->TotalRecords = $o['TotalRecords'];
if (isset($o['ResponseRecords'])) $this->ResponseRecords = $o['ResponseRecords'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Offset)) $o['Offset'] = $this->Offset;
if (isset($this->Limit)) $o['Limit'] = $this->Limit;
if (isset($this->TotalRecords)) $o['TotalRecords'] = $this->TotalRecords;
if (isset($this->ResponseRecords)) $o['ResponseRecords'] = $this->ResponseRecords;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="ItinerarySegment", Namespace="schemas.agentivity.com/types")
class ItinerarySegment implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var string|null */
public ?string $SegmentType=null,
// @DataMember
/** @var int */
public int $SegmentNbr=0,
// @DataMember
/** @var string|null */
public ?string $BoardPoint=null,
// @DataMember
/** @var string|null */
public ?string $OffPoint=null,
// @DataMember
/** @var string|null */
public ?string $OperatorCode=null,
// @DataMember
/** @var string|null */
public ?string $OperatorService=null,
// @DataMember
/** @var string|null */
public ?string $SegmentStatus=null,
// @DataMember
/** @var string|null */
public ?string $DepartureTimeFormatted=null,
// @DataMember
/** @var string|null */
public ?string $ArrivalTimeFormatted=null,
// @DataMember
/** @var string|null */
public ?string $ChangeOfDayFormatted=null,
// @DataMember
/** @var string|null */
public ?string $ServiceCode=null,
// @DataMember
/** @var string|null */
public ?string $StartDate=null,
// @DataMember
/** @var string|null */
public ?string $EndDate=null,
// @DataMember
/** @var string|null */
public ?string $TicketNumber=null,
/** @description Comma separated list of vendor locators */
// @DataMember
/** @var string|null */
public ?string $VendorLocators=null,
// @DataMember
/** @var string|null */
public ?string $EquipmentCode=null,
// @DataMember
/** @var string|null */
public ?string $Equipment=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SegmentType'])) $this->SegmentType = $o['SegmentType'];
if (isset($o['SegmentNbr'])) $this->SegmentNbr = $o['SegmentNbr'];
if (isset($o['BoardPoint'])) $this->BoardPoint = $o['BoardPoint'];
if (isset($o['OffPoint'])) $this->OffPoint = $o['OffPoint'];
if (isset($o['OperatorCode'])) $this->OperatorCode = $o['OperatorCode'];
if (isset($o['OperatorService'])) $this->OperatorService = $o['OperatorService'];
if (isset($o['SegmentStatus'])) $this->SegmentStatus = $o['SegmentStatus'];
if (isset($o['DepartureTimeFormatted'])) $this->DepartureTimeFormatted = $o['DepartureTimeFormatted'];
if (isset($o['ArrivalTimeFormatted'])) $this->ArrivalTimeFormatted = $o['ArrivalTimeFormatted'];
if (isset($o['ChangeOfDayFormatted'])) $this->ChangeOfDayFormatted = $o['ChangeOfDayFormatted'];
if (isset($o['ServiceCode'])) $this->ServiceCode = $o['ServiceCode'];
if (isset($o['StartDate'])) $this->StartDate = $o['StartDate'];
if (isset($o['EndDate'])) $this->EndDate = $o['EndDate'];
if (isset($o['TicketNumber'])) $this->TicketNumber = $o['TicketNumber'];
if (isset($o['VendorLocators'])) $this->VendorLocators = $o['VendorLocators'];
if (isset($o['EquipmentCode'])) $this->EquipmentCode = $o['EquipmentCode'];
if (isset($o['Equipment'])) $this->Equipment = $o['Equipment'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SegmentType)) $o['SegmentType'] = $this->SegmentType;
if (isset($this->SegmentNbr)) $o['SegmentNbr'] = $this->SegmentNbr;
if (isset($this->BoardPoint)) $o['BoardPoint'] = $this->BoardPoint;
if (isset($this->OffPoint)) $o['OffPoint'] = $this->OffPoint;
if (isset($this->OperatorCode)) $o['OperatorCode'] = $this->OperatorCode;
if (isset($this->OperatorService)) $o['OperatorService'] = $this->OperatorService;
if (isset($this->SegmentStatus)) $o['SegmentStatus'] = $this->SegmentStatus;
if (isset($this->DepartureTimeFormatted)) $o['DepartureTimeFormatted'] = $this->DepartureTimeFormatted;
if (isset($this->ArrivalTimeFormatted)) $o['ArrivalTimeFormatted'] = $this->ArrivalTimeFormatted;
if (isset($this->ChangeOfDayFormatted)) $o['ChangeOfDayFormatted'] = $this->ChangeOfDayFormatted;
if (isset($this->ServiceCode)) $o['ServiceCode'] = $this->ServiceCode;
if (isset($this->StartDate)) $o['StartDate'] = $this->StartDate;
if (isset($this->EndDate)) $o['EndDate'] = $this->EndDate;
if (isset($this->TicketNumber)) $o['TicketNumber'] = $this->TicketNumber;
if (isset($this->VendorLocators)) $o['VendorLocators'] = $this->VendorLocators;
if (isset($this->EquipmentCode)) $o['EquipmentCode'] = $this->EquipmentCode;
if (isset($this->Equipment)) $o['Equipment'] = $this->Equipment;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template array of ItinerarySegment
*/
class ItinerarySegmentsCollection extends \ArrayObject implements JsonSerializable
{
public function __construct(ItinerarySegment ...$items) {
parent::__construct($items, \ArrayObject::STD_PROP_LIST);
}
/** @throws \Exception */
public function append($value): void {
if ($value instanceof ItinerarySegment)
parent::append($value);
else
throw new \Exception("Can only append a ItinerarySegment to " . __CLASS__);
}
/** @throws Exception */
public function fromMap($o): void {
foreach ($o as $item) {
$el = new ItinerarySegment();
$el->fromMap($item);
$this->append($el);
}
}
/** @throws Exception */
public function jsonSerialize(): array {
return parent::getArrayCopy();
}
}
// @DataContract(Name="EventBooking", Namespace="schemas.agentivity.com/types")
class EventBooking implements IBookingItinerary, JsonSerializable
{
public function __construct(
// @DataMember(Order=10)
/** @var string|null */
public ?string $RecordLocator=null,
// @DataMember(Order=20)
/** @var DateTime */
public DateTime $PNRCreationDate=new DateTime(),
// @DataMember(Order=30)
/** @var string|null */
public ?string $PaxList=null,
// @DataMember(Order=35)
/** @var int */
public int $PaxCount=0,
// @DataMember(Order=70)
/** @var string|null */
public ?string $InboundAirline=null,
// @DataMember(Order=80)
/** @var string|null */
public ?string $InboundFlightNumber=null,
// @DataMember(Order=90)
/** @var string|null */
public ?string $InboundArrivalCity=null,
// @DataMember(Order=100)
/** @var DateTime|null */
public ?DateTime $InboundArrivalDate=null,
// @DataMember(Order=110)
/** @var string|null */
public ?string $InboundArrivalTime=null,
// @DataMember(Order=120)
/** @var string|null */
public ?string $OutboundAirline=null,
// @DataMember(Order=130)
/** @var string|null */
public ?string $OutboundFlightNumber=null,
// @DataMember(Order=140)
/** @var string|null */
public ?string $OutboundDepartureCity=null,
// @DataMember(Order=150)
/** @var DateTime|null */
public ?DateTime $OutboundDepartureDate=null,
// @DataMember(Order=160)
/** @var string|null */
public ?string $OutboundDepartureTime=null,
// @DataMember(Order=170)
/** @var string|null */
public ?string $Notes=null,
// @DataMember(Order=180)
/** @var string|null */
public ?string $Emails=null,
// @DataMember(Order=190)
/** @var string|null */
public ?string $Mobile=null,
// @DataMember(Order=200)
/** @var string|null */
public ?string $TotalTicketedValue=null,
// @DataMember(Order=40)
/** @var int */
public int $AgentivityRef=0,
// @DataMember(Order=50)
/** @var string|null */
public ?string $ItineraryFormatted=null,
// @DataMember(Order=60)
/** @var ItinerarySegmentsCollection|null */
public ?ItinerarySegmentsCollection $Itinerary=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RecordLocator'])) $this->RecordLocator = $o['RecordLocator'];
if (isset($o['PNRCreationDate'])) $this->PNRCreationDate = JsonConverters::from('DateTime', $o['PNRCreationDate']);
if (isset($o['PaxList'])) $this->PaxList = $o['PaxList'];
if (isset($o['PaxCount'])) $this->PaxCount = $o['PaxCount'];
if (isset($o['InboundAirline'])) $this->InboundAirline = $o['InboundAirline'];
if (isset($o['InboundFlightNumber'])) $this->InboundFlightNumber = $o['InboundFlightNumber'];
if (isset($o['InboundArrivalCity'])) $this->InboundArrivalCity = $o['InboundArrivalCity'];
if (isset($o['InboundArrivalDate'])) $this->InboundArrivalDate = JsonConverters::from('DateTime', $o['InboundArrivalDate']);
if (isset($o['InboundArrivalTime'])) $this->InboundArrivalTime = $o['InboundArrivalTime'];
if (isset($o['OutboundAirline'])) $this->OutboundAirline = $o['OutboundAirline'];
if (isset($o['OutboundFlightNumber'])) $this->OutboundFlightNumber = $o['OutboundFlightNumber'];
if (isset($o['OutboundDepartureCity'])) $this->OutboundDepartureCity = $o['OutboundDepartureCity'];
if (isset($o['OutboundDepartureDate'])) $this->OutboundDepartureDate = JsonConverters::from('DateTime', $o['OutboundDepartureDate']);
if (isset($o['OutboundDepartureTime'])) $this->OutboundDepartureTime = $o['OutboundDepartureTime'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['Emails'])) $this->Emails = $o['Emails'];
if (isset($o['Mobile'])) $this->Mobile = $o['Mobile'];
if (isset($o['TotalTicketedValue'])) $this->TotalTicketedValue = $o['TotalTicketedValue'];
if (isset($o['AgentivityRef'])) $this->AgentivityRef = $o['AgentivityRef'];
if (isset($o['ItineraryFormatted'])) $this->ItineraryFormatted = $o['ItineraryFormatted'];
if (isset($o['Itinerary'])) $this->Itinerary = JsonConverters::from('ItinerarySegmentsCollection', $o['Itinerary']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RecordLocator)) $o['RecordLocator'] = $this->RecordLocator;
if (isset($this->PNRCreationDate)) $o['PNRCreationDate'] = JsonConverters::to('DateTime', $this->PNRCreationDate);
if (isset($this->PaxList)) $o['PaxList'] = $this->PaxList;
if (isset($this->PaxCount)) $o['PaxCount'] = $this->PaxCount;
if (isset($this->InboundAirline)) $o['InboundAirline'] = $this->InboundAirline;
if (isset($this->InboundFlightNumber)) $o['InboundFlightNumber'] = $this->InboundFlightNumber;
if (isset($this->InboundArrivalCity)) $o['InboundArrivalCity'] = $this->InboundArrivalCity;
if (isset($this->InboundArrivalDate)) $o['InboundArrivalDate'] = JsonConverters::to('DateTime', $this->InboundArrivalDate);
if (isset($this->InboundArrivalTime)) $o['InboundArrivalTime'] = $this->InboundArrivalTime;
if (isset($this->OutboundAirline)) $o['OutboundAirline'] = $this->OutboundAirline;
if (isset($this->OutboundFlightNumber)) $o['OutboundFlightNumber'] = $this->OutboundFlightNumber;
if (isset($this->OutboundDepartureCity)) $o['OutboundDepartureCity'] = $this->OutboundDepartureCity;
if (isset($this->OutboundDepartureDate)) $o['OutboundDepartureDate'] = JsonConverters::to('DateTime', $this->OutboundDepartureDate);
if (isset($this->OutboundDepartureTime)) $o['OutboundDepartureTime'] = $this->OutboundDepartureTime;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->Emails)) $o['Emails'] = $this->Emails;
if (isset($this->Mobile)) $o['Mobile'] = $this->Mobile;
if (isset($this->TotalTicketedValue)) $o['TotalTicketedValue'] = $this->TotalTicketedValue;
if (isset($this->AgentivityRef)) $o['AgentivityRef'] = $this->AgentivityRef;
if (isset($this->ItineraryFormatted)) $o['ItineraryFormatted'] = $this->ItineraryFormatted;
if (isset($this->Itinerary)) $o['Itinerary'] = JsonConverters::to('ItinerarySegmentsCollection', $this->Itinerary);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Namespace="schemas.agentivity.com/types")
/**
* @template TItemResponse
* @template TItem
*/
class Report2 implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): Report2 {
$to = new Report2();
$to->genericArgs = $genericArgs;
return $to;
}
public function __construct(
// @DataMember(Order=1, EmitDefaultValue=false)
/** @var TItem|null */
public mixed $Item=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Item'])) $this->Item = JsonConverters::from($this->genericArgs[1], $o['Item']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Item)) $o['Item'] = JsonConverters::to($this->genericArgs[1], $this->Item);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="EventBooking", Namespace="schemas.agentivity.com/types")
/**
* @template Report2 of EventBookingsItemResponse
* @template Report21 of EventBooking
*/
class EventBookingsResponseReport extends Report2 implements JsonSerializable
{
/**
* @param TItem|null $Item
*/
public function __construct(
?TItem $Item=null
) {
parent::__construct($Item);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
class CacheMetadata implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var DateTime */
public DateTime $CachedAt=new DateTime(),
// @DataMember(Order=2)
/** @var DateTime */
public DateTime $CacheExpiresAt=new DateTime(),
// @DataMember(Order=0)
/** @var bool|null */
public ?bool $IsFromCache=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CachedAt'])) $this->CachedAt = JsonConverters::from('DateTime', $o['CachedAt']);
if (isset($o['CacheExpiresAt'])) $this->CacheExpiresAt = JsonConverters::from('DateTime', $o['CacheExpiresAt']);
if (isset($o['IsFromCache'])) $this->IsFromCache = $o['IsFromCache'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CachedAt)) $o['CachedAt'] = JsonConverters::to('DateTime', $this->CachedAt);
if (isset($this->CacheExpiresAt)) $o['CacheExpiresAt'] = JsonConverters::to('DateTime', $this->CacheExpiresAt);
if (isset($this->IsFromCache)) $o['IsFromCache'] = $this->IsFromCache;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class ResponseMetadata implements JsonSerializable
{
public function __construct(
// @DataMember(Order=0)
/** @var bool|null */
public ?bool $Success=null,
// @DataMember(Order=1)
/** @var bool|null */
public ?bool $HasCache=null,
// @DataMember(Order=2)
/** @var bool|null */
public ?bool $HasPaging=null,
// @DataMember(Order=3, EmitDefaultValue=false)
/** @var CacheMetadata|null */
public ?CacheMetadata $CacheMetadata=null,
// @DataMember(Order=4, EmitDefaultValue=false)
/** @var PagingMetadata|null */
public ?PagingMetadata $PagingMetadata=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Success'])) $this->Success = $o['Success'];
if (isset($o['HasCache'])) $this->HasCache = $o['HasCache'];
if (isset($o['HasPaging'])) $this->HasPaging = $o['HasPaging'];
if (isset($o['CacheMetadata'])) $this->CacheMetadata = JsonConverters::from('CacheMetadata', $o['CacheMetadata']);
if (isset($o['PagingMetadata'])) $this->PagingMetadata = JsonConverters::from('PagingMetadata', $o['PagingMetadata']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Success)) $o['Success'] = $this->Success;
if (isset($this->HasCache)) $o['HasCache'] = $this->HasCache;
if (isset($this->HasPaging)) $o['HasPaging'] = $this->HasPaging;
if (isset($this->CacheMetadata)) $o['CacheMetadata'] = JsonConverters::to('CacheMetadata', $this->CacheMetadata);
if (isset($this->PagingMetadata)) $o['PagingMetadata'] = JsonConverters::to('PagingMetadata', $this->PagingMetadata);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class AgentivityError implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var string|null */
public ?string $ErrorCode=null,
// @DataMember
/** @var string|null */
public ?string $Message=null,
// @DataMember
/** @var string|null */
public ?string $StatusCode=null,
// @DataMember
/** @var string|null */
public ?string $VerboseMessage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ErrorCode'])) $this->ErrorCode = $o['ErrorCode'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['StatusCode'])) $this->StatusCode = $o['StatusCode'];
if (isset($o['VerboseMessage'])) $this->VerboseMessage = $o['VerboseMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ErrorCode)) $o['ErrorCode'] = $this->ErrorCode;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->StatusCode)) $o['StatusCode'] = $this->StatusCode;
if (isset($this->VerboseMessage)) $o['VerboseMessage'] = $this->VerboseMessage;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
/**
* @template TItem
* @template TReport
*/
class ItemResponse2 implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): ItemResponse2 {
$to = new ItemResponse2();
$to->genericArgs = $genericArgs;
return $to;
}
public function __construct(
// @DataMember(Order=1)
/** @var ResponseMetadata|null */
public mixed $ResponseMetadata=null,
// @DataMember(Order=2, EmitDefaultValue=false)
/** @var TReport|null */
public mixed $ResponseReport=null,
// @DataMember(Order=3, EmitDefaultValue=false)
/** @var AgentivityError|null */
public mixed $ResponseError=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseMetadata'])) $this->ResponseMetadata = JsonConverters::from('ResponseMetadata', $o['ResponseMetadata']);
if (isset($o['ResponseReport'])) $this->ResponseReport = JsonConverters::from($this->genericArgs[1], $o['ResponseReport']);
if (isset($o['ResponseError'])) $this->ResponseError = JsonConverters::from('AgentivityError', $o['ResponseError']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseMetadata)) $o['ResponseMetadata'] = JsonConverters::to('ResponseMetadata', $this->ResponseMetadata);
if (isset($this->ResponseReport)) $o['ResponseReport'] = JsonConverters::to($this->genericArgs[1], $this->ResponseReport);
if (isset($this->ResponseError)) $o['ResponseError'] = JsonConverters::to('AgentivityError', $this->ResponseError);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
/**
* @template ItemResponse2 of EventBooking
* @template ItemResponse21 of EventBookingsResponseReport
*/
class EventBookingsItemResponse extends ItemResponse2 implements JsonSerializable
{
/**
* @param ResponseMetadata|null $ResponseMetadata
* @param TReport|null $ResponseReport
* @param AgentivityError|null $ResponseError
*/
public function __construct(
?ResponseMetadata $ResponseMetadata=null,
?TReport $ResponseReport=null,
?AgentivityError $ResponseError=null
) {
parent::__construct($ResponseMetadata,$ResponseReport,$ResponseError);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
return empty($o) ? new class(){} : $o;
}
}
// @DataContract(Namespace="schemas.agentivity.com/types")
class EventBookingsRequest extends PagingMetadata implements JsonSerializable
{
/**
* @param string|null $Offset
* @param string|null $Limit
* @param int $TotalRecords
* @param int $ResponseRecords
*/
public function __construct(
?string $Offset=null,
?string $Limit=null,
int $TotalRecords=0,
int $ResponseRecords=0,
/** @description UserName in form of an email address */
// @DataMember
/** @var string */
public string $UserName='',
/** @description Event code */
// @DataMember
/** @var string|null */
public ?string $EventCode=null,
/** @description Split multiple passengers */
// @DataMember
/** @var bool|null */
public ?bool $SplitMultiplePassengers=null,
/** @description Include notes in the response */
// @DataMember
/** @var bool|null */
public ?bool $IncludeNotes=null,
/** @description Include arrival departures */
// @DataMember
/** @var bool|null */
public ?bool $IncludeArrivalDepartures=null,
/** @description Indicate the required formatting: 0=None(Default), 1=Html, 2=Chart */
// @DataMember
/** @var int */
public int $FormattingStyle=0,
/** @description Itinerary segments to show */
// @DataMember
/** @var string|null */
public ?string $ItinerarySegmentsToShow=null
) {
parent::__construct($Offset,$Limit,$TotalRecords,$ResponseRecords);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['UserName'])) $this->UserName = $o['UserName'];
if (isset($o['EventCode'])) $this->EventCode = $o['EventCode'];
if (isset($o['SplitMultiplePassengers'])) $this->SplitMultiplePassengers = $o['SplitMultiplePassengers'];
if (isset($o['IncludeNotes'])) $this->IncludeNotes = $o['IncludeNotes'];
if (isset($o['IncludeArrivalDepartures'])) $this->IncludeArrivalDepartures = $o['IncludeArrivalDepartures'];
if (isset($o['FormattingStyle'])) $this->FormattingStyle = $o['FormattingStyle'];
if (isset($o['ItinerarySegmentsToShow'])) $this->ItinerarySegmentsToShow = $o['ItinerarySegmentsToShow'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->UserName)) $o['UserName'] = $this->UserName;
if (isset($this->EventCode)) $o['EventCode'] = $this->EventCode;
if (isset($this->SplitMultiplePassengers)) $o['SplitMultiplePassengers'] = $this->SplitMultiplePassengers;
if (isset($this->IncludeNotes)) $o['IncludeNotes'] = $this->IncludeNotes;
if (isset($this->IncludeArrivalDepartures)) $o['IncludeArrivalDepartures'] = $this->IncludeArrivalDepartures;
if (isset($this->FormattingStyle)) $o['FormattingStyle'] = $this->FormattingStyle;
if (isset($this->ItinerarySegmentsToShow)) $o['ItinerarySegmentsToShow'] = $this->ItinerarySegmentsToShow;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /EventBookings HTTP/1.1 Host: api.agentivity.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"ResponseMetadata":{"Success":false,"HasCache":false,"HasPaging":false,"CacheMetadata":{"IsFromCache":false,"CachedAt":"\/Date(-62135596800000-0000)\/","CacheExpiresAt":"\/Date(-62135596800000-0000)\/"},"PagingMetadata":{"Offset":"String","Limit":"String","TotalRecords":0,"ResponseRecords":0}},"ResponseReport":{"Item":{"RecordLocator":"String","PNRCreationDate":"\/Date(-62135596800000-0000)\/","PaxList":"String","PaxCount":0,"AgentivityRef":0,"ItineraryFormatted":"String","Itinerary":[{"SegmentType":"String","SegmentNbr":0,"BoardPoint":"String","OffPoint":"String","OperatorCode":"String","OperatorService":"String","SegmentStatus":"String","DepartureTimeFormatted":"String","ArrivalTimeFormatted":"String","ChangeOfDayFormatted":"String","ServiceCode":"String","StartDate":"String","EndDate":"String","TicketNumber":"String","VendorLocators":"String","EquipmentCode":"String","Equipment":"String"}],"InboundAirline":"String","InboundFlightNumber":"String","InboundArrivalCity":"String","InboundArrivalDate":"\/Date(-62135596800000-0000)\/","InboundArrivalTime":"String","OutboundAirline":"String","OutboundFlightNumber":"String","OutboundDepartureCity":"String","OutboundDepartureDate":"\/Date(-62135596800000-0000)\/","OutboundDepartureTime":"String","Notes":"String","Emails":"String","Mobile":"String","TotalTicketedValue":"String"}},"ResponseError":{"ErrorCode":"String","Message":"String","StatusCode":"String","VerboseMessage":"String"}}