| PUT | /bookings/reschedulebycode/{Id} | Reschedule an existing booking using a cancellation code | Reschedule an existing booking to a new time slot without being authenticated, by providing the booking's cancellation code (the same code used to cancel it, and the one included in the reschedule link sent to customers). The same validations as PUT /bookings/{Id}/reschedule are applied (duration, collisions, schedules, and resource availability). |
|---|
<?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};
enum BookingStatusEnum : int
{
case Booked = 1;
case Unbooked = 2;
case Reserved = 3;
case Canceled = 4;
case AwaitingPayment = 5;
case AwaitingPaymentNoTimeLimit = 6;
case Payed = 7;
case AwaitingPaymentRequestFromAdmin = 8;
case AwaitingPaymentFromProvider = 9;
case Invoiced = 10;
}
class BookingStatusQueryResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Name='',
/** @var string */
public string $Description='',
/** @var string */
public string $Icon='',
/** @var string */
public string $Color=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Icon'])) $this->Icon = $o['Icon'];
if (isset($o['Color'])) $this->Color = $o['Color'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Icon)) $o['Icon'] = $this->Icon;
if (isset($this->Color)) $o['Color'] = $this->Color;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldValueResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Value=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Value'])) $this->Value = $o['Value'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Value)) $o['Value'] = $this->Value;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldConfigData implements JsonSerializable
{
public function __construct(
/** @description Custom field id */
// @ApiMember(Description="Custom field id")
/** @var int */
public int $Id=0,
/** @description Configuration name. Example: 'Number of persons'. */
// @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
/** @var string */
public string $Name='',
/** @description Custom field description. Example: 'For how many persons is this booking?' */
// @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
/** @var string */
public string $Description='',
/** @description Field width. Example: 20 for 20px */
// @ApiMember(Description="Field width. Example: 20 for 20px")
/** @var int|null */
public ?int $Width=null,
/** @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
// @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
/** @var string */
public string $DataType='',
/** @description Default value of the field. Example: '3' */
// @ApiMember(Description="Default value of the field. Example: '3'")
/** @var string */
public string $DefaultValue='',
/** @description Determines if the field is required to have a value or not */
// @ApiMember(Description="Determines if the field is required to have a value or not")
/** @var bool|null */
public ?bool $IsMandatory=null,
/** @description Error message shown to the user if the field data is required but not entered */
// @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
/** @var string */
public string $MandatoryErrorMessage='',
/** @description Max lenght of the field */
// @ApiMember(Description="Max lenght of the field")
/** @var int */
public int $MaxLength=0,
/** @description If the field should have multiple lines */
// @ApiMember(Description="If the field should have multiple lines")
/** @var bool|null */
public ?bool $MultipleLineText=null,
/** @description Regular expression used for validation of the field */
// @ApiMember(Description="Regular expression used for validation of the field")
/** @var string */
public string $RegEx='',
/** @description Error message shown if the regular expression validation failed */
// @ApiMember(Description="Error message shown if the regular expression validation failed")
/** @var string */
public string $RegExErrorMessage='',
/** @description The values to select from if Datatype is DropDown for this custom field */
// @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
/** @var array<CustomFieldValueResponse>|null */
public ?array $Values=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Width'])) $this->Width = $o['Width'];
if (isset($o['DataType'])) $this->DataType = $o['DataType'];
if (isset($o['DefaultValue'])) $this->DefaultValue = $o['DefaultValue'];
if (isset($o['IsMandatory'])) $this->IsMandatory = $o['IsMandatory'];
if (isset($o['MandatoryErrorMessage'])) $this->MandatoryErrorMessage = $o['MandatoryErrorMessage'];
if (isset($o['MaxLength'])) $this->MaxLength = $o['MaxLength'];
if (isset($o['MultipleLineText'])) $this->MultipleLineText = $o['MultipleLineText'];
if (isset($o['RegEx'])) $this->RegEx = $o['RegEx'];
if (isset($o['RegExErrorMessage'])) $this->RegExErrorMessage = $o['RegExErrorMessage'];
if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('CustomFieldValueResponse', $o['Values']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Width)) $o['Width'] = $this->Width;
if (isset($this->DataType)) $o['DataType'] = $this->DataType;
if (isset($this->DefaultValue)) $o['DefaultValue'] = $this->DefaultValue;
if (isset($this->IsMandatory)) $o['IsMandatory'] = $this->IsMandatory;
if (isset($this->MandatoryErrorMessage)) $o['MandatoryErrorMessage'] = $this->MandatoryErrorMessage;
if (isset($this->MaxLength)) $o['MaxLength'] = $this->MaxLength;
if (isset($this->MultipleLineText)) $o['MultipleLineText'] = $this->MultipleLineText;
if (isset($this->RegEx)) $o['RegEx'] = $this->RegEx;
if (isset($this->RegExErrorMessage)) $o['RegExErrorMessage'] = $this->RegExErrorMessage;
if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('CustomFieldValueResponse', $this->Values);
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldDataResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Column='',
/** @var string */
public string $Name='',
/** @var string */
public string $Description='',
/** @var string */
public string $Value='',
/** @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
// @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
/** @var string */
public string $DataType=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Column'])) $this->Column = $o['Column'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['DataType'])) $this->DataType = $o['DataType'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Column)) $o['Column'] = $this->Column;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->DataType)) $o['DataType'] = $this->DataType;
return empty($o) ? new class(){} : $o;
}
}
class BookedResource implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Name='',
/** @var string */
public string $Color='',
/** @var string */
public string $ImageUrl='',
/** @var string */
public string $Email='',
/** @var string */
public string $MobilePhone='',
/** @var string */
public string $AccessGroup='',
/** @var bool|null */
public ?bool $EmailNotification=null,
/** @var bool|null */
public ?bool $SMSNotification=null,
/** @var bool|null */
public ?bool $EmailReminder=null,
/** @var bool|null */
public ?bool $SMSReminder=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
if (isset($o['AccessGroup'])) $this->AccessGroup = $o['AccessGroup'];
if (isset($o['EmailNotification'])) $this->EmailNotification = $o['EmailNotification'];
if (isset($o['SMSNotification'])) $this->SMSNotification = $o['SMSNotification'];
if (isset($o['EmailReminder'])) $this->EmailReminder = $o['EmailReminder'];
if (isset($o['SMSReminder'])) $this->SMSReminder = $o['SMSReminder'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
if (isset($this->AccessGroup)) $o['AccessGroup'] = $this->AccessGroup;
if (isset($this->EmailNotification)) $o['EmailNotification'] = $this->EmailNotification;
if (isset($this->SMSNotification)) $o['SMSNotification'] = $this->SMSNotification;
if (isset($this->EmailReminder)) $o['EmailReminder'] = $this->EmailReminder;
if (isset($this->SMSReminder)) $o['SMSReminder'] = $this->SMSReminder;
return empty($o) ? new class(){} : $o;
}
}
class BookedResourceType implements JsonSerializable
{
public function __construct(
/** @description The resource type id */
// @ApiMember(Description="The resource type id")
/** @var int */
public int $Id=0,
/** @description The resource type name */
// @ApiMember(Description="The resource type name")
/** @var string */
public string $Name='',
/** @description The resources inside resource type */
// @ApiMember(Description="The resources inside resource type")
/** @var array<BookedResource>|null */
public ?array $Resources=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('BookedResource', $o['Resources']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('BookedResource', $this->Resources);
return empty($o) ? new class(){} : $o;
}
}
class BookedCompany implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string */
public string $Name='',
/** @var string */
public string $LogoType='',
/** @var string */
public string $Category='',
/** @var string */
public string $Street1='',
/** @var string */
public string $Street2='',
/** @var string */
public string $ZipCode='',
/** @var string */
public string $City='',
/** @var string */
public string $CountryId='',
/** @var string */
public string $Longitude='',
/** @var string */
public string $Latitude='',
/** @var string */
public string $Phone='',
/** @var string */
public string $Email='',
/** @var string */
public string $HomePage='',
/** @var string */
public string $SitePath='',
/** @var bool|null */
public ?bool $IsFavorite=null,
/** @var int|null */
public ?int $PaymentProviderId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['LogoType'])) $this->LogoType = JsonConverters::from('string', $o['LogoType']);
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['HomePage'])) $this->HomePage = $o['HomePage'];
if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
if (isset($o['IsFavorite'])) $this->IsFavorite = $o['IsFavorite'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->LogoType)) $o['LogoType'] = JsonConverters::to('string', $this->LogoType);
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->Street1)) $o['Street1'] = $this->Street1;
if (isset($this->Street2)) $o['Street2'] = $this->Street2;
if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->HomePage)) $o['HomePage'] = $this->HomePage;
if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
if (isset($this->IsFavorite)) $o['IsFavorite'] = $this->IsFavorite;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
return empty($o) ? new class(){} : $o;
}
}
class TagResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $CompanyId='',
/** @var string */
public string $Name='',
/** @var int */
public int $Scope=0,
/** @var string */
public string $Color='',
/** @var int */
public int $SortOrder=0,
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class BookedCustomer implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string */
public string $Firstname='',
/** @var string */
public string $Lastname='',
/** @var string */
public string $Email='',
/** @var string */
public string $Phone='',
/** @var string */
public string $FacebookUserName='',
/** @var string */
public string $ImageUrl='',
/** @var string */
public string $PersonalIdentityNumber='',
/** @var string */
public string $CorporateIdentityNumber='',
/** @var string */
public string $InvoiceAddress1='',
/** @var string */
public string $InvoiceAddress2='',
/** @var string */
public string $InvoiceCity='',
/** @var string */
public string $InvoicePostalCode='',
/** @var string */
public string $InvoiceCountryCode='',
/** @description Tags attached to this customer. */
// @ApiMember(Description="Tags attached to this customer.")
/** @var array<TagResponse>|null */
public ?array $Tags=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['FacebookUserName'])) $this->FacebookUserName = $o['FacebookUserName'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['PersonalIdentityNumber'])) $this->PersonalIdentityNumber = $o['PersonalIdentityNumber'];
if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
if (isset($o['InvoiceAddress1'])) $this->InvoiceAddress1 = $o['InvoiceAddress1'];
if (isset($o['InvoiceAddress2'])) $this->InvoiceAddress2 = $o['InvoiceAddress2'];
if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
if (isset($o['InvoiceCountryCode'])) $this->InvoiceCountryCode = $o['InvoiceCountryCode'];
if (isset($o['Tags'])) $this->Tags = JsonConverters::fromArray('TagResponse', $o['Tags']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->FacebookUserName)) $o['FacebookUserName'] = $this->FacebookUserName;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->PersonalIdentityNumber)) $o['PersonalIdentityNumber'] = $this->PersonalIdentityNumber;
if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
if (isset($this->InvoiceAddress1)) $o['InvoiceAddress1'] = $this->InvoiceAddress1;
if (isset($this->InvoiceAddress2)) $o['InvoiceAddress2'] = $this->InvoiceAddress2;
if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
if (isset($this->InvoiceCountryCode)) $o['InvoiceCountryCode'] = $this->InvoiceCountryCode;
if (isset($this->Tags)) $o['Tags'] = JsonConverters::toArray('TagResponse', $this->Tags);
return empty($o) ? new class(){} : $o;
}
}
class BookedQuantity implements JsonSerializable
{
public function __construct(
/** @description The quantity Id */
// @ApiMember(Description="The quantity Id")
/** @var int */
public int $Id=0,
/** @description The quantity for booked on this price category */
// @ApiMember(Description="The quantity for booked on this price category")
/** @var int */
public int $Quantity=0,
/** @description The price */
// @ApiMember(Description="The price")
/** @var float|null */
public ?float $Price=null,
/** @description The price bofore rebate codes */
// @ApiMember(Description="The price bofore rebate codes")
/** @var float|null */
public ?float $PriceBeforeRebate=null,
/** @description The price currency */
// @ApiMember(Description="The price currency")
/** @var string */
public string $CurrencyId='',
/** @description The price sign */
// @ApiMember(Description="The price sign")
/** @var string */
public string $PriceSign='',
/** @description The price category */
// @ApiMember(Description="The price category")
/** @var string */
public string $Category='',
/** @description The price VAT in percent */
// @ApiMember(Description="The price VAT in percent")
/** @var float|null */
public ?float $VAT=null,
/** @description The price text to display */
// @ApiMember(Description="The price text to display")
/** @var string */
public string $PriceText='',
/** @description If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. */
// @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
/** @var bool|null */
public ?bool $OccupiesSpot=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['PriceBeforeRebate'])) $this->PriceBeforeRebate = $o['PriceBeforeRebate'];
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['PriceSign'])) $this->PriceSign = $o['PriceSign'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['VAT'])) $this->VAT = $o['VAT'];
if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
if (isset($o['OccupiesSpot'])) $this->OccupiesSpot = $o['OccupiesSpot'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->PriceBeforeRebate)) $o['PriceBeforeRebate'] = $this->PriceBeforeRebate;
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->PriceSign)) $o['PriceSign'] = $this->PriceSign;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->VAT)) $o['VAT'] = $this->VAT;
if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
if (isset($this->OccupiesSpot)) $o['OccupiesSpot'] = $this->OccupiesSpot;
return empty($o) ? new class(){} : $o;
}
}
class GroupBookingSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class MultipleResourceSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class ServiceInfoResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Name='',
/** @var string */
public string $Description='',
/** @var string */
public string $ImageUrl='',
/** @var int|null */
public ?int $LengthInMinutes=null,
/** @var int */
public int $MaxNumberOfSpotsPerBooking=0,
/** @var int */
public int $MinNumberOfSpotsPerBooking=0,
/** @var GroupBookingSettings|null */
public ?GroupBookingSettings $GroupBooking=null,
/** @var MultipleResourceSettings|null */
public ?MultipleResourceSettings $MultipleResource=null,
/** @var bool|null */
public ?bool $IsGroupBooking=null,
/** @var bool|null */
public ?bool $IsPaymentEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['LengthInMinutes'])) $this->LengthInMinutes = $o['LengthInMinutes'];
if (isset($o['MaxNumberOfSpotsPerBooking'])) $this->MaxNumberOfSpotsPerBooking = $o['MaxNumberOfSpotsPerBooking'];
if (isset($o['MinNumberOfSpotsPerBooking'])) $this->MinNumberOfSpotsPerBooking = $o['MinNumberOfSpotsPerBooking'];
if (isset($o['GroupBooking'])) $this->GroupBooking = JsonConverters::from('GroupBookingSettings', $o['GroupBooking']);
if (isset($o['MultipleResource'])) $this->MultipleResource = JsonConverters::from('MultipleResourceSettings', $o['MultipleResource']);
if (isset($o['IsGroupBooking'])) $this->IsGroupBooking = $o['IsGroupBooking'];
if (isset($o['IsPaymentEnabled'])) $this->IsPaymentEnabled = $o['IsPaymentEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->LengthInMinutes)) $o['LengthInMinutes'] = $this->LengthInMinutes;
if (isset($this->MaxNumberOfSpotsPerBooking)) $o['MaxNumberOfSpotsPerBooking'] = $this->MaxNumberOfSpotsPerBooking;
if (isset($this->MinNumberOfSpotsPerBooking)) $o['MinNumberOfSpotsPerBooking'] = $this->MinNumberOfSpotsPerBooking;
if (isset($this->GroupBooking)) $o['GroupBooking'] = JsonConverters::to('GroupBookingSettings', $this->GroupBooking);
if (isset($this->MultipleResource)) $o['MultipleResource'] = JsonConverters::to('MultipleResourceSettings', $this->MultipleResource);
if (isset($this->IsGroupBooking)) $o['IsGroupBooking'] = $this->IsGroupBooking;
if (isset($this->IsPaymentEnabled)) $o['IsPaymentEnabled'] = $this->IsPaymentEnabled;
return empty($o) ? new class(){} : $o;
}
}
class InvoiceAddressResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $InvoiceAddressId='',
/** @var string|null */
public ?string $UserId=null,
/** @var string */
public string $CorporateIdentityNumber='',
/** @var string */
public string $InvoiceAddress1='',
/** @var string */
public string $InvoiceAddress2='',
/** @var string */
public string $InvoiceCity='',
/** @var string */
public string $InvoicePostalCode='',
/** @var string */
public string $InvoiceCountryCode=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['InvoiceAddressId'])) $this->InvoiceAddressId = $o['InvoiceAddressId'];
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
if (isset($o['InvoiceAddress1'])) $this->InvoiceAddress1 = $o['InvoiceAddress1'];
if (isset($o['InvoiceAddress2'])) $this->InvoiceAddress2 = $o['InvoiceAddress2'];
if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
if (isset($o['InvoiceCountryCode'])) $this->InvoiceCountryCode = $o['InvoiceCountryCode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->InvoiceAddressId)) $o['InvoiceAddressId'] = $this->InvoiceAddressId;
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
if (isset($this->InvoiceAddress1)) $o['InvoiceAddress1'] = $this->InvoiceAddress1;
if (isset($this->InvoiceAddress2)) $o['InvoiceAddress2'] = $this->InvoiceAddress2;
if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
if (isset($this->InvoiceCountryCode)) $o['InvoiceCountryCode'] = $this->InvoiceCountryCode;
return empty($o) ? new class(){} : $o;
}
}
class BookingLogEventTypeResponse implements JsonSerializable
{
public function __construct(
/** @description The event type id */
// @ApiMember(Description="The event type id")
/** @var int */
public int $Id=0,
/** @description The event type name */
// @ApiMember(Description="The event type name")
/** @var string */
public string $Name='',
/** @description The event type description */
// @ApiMember(Description="The event type description")
/** @var string */
public string $Description=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
return empty($o) ? new class(){} : $o;
}
}
class BookingLogQueryResponse implements JsonSerializable
{
public function __construct(
/** @description The booking log id */
// @ApiMember(Description="The booking log id")
/** @var int */
public int $Id=0,
/** @description The booking id */
// @ApiMember(Description="The booking id")
/** @var int */
public int $BookingId=0,
/** @description The type of event */
// @ApiMember(Description="The type of event")
/** @var int */
public int $EventTypeId=0,
/** @description The type of event */
// @ApiMember(Description="The type of event")
/** @var BookingLogEventTypeResponse|null */
public ?BookingLogEventTypeResponse $EventType=null,
/** @description Comments that could be added to the event log item */
// @ApiMember(Description="Comments that could be added to the event log item")
/** @var string */
public string $Comments='',
/** @description The user created the event */
// @ApiMember(Description="The user created the event")
/** @var string */
public string $UserName='',
/** @description The date when the event occurred */
// @ApiMember(Description="The date when the event occurred")
/** @var DateTime */
public DateTime $Created=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['EventTypeId'])) $this->EventTypeId = $o['EventTypeId'];
if (isset($o['EventType'])) $this->EventType = JsonConverters::from('BookingLogEventTypeResponse', $o['EventType']);
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['UserName'])) $this->UserName = $o['UserName'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->EventTypeId)) $o['EventTypeId'] = $this->EventTypeId;
if (isset($this->EventType)) $o['EventType'] = JsonConverters::to('BookingLogEventTypeResponse', $this->EventType);
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->UserName)) $o['UserName'] = $this->UserName;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
return empty($o) ? new class(){} : $o;
}
}
class CurrencyInfoResponse implements JsonSerializable
{
public function __construct(
/** @description The currency id */
// @ApiMember(Description="The currency id")
/** @var string */
public string $Id='',
/** @description The currency id */
// @ApiMember(Description="The currency id")
/** @var string */
public string $Name='',
/** @description The currency id */
// @ApiMember(Description="The currency id")
/** @var string */
public string $CurrencySign=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['CurrencySign'])) $this->CurrencySign = $o['CurrencySign'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->CurrencySign)) $o['CurrencySign'] = $this->CurrencySign;
return empty($o) ? new class(){} : $o;
}
}
class BookingPaymentLogQueryResponse implements JsonSerializable
{
public function __construct(
/** @description The booking payment log id */
// @ApiMember(Description="The booking payment log id")
/** @var int */
public int $Id=0,
/** @description The booking id */
// @ApiMember(Description="The booking id")
/** @var int */
public int $BookingId=0,
/** @description The payment reference id */
// @ApiMember(Description="The payment reference id")
/** @var string */
public string $PaymentReferenceId='',
/** @description The payment order item reference id */
// @ApiMember(Description="The payment order item reference id")
/** @var string */
public string $OrderItemReferenceId='',
/** @description The payment reference id */
// @ApiMember(Description="The payment reference id")
/** @var int|null */
public ?int $PaymentProviderId=null,
/** @description The payment amount */
// @ApiMember(Description="The payment amount")
/** @var float */
public float $Amount=0.0,
/** @description The payment VAT in percent */
// @ApiMember(Description="The payment VAT in percent")
/** @var float */
public float $VAT=0.0,
/** @description The payment amount that is credited */
// @ApiMember(Description="The payment amount that is credited")
/** @var float */
public float $AmountCredited=0.0,
/** @description The payment currency id */
// @ApiMember(Description="The payment currency id")
/** @var string */
public string $CurrencyId='',
/** @description The payment currency info */
// @ApiMember(Description="The payment currency info")
/** @var CurrencyInfoResponse|null */
public ?CurrencyInfoResponse $CurrencyInfo=null,
/** @description Comments that could be added to the event log item */
// @ApiMember(Description="Comments that could be added to the event log item")
/** @var string */
public string $Comments='',
/** @description The date when the payment items was created */
// @ApiMember(Description="The date when the payment items was created")
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @description The date when the payment items were updated. */
// @ApiMember(Description="The date when the payment items were updated.")
/** @var DateTime */
public DateTime $Updated=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['PaymentReferenceId'])) $this->PaymentReferenceId = $o['PaymentReferenceId'];
if (isset($o['OrderItemReferenceId'])) $this->OrderItemReferenceId = $o['OrderItemReferenceId'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
if (isset($o['Amount'])) $this->Amount = $o['Amount'];
if (isset($o['VAT'])) $this->VAT = $o['VAT'];
if (isset($o['AmountCredited'])) $this->AmountCredited = $o['AmountCredited'];
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('CurrencyInfoResponse', $o['CurrencyInfo']);
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->PaymentReferenceId)) $o['PaymentReferenceId'] = $this->PaymentReferenceId;
if (isset($this->OrderItemReferenceId)) $o['OrderItemReferenceId'] = $this->OrderItemReferenceId;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
if (isset($this->Amount)) $o['Amount'] = $this->Amount;
if (isset($this->VAT)) $o['VAT'] = $this->VAT;
if (isset($this->AmountCredited)) $o['AmountCredited'] = $this->AmountCredited;
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('CurrencyInfoResponse', $this->CurrencyInfo);
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
return empty($o) ? new class(){} : $o;
}
}
class BookingCheckoutQueryResponse implements JsonSerializable
{
public function __construct(
/** @description The checkout id */
// @ApiMember(Description="The checkout id")
/** @var string */
public string $Id='',
/** @description The booking id */
// @ApiMember(Description="The booking id")
/** @var int */
public int $BookingId=0,
/** @description The purchase id */
// @ApiMember(Description="The purchase id")
/** @var int|null */
public ?int $PurchaseId=null,
/** @description The payment checkout expiration datetime */
// @ApiMember(Description="The payment checkout expiration datetime")
/** @var DateTime|null */
public ?DateTime $ExpirationTime=null,
/** @description The payment snippet code */
// @ApiMember(Description="The payment snippet code")
/** @var string */
public string $Snippet='',
/** @description The payment status */
// @ApiMember(Description="The payment status")
/** @var string */
public string $Status='',
/** @description Log message */
// @ApiMember(Description="Log message")
/** @var string */
public string $Message='',
/** @description When the checkout log item was created */
// @ApiMember(Description="When the checkout log item was created")
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @description When the checkout log item was updated */
// @ApiMember(Description="When the checkout log item was updated")
/** @var DateTime */
public DateTime $Updated=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['PurchaseId'])) $this->PurchaseId = $o['PurchaseId'];
if (isset($o['ExpirationTime'])) $this->ExpirationTime = JsonConverters::from('DateTime', $o['ExpirationTime']);
if (isset($o['Snippet'])) $this->Snippet = $o['Snippet'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->PurchaseId)) $o['PurchaseId'] = $this->PurchaseId;
if (isset($this->ExpirationTime)) $o['ExpirationTime'] = JsonConverters::to('DateTime', $this->ExpirationTime);
if (isset($this->Snippet)) $o['Snippet'] = $this->Snippet;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
return empty($o) ? new class(){} : $o;
}
}
class ExternalReferenceResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $CompanyId='',
/** @var string */
public string $Id='',
/** @var string */
public string $OwnerId='',
/** @var string */
public string $ReferenceType='',
/** @var int */
public int $ReferenceTypeId=0,
/** @var string */
public string $ExternalData='',
/** @var string */
public string $CreatedBy='',
/** @var DateTime */
public DateTime $Updated=new DateTime(),
/** @var DateTime */
public DateTime $Created=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['OwnerId'])) $this->OwnerId = $o['OwnerId'];
if (isset($o['ReferenceType'])) $this->ReferenceType = $o['ReferenceType'];
if (isset($o['ReferenceTypeId'])) $this->ReferenceTypeId = $o['ReferenceTypeId'];
if (isset($o['ExternalData'])) $this->ExternalData = $o['ExternalData'];
if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->OwnerId)) $o['OwnerId'] = $this->OwnerId;
if (isset($this->ReferenceType)) $o['ReferenceType'] = $this->ReferenceType;
if (isset($this->ReferenceTypeId)) $o['ReferenceTypeId'] = $this->ReferenceTypeId;
if (isset($this->ExternalData)) $o['ExternalData'] = $this->ExternalData;
if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
return empty($o) ? new class(){} : $o;
}
}
class BookingQueryResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $CompanyId='',
/** @var DateTime */
public DateTime $From=new DateTime(),
/** @var DateTime */
public DateTime $To=new DateTime(),
/** @var BookingStatusEnum|null */
public ?BookingStatusEnum $Status=null,
/** @var int */
public int $StatusId=0,
/** @var string */
public string $StatusName='',
/** @var BookingStatusQueryResponse|null */
public ?BookingStatusQueryResponse $StatusInfo=null,
/** @var bool|null */
public ?bool $SendEmailReminder=null,
/** @var bool|null */
public ?bool $SendSmsReminder=null,
/** @var bool|null */
public ?bool $SendSmsConfirmation=null,
/** @var bool|null */
public ?bool $SendEmailConfirmation=null,
/** @var DateTime|null */
public ?DateTime $LastTimeToUnBook=null,
/** @var array<CustomFieldConfigData>|null */
public ?array $CustomFields=null,
/** @var array<CustomFieldDataResponse>|null */
public ?array $CustomFieldValues=null,
/** @var array<BookedResourceType>|null */
public ?array $BookedResourceTypes=null,
/** @var BookedCompany|null */
public ?BookedCompany $Company=null,
/** @var BookedCustomer|null */
public ?BookedCustomer $Customer=null,
/** @var array<BookedQuantity>|null */
public ?array $Quantities=null,
/** @var ServiceInfoResponse|null */
public ?ServiceInfoResponse $Service=null,
/** @var InvoiceAddressResponse|null */
public ?InvoiceAddressResponse $InvoiceAddress=null,
/** @var DateTime|null */
public ?DateTime $PaymentExpiration=null,
/** @var array<BookingLogQueryResponse>|null */
public ?array $Log=null,
/** @var array<BookingPaymentLogQueryResponse>|null */
public ?array $PaymentLog=null,
/** @var array<BookingCheckoutQueryResponse>|null */
public ?array $CheckoutLog=null,
/** @var array<ExternalReferenceResponse>|null */
public ?array $ExternalReference=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var int|null */
public ?int $LengthInMinutes=null,
/** @var string */
public string $BookedBy='',
/** @var string */
public string $BookedComments='',
/** @var string */
public string $UnbookedComments='',
/** @var string */
public string $CommentsToCustomer='',
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $UnbookedOn=null,
/** @var string */
public string $CancellationCode='',
/** @var string */
public string $RatingCode='',
/** @description The Google Meet URL for this booking, if Google Meet is enabled and a meeting was created. */
// @ApiMember(Description="The Google Meet URL for this booking, if Google Meet is enabled and a meeting was created.")
/** @var string */
public string $GoogleMeetUrl='',
/** @description Tags attached to this booking. */
// @ApiMember(Description="Tags attached to this booking.")
/** @var array<TagResponse>|null */
public ?array $Tags=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
if (isset($o['Status'])) $this->Status = JsonConverters::from('BookingStatusEnum', $o['Status']);
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
if (isset($o['StatusName'])) $this->StatusName = $o['StatusName'];
if (isset($o['StatusInfo'])) $this->StatusInfo = JsonConverters::from('BookingStatusQueryResponse', $o['StatusInfo']);
if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
if (isset($o['SendSmsReminder'])) $this->SendSmsReminder = $o['SendSmsReminder'];
if (isset($o['SendSmsConfirmation'])) $this->SendSmsConfirmation = $o['SendSmsConfirmation'];
if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
if (isset($o['LastTimeToUnBook'])) $this->LastTimeToUnBook = JsonConverters::from('DateTime', $o['LastTimeToUnBook']);
if (isset($o['CustomFields'])) $this->CustomFields = JsonConverters::fromArray('CustomFieldConfigData', $o['CustomFields']);
if (isset($o['CustomFieldValues'])) $this->CustomFieldValues = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldValues']);
if (isset($o['BookedResourceTypes'])) $this->BookedResourceTypes = JsonConverters::fromArray('BookedResourceType', $o['BookedResourceTypes']);
if (isset($o['Company'])) $this->Company = JsonConverters::from('BookedCompany', $o['Company']);
if (isset($o['Customer'])) $this->Customer = JsonConverters::from('BookedCustomer', $o['Customer']);
if (isset($o['Quantities'])) $this->Quantities = JsonConverters::fromArray('BookedQuantity', $o['Quantities']);
if (isset($o['Service'])) $this->Service = JsonConverters::from('ServiceInfoResponse', $o['Service']);
if (isset($o['InvoiceAddress'])) $this->InvoiceAddress = JsonConverters::from('InvoiceAddressResponse', $o['InvoiceAddress']);
if (isset($o['PaymentExpiration'])) $this->PaymentExpiration = JsonConverters::from('DateTime', $o['PaymentExpiration']);
if (isset($o['Log'])) $this->Log = JsonConverters::fromArray('BookingLogQueryResponse', $o['Log']);
if (isset($o['PaymentLog'])) $this->PaymentLog = JsonConverters::fromArray('BookingPaymentLogQueryResponse', $o['PaymentLog']);
if (isset($o['CheckoutLog'])) $this->CheckoutLog = JsonConverters::fromArray('BookingCheckoutQueryResponse', $o['CheckoutLog']);
if (isset($o['ExternalReference'])) $this->ExternalReference = JsonConverters::fromArray('ExternalReferenceResponse', $o['ExternalReference']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['LengthInMinutes'])) $this->LengthInMinutes = $o['LengthInMinutes'];
if (isset($o['BookedBy'])) $this->BookedBy = $o['BookedBy'];
if (isset($o['BookedComments'])) $this->BookedComments = $o['BookedComments'];
if (isset($o['UnbookedComments'])) $this->UnbookedComments = $o['UnbookedComments'];
if (isset($o['CommentsToCustomer'])) $this->CommentsToCustomer = $o['CommentsToCustomer'];
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['UnbookedOn'])) $this->UnbookedOn = JsonConverters::from('DateTime', $o['UnbookedOn']);
if (isset($o['CancellationCode'])) $this->CancellationCode = $o['CancellationCode'];
if (isset($o['RatingCode'])) $this->RatingCode = $o['RatingCode'];
if (isset($o['GoogleMeetUrl'])) $this->GoogleMeetUrl = $o['GoogleMeetUrl'];
if (isset($o['Tags'])) $this->Tags = JsonConverters::fromArray('TagResponse', $o['Tags']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
if (isset($this->Status)) $o['Status'] = JsonConverters::to('BookingStatusEnum', $this->Status);
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
if (isset($this->StatusName)) $o['StatusName'] = $this->StatusName;
if (isset($this->StatusInfo)) $o['StatusInfo'] = JsonConverters::to('BookingStatusQueryResponse', $this->StatusInfo);
if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
if (isset($this->SendSmsReminder)) $o['SendSmsReminder'] = $this->SendSmsReminder;
if (isset($this->SendSmsConfirmation)) $o['SendSmsConfirmation'] = $this->SendSmsConfirmation;
if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
if (isset($this->LastTimeToUnBook)) $o['LastTimeToUnBook'] = JsonConverters::to('DateTime', $this->LastTimeToUnBook);
if (isset($this->CustomFields)) $o['CustomFields'] = JsonConverters::toArray('CustomFieldConfigData', $this->CustomFields);
if (isset($this->CustomFieldValues)) $o['CustomFieldValues'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldValues);
if (isset($this->BookedResourceTypes)) $o['BookedResourceTypes'] = JsonConverters::toArray('BookedResourceType', $this->BookedResourceTypes);
if (isset($this->Company)) $o['Company'] = JsonConverters::to('BookedCompany', $this->Company);
if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('BookedCustomer', $this->Customer);
if (isset($this->Quantities)) $o['Quantities'] = JsonConverters::toArray('BookedQuantity', $this->Quantities);
if (isset($this->Service)) $o['Service'] = JsonConverters::to('ServiceInfoResponse', $this->Service);
if (isset($this->InvoiceAddress)) $o['InvoiceAddress'] = JsonConverters::to('InvoiceAddressResponse', $this->InvoiceAddress);
if (isset($this->PaymentExpiration)) $o['PaymentExpiration'] = JsonConverters::to('DateTime', $this->PaymentExpiration);
if (isset($this->Log)) $o['Log'] = JsonConverters::toArray('BookingLogQueryResponse', $this->Log);
if (isset($this->PaymentLog)) $o['PaymentLog'] = JsonConverters::toArray('BookingPaymentLogQueryResponse', $this->PaymentLog);
if (isset($this->CheckoutLog)) $o['CheckoutLog'] = JsonConverters::toArray('BookingCheckoutQueryResponse', $this->CheckoutLog);
if (isset($this->ExternalReference)) $o['ExternalReference'] = JsonConverters::toArray('ExternalReferenceResponse', $this->ExternalReference);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->LengthInMinutes)) $o['LengthInMinutes'] = $this->LengthInMinutes;
if (isset($this->BookedBy)) $o['BookedBy'] = $this->BookedBy;
if (isset($this->BookedComments)) $o['BookedComments'] = $this->BookedComments;
if (isset($this->UnbookedComments)) $o['UnbookedComments'] = $this->UnbookedComments;
if (isset($this->CommentsToCustomer)) $o['CommentsToCustomer'] = $this->CommentsToCustomer;
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->UnbookedOn)) $o['UnbookedOn'] = JsonConverters::to('DateTime', $this->UnbookedOn);
if (isset($this->CancellationCode)) $o['CancellationCode'] = $this->CancellationCode;
if (isset($this->RatingCode)) $o['RatingCode'] = $this->RatingCode;
if (isset($this->GoogleMeetUrl)) $o['GoogleMeetUrl'] = $this->GoogleMeetUrl;
if (isset($this->Tags)) $o['Tags'] = JsonConverters::toArray('TagResponse', $this->Tags);
return empty($o) ? new class(){} : $o;
}
}
class QuantityToBook implements JsonSerializable
{
public function __construct(
/** @description If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book) */
// @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true)
/** @var int */
public int $PriceId=0,
/** @description Set the number of spots or resources you want to book on the specific price category */
// @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true)
/** @var int */
public int $Quantity=0,
/** @description If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. */
// @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
/** @var bool|null */
public ?bool $OccupiesSpot=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['OccupiesSpot'])) $this->OccupiesSpot = $o['OccupiesSpot'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->OccupiesSpot)) $o['OccupiesSpot'] = $this->OccupiesSpot;
return empty($o) ? new class(){} : $o;
}
}
class ResourceToBook implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ResourceTypeId=0,
/** @var int */
public int $ResourceId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResourceTypeId'])) $this->ResourceTypeId = $o['ResourceTypeId'];
if (isset($o['ResourceId'])) $this->ResourceId = $o['ResourceId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResourceTypeId)) $o['ResourceTypeId'] = $this->ResourceTypeId;
if (isset($this->ResourceId)) $o['ResourceId'] = $this->ResourceId;
return empty($o) ? new class(){} : $o;
}
}
class ResourceToUpdate implements JsonSerializable
{
public function __construct(
/** @description Set this property to true if you want to autoselected not provided resources. If false you will need to add all resources you want to have booked */
// @ApiMember(Description="Set this property to true if you want to autoselected not provided resources. If false you will need to add all resources you want to have booked")
/** @var bool|null */
public ?bool $AutoSelectNotDefinedResources=null,
/** @description All resources to be booked, if AutoSelectNotDefinedResources is true you will only need to provide the one you want to select, rest will be auto selected if avaiable. */
// @ApiMember(Description="All resources to be booked, if AutoSelectNotDefinedResources is true you will only need to provide the one you want to select, rest will be auto selected if avaiable. ")
/** @var array<ResourceToBook>|null */
public ?array $Resources=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AutoSelectNotDefinedResources'])) $this->AutoSelectNotDefinedResources = $o['AutoSelectNotDefinedResources'];
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('ResourceToBook', $o['Resources']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AutoSelectNotDefinedResources)) $o['AutoSelectNotDefinedResources'] = $this->AutoSelectNotDefinedResources;
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('ResourceToBook', $this->Resources);
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="Booking not found", StatusCode=404)
// @ApiResponse(Description="The requested time slot is not available", StatusCode=409)
class RescheduleBookingByCode implements JsonSerializable
{
public function __construct(
/** @description Id of the booking to reschedule */
// @ApiMember(Description="Id of the booking to reschedule", IsRequired=true, ParameterType="path")
/** @var int */
public int $Id=0,
/** @description The unique cancelation code for that booking */
// @ApiMember(Description="The unique cancelation code for that booking", IsRequired=true)
/** @var string */
public string $CancellationCode='',
/** @description The new datetime you want to start the booking. */
// @ApiMember(Description="The new datetime you want to start the booking.", IsRequired=true)
/** @var DateTime */
public DateTime $From=new DateTime(),
/** @description The new datetime you want to end the booking. */
// @ApiMember(Description="The new datetime you want to end the booking.", IsRequired=true)
/** @var DateTime */
public DateTime $To=new DateTime(),
/** @description Set the number of spots/resources you want to book. If null, existing booking quantities are used. */
// @ApiMember(Description="Set the number of spots/resources you want to book. If null, existing booking quantities are used.")
/** @var QuantityToBook[]|null */
public ?array $Quantities=null,
/** @description Resources you want to change. Leave empty to auto-select resources that are available for the new time. */
// @ApiMember(Description="Resources you want to change. Leave empty to auto-select resources that are available for the new time.")
/** @var ResourceToUpdate|null */
public ?ResourceToUpdate $Resources=null,
/** @description If you want to send SMS confirmation about the reschedule. If null, it will take the default value of the bookings SendSMSConfirmation. */
// @ApiMember(Description="If you want to send SMS confirmation about the reschedule. If null, it will take the default value of the bookings SendSMSConfirmation.")
/** @var bool|null */
public ?bool $SendSmsConfirmation=null,
/** @description If you want to send Email confirmation about the reschedule. If null, it will take the default value of the bookings SendEmailConfirmation. */
// @ApiMember(Description="If you want to send Email confirmation about the reschedule. If null, it will take the default value of the bookings SendEmailConfirmation.")
/** @var bool|null */
public ?bool $SendEmailConfirmation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CancellationCode'])) $this->CancellationCode = $o['CancellationCode'];
if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
if (isset($o['Quantities'])) $this->Quantities = JsonConverters::fromArray('QuantityToBook', $o['Quantities']);
if (isset($o['Resources'])) $this->Resources = JsonConverters::from('ResourceToUpdate', $o['Resources']);
if (isset($o['SendSmsConfirmation'])) $this->SendSmsConfirmation = $o['SendSmsConfirmation'];
if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CancellationCode)) $o['CancellationCode'] = $this->CancellationCode;
if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
if (isset($this->Quantities)) $o['Quantities'] = JsonConverters::toArray('QuantityToBook', $this->Quantities);
if (isset($this->Resources)) $o['Resources'] = JsonConverters::to('ResourceToUpdate', $this->Resources);
if (isset($this->SendSmsConfirmation)) $o['SendSmsConfirmation'] = $this->SendSmsConfirmation;
if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
return empty($o) ? new class(){} : $o;
}
}
PHP RescheduleBookingByCode DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /bookings/reschedulebycode/{Id} HTTP/1.1
Host: testapi.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Id":0,"CancellationCode":"String","Quantities":[{"PriceId":0,"Quantity":0,"OccupiesSpot":false}],"Resources":{"AutoSelectNotDefinedResources":false,"Resources":[{"ResourceTypeId":0,"ResourceId":0}]},"SendSmsConfirmation":false,"SendEmailConfirmation":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Id":0,"Status":"Booked","StatusId":0,"StatusName":"String","StatusInfo":{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"},"SendEmailReminder":false,"SendSmsReminder":false,"SendSmsConfirmation":false,"SendEmailConfirmation":false,"LastTimeToUnBook":"0001-01-01T00:00:00","CustomFields":[{"Id":0,"Name":"String","Description":"String","Width":0,"DataType":"String","DefaultValue":"String","IsMandatory":false,"MandatoryErrorMessage":"String","MaxLength":0,"MultipleLineText":false,"RegEx":"String","RegExErrorMessage":"String","Values":[{"Value":"String"}]}],"CustomFieldValues":[{"Id":0,"Column":"String","Name":"String","Description":"String","Value":"String","DataType":"String"}],"BookedResourceTypes":[{"Id":0,"Name":"String","Resources":[{"Id":0,"Name":"String","Color":"String","Email":"String","MobilePhone":"String","AccessGroup":"String","EmailNotification":false,"SMSNotification":false,"EmailReminder":false,"SMSReminder":false}]}],"Company":{"Name":"String","Category":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Phone":"String","Email":"String","HomePage":"String","SitePath":"String","IsFavorite":false,"PaymentProviderId":0},"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","FacebookUserName":"String","ImageUrl":"String","PersonalIdentityNumber":"String","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String","Tags":[{"Id":0,"Name":"String","Scope":0,"Color":"String","SortOrder":0,"Active":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}]},"Quantities":[{"Id":0,"Quantity":0,"Price":0,"PriceBeforeRebate":0,"CurrencyId":"String","PriceSign":"String","Category":"String","VAT":0,"PriceText":"String","OccupiesSpot":false}],"Service":{"Id":0,"Name":"String","Description":"String","LengthInMinutes":0,"MaxNumberOfSpotsPerBooking":0,"MinNumberOfSpotsPerBooking":0,"GroupBooking":{"Active":false,"Min":0,"Max":0},"MultipleResource":{"Active":false,"Min":0,"Max":0},"IsGroupBooking":false,"IsPaymentEnabled":false},"InvoiceAddress":{"UserId":"00000000-0000-0000-0000-000000000000","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"},"PaymentExpiration":"0001-01-01T00:00:00","Log":[{"Id":0,"BookingId":0,"EventTypeId":0,"EventType":{"Id":0,"Name":"String","Description":"String"},"Comments":"String","UserName":"String"}],"PaymentLog":[{"Id":0,"BookingId":0,"PaymentReferenceId":"String","OrderItemReferenceId":"String","PaymentProviderId":0,"Amount":0,"VAT":0,"AmountCredited":0,"CurrencyId":"String","CurrencyInfo":{"Id":"String","Name":"String","CurrencySign":"String"},"Comments":"String"}],"CheckoutLog":[{"BookingId":0,"PurchaseId":0,"ExpirationTime":"0001-01-01T00:00:00","Snippet":"String","Status":"String","Message":"String"}],"ExternalReference":[{"ReferenceType":"String","ReferenceTypeId":0,"ExternalData":"String","CreatedBy":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"LengthInMinutes":0,"BookedBy":"String","BookedComments":"String","UnbookedComments":"String","CommentsToCustomer":"String","UnbookedOn":"0001-01-01T00:00:00","CancellationCode":"String","RatingCode":"String","GoogleMeetUrl":"String","Tags":[{"Id":0,"Name":"String","Scope":0,"Color":"String","SortOrder":0,"Active":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}]}