Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /timeexceptions | Find time exceptions belonging to resources | Find time exceptions belonging to resources that the user have access to. This method can only be called by users with administrative privilegies. |
---|
<?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
class QueryBase implements JsonSerializable
{
public function __construct(
/** @description Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?skip=10&orderBy=Id</code> */
// @DataMember(Order=1)
/** @var int|null */
public ?int $Skip=null,
/** @description Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?take=20</code> */
// @DataMember(Order=2)
/** @var int|null */
public ?int $Take=null,
/** @description Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderBy=Id,-Age,FirstName</code> */
// @DataMember(Order=3)
/** @var string|null */
public ?string $OrderBy=null,
/** @description Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderByDesc=Id,-Age,FirstName</code> */
// @DataMember(Order=4)
/** @var string|null */
public ?string $OrderByDesc=null,
/** @description Include any of the aggregates <code>AVG, COUNT, FIRST, LAST, MAX, MIN, SUM</code> in your result set. The results will be returned in the meta field.<br/><br/><strong>Example:</strong><br/><code>?include=COUNT(*) as Total</code><br/><br/>or multiple fields with<br/><code>?include=Count(*) Total, Min(Age), AVG(Age) AverageAge</code><br/></br>or unique with<br/><code>?include=COUNT(DISTINCT LivingStatus) as UniqueStatus</code> */
// @DataMember(Order=5)
/** @var string|null */
public ?string $Include=null,
// @DataMember(Order=6)
/** @var string|null */
public ?string $Fields=null,
// @DataMember(Order=7)
/** @var array<string,string>|null */
public ?array $Meta=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Skip'])) $this->Skip = $o['Skip'];
if (isset($o['Take'])) $this->Take = $o['Take'];
if (isset($o['OrderBy'])) $this->OrderBy = $o['OrderBy'];
if (isset($o['OrderByDesc'])) $this->OrderByDesc = $o['OrderByDesc'];
if (isset($o['Include'])) $this->Include = $o['Include'];
if (isset($o['Fields'])) $this->Fields = $o['Fields'];
if (isset($o['Meta'])) $this->Meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Meta']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Skip)) $o['Skip'] = $this->Skip;
if (isset($this->Take)) $o['Take'] = $this->Take;
if (isset($this->OrderBy)) $o['OrderBy'] = $this->OrderBy;
if (isset($this->OrderByDesc)) $o['OrderByDesc'] = $this->OrderByDesc;
if (isset($this->Include)) $o['Include'] = $this->Include;
if (isset($this->Fields)) $o['Fields'] = $this->Fields;
if (isset($this->Meta)) $o['Meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Meta);
return empty($o) ? new class(){} : $o;
}
}
/**
* @template From
* @template Into
*/
class QueryDb2 extends QueryBase implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): QueryDb2 {
$to = new QueryDb2();
$to->genericArgs = $genericArgs;
return $to;
}
/**
* @param int|null $Skip
* @param int|null $Take
* @param string|null $OrderBy
* @param string|null $OrderByDesc
* @param string|null $Include
* @param string|null $Fields
* @param array<string,string>|null $Meta
*/
public function __construct(
mixed $Skip=null,
mixed $Take=null,
mixed $OrderBy=null,
mixed $OrderByDesc=null,
mixed $Include=null,
mixed $Fields=null,
mixed $Meta=null
) {
parent::__construct($Skip,$Take,$OrderBy,$OrderByDesc,$Include,$Fields,$Meta);
}
/** @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;
}
}
class TimeExceptionReosurceDetails implements JsonSerializable
{
public function __construct(
/** @description Ids of the resources that owns this exception */
// @ApiMember(Description="Ids of the resources that owns this exception")
/** @var int */
public int $Id=0,
/** @description Name of the resource */
// @ApiMember(Description="Name of the resource")
/** @var string|null */
public ?string $Name=null,
/** @description Description of the resource */
// @ApiMember(Description="Description of the resource")
/** @var string|null */
public ?string $Description=null,
/** @description Color of the resource */
// @ApiMember(Description="Color of the resource")
/** @var string|null */
public ?string $Color=null,
/** @description Image of the resource */
// @ApiMember(Description="Image of the resource")
/** @var string|null */
public ?string $ImageUrl=null,
/** @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['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
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->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class ExceptionCalendarExportStatus implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $CalendarId=null,
/** @var int */
public int $ExceptionId=0,
/** @var bool|null */
public ?bool $Synced=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
if (isset($o['ExceptionId'])) $this->ExceptionId = $o['ExceptionId'];
if (isset($o['Synced'])) $this->Synced = $o['Synced'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
if (isset($this->ExceptionId)) $o['ExceptionId'] = $this->ExceptionId;
if (isset($this->Synced)) $o['Synced'] = $this->Synced;
return empty($o) ? new class(){} : $o;
}
}
class DayOfWeekDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $DayOfWeekId=0,
/** @var int */
public int $DotNetDayOfWeekId=0,
/** @var string|null */
public ?string $DayOfWeek=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DayOfWeekId'])) $this->DayOfWeekId = $o['DayOfWeekId'];
if (isset($o['DotNetDayOfWeekId'])) $this->DotNetDayOfWeekId = $o['DotNetDayOfWeekId'];
if (isset($o['DayOfWeek'])) $this->DayOfWeek = $o['DayOfWeek'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DayOfWeekId)) $o['DayOfWeekId'] = $this->DayOfWeekId;
if (isset($this->DotNetDayOfWeekId)) $o['DotNetDayOfWeekId'] = $this->DotNetDayOfWeekId;
if (isset($this->DayOfWeek)) $o['DayOfWeek'] = $this->DayOfWeek;
return empty($o) ? new class(){} : $o;
}
}
class ResourceTimeExceptionQueryResponse implements JsonSerializable
{
public function __construct(
/** @description Time exception id */
// @ApiMember(Description="Time exception id")
/** @var int */
public int $Id=0,
/** @description Time company id */
// @ApiMember(Description="Time company id")
/** @var string */
public string $CompanyId='',
/** @description If it's locked for editing for the logged in administrator */
// @ApiMember(Description="If it's locked for editing for the logged in administrator")
/** @var bool|null */
public ?bool $Locked=null,
/** @description Resources that owns this exception */
// @ApiMember(Description="Resources that owns this exception")
/** @var int[]|null */
public ?array $ResourceIds=null,
/** @description Resources that owns this exception */
// @ApiMember(Description="Resources that owns this exception")
/** @var array<TimeExceptionReosurceDetails>|null */
public ?array $Resources=null,
/** @description Indicates wheter or not the time exception is recurring */
// @ApiMember(Description="Indicates wheter or not the time exception is recurring")
/** @var bool|null */
public ?bool $IsRecurring=null,
/** @description Time exception starting timestamp */
// @ApiMember(Description="Time exception starting timestamp")
/** @var DateTime */
public DateTime $From=new DateTime(),
/** @description Time exception ending timestamp */
// @ApiMember(Description="Time exception ending timestamp")
/** @var DateTime */
public DateTime $To=new DateTime(),
/** @description If recurring then this value indicates the time of day when the time exception begins */
// @ApiMember(Description="If recurring then this value indicates the time of day when the time exception begins")
/** @var DateInterval|null */
public ?DateInterval $FromTime=null,
/** @description If recurring then this value indicates the time of day when the time exception ends */
// @ApiMember(Description="If recurring then this value indicates the time of day when the time exception ends")
/** @var DateInterval|null */
public ?DateInterval $ToTime=null,
/** @description The reason of the time exception, example: Vacation, doctors appointment, ... */
// @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...")
/** @var string|null */
public ?string $ReasonText=null,
/** @description The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ... */
// @ApiMember(Description="The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...")
/** @var string|null */
public ?string $ReasonTextPublic=null,
/** @description What hexadecimal color code the exception should have in the scheduler */
// @ApiMember(Description="What hexadecimal color code the exception should have in the scheduler")
/** @var string|null */
public ?string $Color=null,
/** @description If the time exception should block the time in the scheduler so it's not avaialable to book */
// @ApiMember(Description="If the time exception should block the time in the scheduler so it's not avaialable to book")
/** @var bool|null */
public ?bool $BlockTime=null,
/** @description If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it */
// @ApiMember(Description="If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it")
/** @var bool|null */
public ?bool $Private=null,
/** @description The status for export to calendars like Gcal */
// @ApiMember(Description="The status for export to calendars like Gcal")
/** @var ExceptionCalendarExportStatus|null */
public ?ExceptionCalendarExportStatus $CalendarExportStatus=null,
/** @description If recurring, an array indicating which days of the week the exception recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs */
// @ApiMember(Description="If recurring, an array indicating which days of the week the exception recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs")
/** @var array<DayOfWeekDto>|null */
public ?array $DaysOfWeek=null,
/** @description The datetime the exception was created */
// @ApiMember(Description="The datetime the exception was created")
/** @var DateTime */
public DateTime $Created=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['Locked'])) $this->Locked = $o['Locked'];
if (isset($o['ResourceIds'])) $this->ResourceIds = JsonConverters::fromArray('int', $o['ResourceIds']);
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('TimeExceptionReosurceDetails', $o['Resources']);
if (isset($o['IsRecurring'])) $this->IsRecurring = $o['IsRecurring'];
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['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
if (isset($o['ReasonText'])) $this->ReasonText = $o['ReasonText'];
if (isset($o['ReasonTextPublic'])) $this->ReasonTextPublic = $o['ReasonTextPublic'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['BlockTime'])) $this->BlockTime = $o['BlockTime'];
if (isset($o['Private'])) $this->Private = $o['Private'];
if (isset($o['CalendarExportStatus'])) $this->CalendarExportStatus = JsonConverters::from('ExceptionCalendarExportStatus', $o['CalendarExportStatus']);
if (isset($o['DaysOfWeek'])) $this->DaysOfWeek = JsonConverters::fromArray('DayOfWeekDto', $o['DaysOfWeek']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
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->Locked)) $o['Locked'] = $this->Locked;
if (isset($this->ResourceIds)) $o['ResourceIds'] = JsonConverters::toArray('int', $this->ResourceIds);
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('TimeExceptionReosurceDetails', $this->Resources);
if (isset($this->IsRecurring)) $o['IsRecurring'] = $this->IsRecurring;
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->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
if (isset($this->ReasonText)) $o['ReasonText'] = $this->ReasonText;
if (isset($this->ReasonTextPublic)) $o['ReasonTextPublic'] = $this->ReasonTextPublic;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->BlockTime)) $o['BlockTime'] = $this->BlockTime;
if (isset($this->Private)) $o['Private'] = $this->Private;
if (isset($this->CalendarExportStatus)) $o['CalendarExportStatus'] = JsonConverters::to('ExceptionCalendarExportStatus', $this->CalendarExportStatus);
if (isset($this->DaysOfWeek)) $o['DaysOfWeek'] = JsonConverters::toArray('DayOfWeekDto', $this->DaysOfWeek);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class BaseModel implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
enum BokaMeraDayOfWeek : int
{
case Monday = 1;
case Tuesday = 2;
case Wednesday = 3;
case Thursday = 4;
case Friday = 5;
case Saturday = 6;
case Sunday = 7;
}
class ResourceTimeExceptionDayOfWeekRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var BokaMeraDayOfWeek|null */
public ?BokaMeraDayOfWeek $DayOfWeek=null,
// @Required()
/** @var int */
public int $DayOfWeekId=0,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $ResourceTimeExceptionId=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DayOfWeek'])) $this->DayOfWeek = JsonConverters::from('BokaMeraDayOfWeek', $o['DayOfWeek']);
if (isset($o['DayOfWeekId'])) $this->DayOfWeekId = $o['DayOfWeekId'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['ResourceTimeExceptionId'])) $this->ResourceTimeExceptionId = $o['ResourceTimeExceptionId'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DayOfWeek)) $o['DayOfWeek'] = JsonConverters::to('BokaMeraDayOfWeek', $this->DayOfWeek);
if (isset($this->DayOfWeekId)) $o['DayOfWeekId'] = $this->DayOfWeekId;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->ResourceTimeExceptionId)) $o['ResourceTimeExceptionId'] = $this->ResourceTimeExceptionId;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
enum ScheduleType : string
{
case NotDefined = 'NotDefined';
case RecurringSchedule = 'RecurringSchedule';
case DateSchedule = 'DateSchedule';
}
/**
* @property array<Resource>|null $Resources
* @property ScheduleType $Type
* @property bool $Active
* @property bool $IsResourceSpecific
*/
interface ISchedule
{
}
/**
* @property int $Id
* @property string|null $ReasonText
* @property bool $IsBlock
* @property string|null $ReasonTextPublic
* @property bool $IsRecurring
* @property int[]|null $ResourceIds
*/
interface ITimeException extends IInterval
{
}
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 BookedCustomer implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string|null */
public ?string $Firstname=null,
/** @var string|null */
public ?string $Lastname=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $FacebookUserName=null,
/** @var string|null */
public ?string $ImageUrl=null,
/** @var string|null */
public ?string $CorporateIdentityNumber=null,
/** @var string|null */
public ?string $InvoiceAddress1=null,
/** @var string|null */
public ?string $InvoiceAddress2=null,
/** @var string|null */
public ?string $InvoiceCity=null,
/** @var string|null */
public ?string $InvoicePostalCode=null,
/** @var string|null */
public ?string $InvoiceCountryCode=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['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->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->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;
}
}
/**
* @property int $Id
* @property int $ServiceId
* @property int $BookedSpots
* @property int $TotalSpots
* @property int $PauseAfterInMinutes
* @property BookingStatusEnum $Status
* @property int $StatusId
* @property BookedCustomer|null $Customer
*/
interface IBookedTime extends IInterval
{
}
class CustomFieldValue extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $Value='',
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var int|null */
public ?int $SortOrder=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class CustomField extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Table='',
// @Required()
/** @var string */
public string $Column='',
// @Required()
/** @var string */
public string $DataType='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Table'])) $this->Table = $o['Table'];
if (isset($o['Column'])) $this->Column = $o['Column'];
if (isset($o['DataType'])) $this->DataType = $o['DataType'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Table)) $o['Table'] = $this->Table;
if (isset($this->Column)) $o['Column'] = $this->Column;
if (isset($this->DataType)) $o['DataType'] = $this->DataType;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class RegEx extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $RegExCode='',
/** @var string|null */
public ?string $ErrorMessage=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['RegExCode'])) $this->RegExCode = $o['RegExCode'];
if (isset($o['ErrorMessage'])) $this->ErrorMessage = $o['ErrorMessage'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->RegExCode)) $o['RegExCode'] = $this->RegExCode;
if (isset($this->ErrorMessage)) $o['ErrorMessage'] = $this->ErrorMessage;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class ResourceType extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var bool|null */
public ?bool $SelectableByUser=null,
// @Ignore()
/** @var array<Resource>|null */
public ?array $Resources=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Description=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['SelectableByUser'])) $this->SelectableByUser = $o['SelectableByUser'];
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
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['Active'])) $this->Active = $o['Active'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->SelectableByUser)) $o['SelectableByUser'] = $this->SelectableByUser;
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
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->Active)) $o['Active'] = $this->Active;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeType extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Description=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class AppliedRebateCodes implements JsonSerializable
{
public function __construct(
/** @var int */
public int $RebateCodeId=0,
/** @var string|null */
public ?string $RebateCodeSign=null,
/** @var int */
public int $RebateCodeValue=0,
/** @var float */
public float $RebateAmount=0.0,
/** @var RebateCodeType|null */
public ?RebateCodeType $RebateCodeType=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['RebateCodeSign'])) $this->RebateCodeSign = $o['RebateCodeSign'];
if (isset($o['RebateCodeValue'])) $this->RebateCodeValue = $o['RebateCodeValue'];
if (isset($o['RebateAmount'])) $this->RebateAmount = $o['RebateAmount'];
if (isset($o['RebateCodeType'])) $this->RebateCodeType = JsonConverters::from('RebateCodeType', $o['RebateCodeType']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->RebateCodeSign)) $o['RebateCodeSign'] = $this->RebateCodeSign;
if (isset($this->RebateCodeValue)) $o['RebateCodeValue'] = $this->RebateCodeValue;
if (isset($this->RebateAmount)) $o['RebateAmount'] = $this->RebateAmount;
if (isset($this->RebateCodeType)) $o['RebateCodeType'] = JsonConverters::to('RebateCodeType', $this->RebateCodeType);
return empty($o) ? new class(){} : $o;
}
}
class TotalPriceInformation implements JsonSerializable
{
public function __construct(
/** @var float */
public float $TotalPrice=0.0,
/** @var float */
public float $TotalVATAmount=0.0,
/** @var float */
public float $TotalRebate=0.0,
/** @var float */
public float $TotalPriceBeforeRebate=0.0,
/** @var array<AppliedRebateCodes>|null */
public ?array $AppliedCodes=null,
/** @var string|null */
public ?string $PriceSign=null,
/** @var string|null */
public ?string $CurrencyId=null,
/** @var float */
public float $VAT=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TotalPrice'])) $this->TotalPrice = $o['TotalPrice'];
if (isset($o['TotalVATAmount'])) $this->TotalVATAmount = $o['TotalVATAmount'];
if (isset($o['TotalRebate'])) $this->TotalRebate = $o['TotalRebate'];
if (isset($o['TotalPriceBeforeRebate'])) $this->TotalPriceBeforeRebate = $o['TotalPriceBeforeRebate'];
if (isset($o['AppliedCodes'])) $this->AppliedCodes = JsonConverters::fromArray('AppliedRebateCodes', $o['AppliedCodes']);
if (isset($o['PriceSign'])) $this->PriceSign = $o['PriceSign'];
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['VAT'])) $this->VAT = $o['VAT'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TotalPrice)) $o['TotalPrice'] = $this->TotalPrice;
if (isset($this->TotalVATAmount)) $o['TotalVATAmount'] = $this->TotalVATAmount;
if (isset($this->TotalRebate)) $o['TotalRebate'] = $this->TotalRebate;
if (isset($this->TotalPriceBeforeRebate)) $o['TotalPriceBeforeRebate'] = $this->TotalPriceBeforeRebate;
if (isset($this->AppliedCodes)) $o['AppliedCodes'] = JsonConverters::toArray('AppliedRebateCodes', $this->AppliedCodes);
if (isset($this->PriceSign)) $o['PriceSign'] = $this->PriceSign;
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->VAT)) $o['VAT'] = $this->VAT;
return empty($o) ? new class(){} : $o;
}
}
enum Currency : int
{
case SEK = 1;
case EUR = 2;
}
class PriceMapping extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var string */
public string $Id='',
// @Required()
/** @var int */
public int $PriceId=0,
/** @var string|null */
public ?string $ReferenceType=null,
/** @var string|null */
public ?string $ExternalReference=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
if (isset($o['ReferenceType'])) $this->ReferenceType = $o['ReferenceType'];
if (isset($o['ExternalReference'])) $this->ExternalReference = $o['ExternalReference'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
if (isset($this->ReferenceType)) $o['ReferenceType'] = $this->ReferenceType;
if (isset($this->ExternalReference)) $o['ExternalReference'] = $this->ExternalReference;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class ServicePriceDayOfWeekRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var BokaMeraDayOfWeek|null */
public ?BokaMeraDayOfWeek $DayOfWeek=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $ServicePriceId=0,
// @Required()
/** @var int */
public int $DayOfWeekId=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DayOfWeek'])) $this->DayOfWeek = JsonConverters::from('BokaMeraDayOfWeek', $o['DayOfWeek']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['ServicePriceId'])) $this->ServicePriceId = $o['ServicePriceId'];
if (isset($o['DayOfWeekId'])) $this->DayOfWeekId = $o['DayOfWeekId'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DayOfWeek)) $o['DayOfWeek'] = JsonConverters::to('BokaMeraDayOfWeek', $this->DayOfWeek);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->ServicePriceId)) $o['ServicePriceId'] = $this->ServicePriceId;
if (isset($this->DayOfWeekId)) $o['DayOfWeekId'] = $this->DayOfWeekId;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
interface IDbConnectionFactory
{
}
class ServerData implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $HTTP_HOST=null,
/** @var string|null */
public ?string $HTTP_CONNECTION=null,
/** @var string|null */
public ?string $HTTP_CACHE_CONTROL=null,
/** @var string|null */
public ?string $HTTP_ACCEPT=null,
/** @var string|null */
public ?string $HTTP_USER_AGENT=null,
/** @var string|null */
public ?string $HTTP_ACCEPT_ENCODING=null,
/** @var string|null */
public ?string $HTTP_ACCEPT_LANGUAGE=null,
/** @var string|null */
public ?string $PATH=null,
/** @var string|null */
public ?string $SERVER_SOFTWARE=null,
/** @var string|null */
public ?string $SERVER_NAME=null,
/** @var string|null */
public ?string $SERVER_ADDR=null,
/** @var string|null */
public ?string $SERVER_PORT=null,
/** @var string|null */
public ?string $REMOTE_ADDR=null,
/** @var string|null */
public ?string $REMOTE_PORT=null,
/** @var string|null */
public ?string $GATEWAY_INTERFACE=null,
/** @var string|null */
public ?string $SERVER_PROTOCOL=null,
/** @var string|null */
public ?string $REQUEST_METHOD=null,
/** @var string|null */
public ?string $QUERY_STRING=null,
/** @var string|null */
public ?string $REQUEST_TIME=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HTTP_HOST'])) $this->HTTP_HOST = $o['HTTP_HOST'];
if (isset($o['HTTP_CONNECTION'])) $this->HTTP_CONNECTION = $o['HTTP_CONNECTION'];
if (isset($o['HTTP_CACHE_CONTROL'])) $this->HTTP_CACHE_CONTROL = $o['HTTP_CACHE_CONTROL'];
if (isset($o['HTTP_ACCEPT'])) $this->HTTP_ACCEPT = $o['HTTP_ACCEPT'];
if (isset($o['HTTP_USER_AGENT'])) $this->HTTP_USER_AGENT = $o['HTTP_USER_AGENT'];
if (isset($o['HTTP_ACCEPT_ENCODING'])) $this->HTTP_ACCEPT_ENCODING = $o['HTTP_ACCEPT_ENCODING'];
if (isset($o['HTTP_ACCEPT_LANGUAGE'])) $this->HTTP_ACCEPT_LANGUAGE = $o['HTTP_ACCEPT_LANGUAGE'];
if (isset($o['PATH'])) $this->PATH = $o['PATH'];
if (isset($o['SERVER_SOFTWARE'])) $this->SERVER_SOFTWARE = $o['SERVER_SOFTWARE'];
if (isset($o['SERVER_NAME'])) $this->SERVER_NAME = $o['SERVER_NAME'];
if (isset($o['SERVER_ADDR'])) $this->SERVER_ADDR = $o['SERVER_ADDR'];
if (isset($o['SERVER_PORT'])) $this->SERVER_PORT = $o['SERVER_PORT'];
if (isset($o['REMOTE_ADDR'])) $this->REMOTE_ADDR = $o['REMOTE_ADDR'];
if (isset($o['REMOTE_PORT'])) $this->REMOTE_PORT = $o['REMOTE_PORT'];
if (isset($o['GATEWAY_INTERFACE'])) $this->GATEWAY_INTERFACE = $o['GATEWAY_INTERFACE'];
if (isset($o['SERVER_PROTOCOL'])) $this->SERVER_PROTOCOL = $o['SERVER_PROTOCOL'];
if (isset($o['REQUEST_METHOD'])) $this->REQUEST_METHOD = $o['REQUEST_METHOD'];
if (isset($o['QUERY_STRING'])) $this->QUERY_STRING = $o['QUERY_STRING'];
if (isset($o['REQUEST_TIME'])) $this->REQUEST_TIME = $o['REQUEST_TIME'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HTTP_HOST)) $o['HTTP_HOST'] = $this->HTTP_HOST;
if (isset($this->HTTP_CONNECTION)) $o['HTTP_CONNECTION'] = $this->HTTP_CONNECTION;
if (isset($this->HTTP_CACHE_CONTROL)) $o['HTTP_CACHE_CONTROL'] = $this->HTTP_CACHE_CONTROL;
if (isset($this->HTTP_ACCEPT)) $o['HTTP_ACCEPT'] = $this->HTTP_ACCEPT;
if (isset($this->HTTP_USER_AGENT)) $o['HTTP_USER_AGENT'] = $this->HTTP_USER_AGENT;
if (isset($this->HTTP_ACCEPT_ENCODING)) $o['HTTP_ACCEPT_ENCODING'] = $this->HTTP_ACCEPT_ENCODING;
if (isset($this->HTTP_ACCEPT_LANGUAGE)) $o['HTTP_ACCEPT_LANGUAGE'] = $this->HTTP_ACCEPT_LANGUAGE;
if (isset($this->PATH)) $o['PATH'] = $this->PATH;
if (isset($this->SERVER_SOFTWARE)) $o['SERVER_SOFTWARE'] = $this->SERVER_SOFTWARE;
if (isset($this->SERVER_NAME)) $o['SERVER_NAME'] = $this->SERVER_NAME;
if (isset($this->SERVER_ADDR)) $o['SERVER_ADDR'] = $this->SERVER_ADDR;
if (isset($this->SERVER_PORT)) $o['SERVER_PORT'] = $this->SERVER_PORT;
if (isset($this->REMOTE_ADDR)) $o['REMOTE_ADDR'] = $this->REMOTE_ADDR;
if (isset($this->REMOTE_PORT)) $o['REMOTE_PORT'] = $this->REMOTE_PORT;
if (isset($this->GATEWAY_INTERFACE)) $o['GATEWAY_INTERFACE'] = $this->GATEWAY_INTERFACE;
if (isset($this->SERVER_PROTOCOL)) $o['SERVER_PROTOCOL'] = $this->SERVER_PROTOCOL;
if (isset($this->REQUEST_METHOD)) $o['REQUEST_METHOD'] = $this->REQUEST_METHOD;
if (isset($this->QUERY_STRING)) $o['QUERY_STRING'] = $this->QUERY_STRING;
if (isset($this->REQUEST_TIME)) $o['REQUEST_TIME'] = $this->REQUEST_TIME;
return empty($o) ? new class(){} : $o;
}
}
class Credentials implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $hash=null,
/** @var string|null */
public ?string $id=null,
/** @var string|null */
public ?string $version=null,
/** @var string|null */
public ?string $client=null,
/** @var ServerData|null */
public ?ServerData $serverdata=null,
/** @var string|null */
public ?string $time=null,
/** @var string|null */
public ?string $test=null,
/** @var string|null */
public ?string $language=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['hash'])) $this->hash = $o['hash'];
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['version'])) $this->version = $o['version'];
if (isset($o['client'])) $this->client = $o['client'];
if (isset($o['serverdata'])) $this->serverdata = JsonConverters::from('ServerData', $o['serverdata']);
if (isset($o['time'])) $this->time = $o['time'];
if (isset($o['test'])) $this->test = $o['test'];
if (isset($o['language'])) $this->language = $o['language'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->hash)) $o['hash'] = $this->hash;
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->version)) $o['version'] = $this->version;
if (isset($this->client)) $o['client'] = $this->client;
if (isset($this->serverdata)) $o['serverdata'] = JsonConverters::to('ServerData', $this->serverdata);
if (isset($this->time)) $o['time'] = $this->time;
if (isset($this->test)) $o['test'] = $this->test;
if (isset($this->language)) $o['language'] = $this->language;
return empty($o) ? new class(){} : $o;
}
}
class CheckoutData implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $terms=null,
/** @var string|null */
public ?string $privacyPolicy=null,
/** @var string|null */
public ?string $redirectOnSuccess=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['terms'])) $this->terms = JsonConverters::from('string', $o['terms']);
if (isset($o['privacyPolicy'])) $this->privacyPolicy = JsonConverters::from('string', $o['privacyPolicy']);
if (isset($o['redirectOnSuccess'])) $this->redirectOnSuccess = $o['redirectOnSuccess'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->terms)) $o['terms'] = JsonConverters::to('string', $this->terms);
if (isset($this->privacyPolicy)) $o['privacyPolicy'] = JsonConverters::to('string', $this->privacyPolicy);
if (isset($this->redirectOnSuccess)) $o['redirectOnSuccess'] = $this->redirectOnSuccess;
return empty($o) ? new class(){} : $o;
}
}
class CheckoutPaymentData implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $currency=null,
/** @var string|null */
public ?string $language=null,
/** @var string|null */
public ?string $country=null,
/** @var string|null */
public ?string $autoactivate=null,
/** @var string|null */
public ?string $orderid=null,
/** @var string|null */
public ?string $returnmethod=null,
/** @var string|null */
public ?string $accepturl=null,
/** @var string|null */
public ?string $cancelurl=null,
/** @var string|null */
public ?string $callbackurl=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['currency'])) $this->currency = $o['currency'];
if (isset($o['language'])) $this->language = $o['language'];
if (isset($o['country'])) $this->country = $o['country'];
if (isset($o['autoactivate'])) $this->autoactivate = $o['autoactivate'];
if (isset($o['orderid'])) $this->orderid = $o['orderid'];
if (isset($o['returnmethod'])) $this->returnmethod = $o['returnmethod'];
if (isset($o['accepturl'])) $this->accepturl = JsonConverters::from('string', $o['accepturl']);
if (isset($o['cancelurl'])) $this->cancelurl = JsonConverters::from('string', $o['cancelurl']);
if (isset($o['callbackurl'])) $this->callbackurl = JsonConverters::from('string', $o['callbackurl']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->currency)) $o['currency'] = $this->currency;
if (isset($this->language)) $o['language'] = $this->language;
if (isset($this->country)) $o['country'] = $this->country;
if (isset($this->autoactivate)) $o['autoactivate'] = $this->autoactivate;
if (isset($this->orderid)) $o['orderid'] = $this->orderid;
if (isset($this->returnmethod)) $o['returnmethod'] = $this->returnmethod;
if (isset($this->accepturl)) $o['accepturl'] = JsonConverters::to('string', $this->accepturl);
if (isset($this->cancelurl)) $o['cancelurl'] = JsonConverters::to('string', $this->cancelurl);
if (isset($this->callbackurl)) $o['callbackurl'] = JsonConverters::to('string', $this->callbackurl);
return empty($o) ? new class(){} : $o;
}
}
class PaymentInfo implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $paymentdate=null,
/** @var string|null */
public ?string $paymentterms=null,
/** @var string|null */
public ?string $yourreference=null,
/** @var string|null */
public ?string $ourreference=null,
/** @var string|null */
public ?string $projectname=null,
/** @var string|null */
public ?string $deliverymethod=null,
/** @var string|null */
public ?string $deliveryterms=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['paymentdate'])) $this->paymentdate = $o['paymentdate'];
if (isset($o['paymentterms'])) $this->paymentterms = $o['paymentterms'];
if (isset($o['yourreference'])) $this->yourreference = $o['yourreference'];
if (isset($o['ourreference'])) $this->ourreference = $o['ourreference'];
if (isset($o['projectname'])) $this->projectname = $o['projectname'];
if (isset($o['deliverymethod'])) $this->deliverymethod = $o['deliverymethod'];
if (isset($o['deliveryterms'])) $this->deliveryterms = $o['deliveryterms'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->paymentdate)) $o['paymentdate'] = $this->paymentdate;
if (isset($this->paymentterms)) $o['paymentterms'] = $this->paymentterms;
if (isset($this->yourreference)) $o['yourreference'] = $this->yourreference;
if (isset($this->ourreference)) $o['ourreference'] = $this->ourreference;
if (isset($this->projectname)) $o['projectname'] = $this->projectname;
if (isset($this->deliverymethod)) $o['deliverymethod'] = $this->deliverymethod;
if (isset($this->deliveryterms)) $o['deliveryterms'] = $this->deliveryterms;
return empty($o) ? new class(){} : $o;
}
}
class CartHandling implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $withouttax=null,
/** @var string|null */
public ?string $taxrate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['withouttax'])) $this->withouttax = $o['withouttax'];
if (isset($o['taxrate'])) $this->taxrate = $o['taxrate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->withouttax)) $o['withouttax'] = $this->withouttax;
if (isset($this->taxrate)) $o['taxrate'] = $this->taxrate;
return empty($o) ? new class(){} : $o;
}
}
class CartTotal implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $rounding=null,
/** @var string|null */
public ?string $withouttax=null,
/** @var string|null */
public ?string $tax=null,
/** @var string|null */
public ?string $withtax=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['rounding'])) $this->rounding = $o['rounding'];
if (isset($o['withouttax'])) $this->withouttax = $o['withouttax'];
if (isset($o['tax'])) $this->tax = $o['tax'];
if (isset($o['withtax'])) $this->withtax = $o['withtax'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->rounding)) $o['rounding'] = $this->rounding;
if (isset($this->withouttax)) $o['withouttax'] = $this->withouttax;
if (isset($this->tax)) $o['tax'] = $this->tax;
if (isset($this->withtax)) $o['withtax'] = $this->withtax;
return empty($o) ? new class(){} : $o;
}
}
class Shipping implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $firstname=null,
/** @var string|null */
public ?string $lastname=null,
/** @var string|null */
public ?string $company=null,
/** @var string|null */
public ?string $street=null,
/** @var string|null */
public ?string $street2=null,
/** @var string|null */
public ?string $zip=null,
/** @var string|null */
public ?string $city=null,
/** @var string|null */
public ?string $country=null,
/** @var string|null */
public ?string $phone=null,
/** @var string|null */
public ?string $withouttax=null,
/** @var string|null */
public ?string $taxrate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['firstname'])) $this->firstname = $o['firstname'];
if (isset($o['lastname'])) $this->lastname = $o['lastname'];
if (isset($o['company'])) $this->company = $o['company'];
if (isset($o['street'])) $this->street = $o['street'];
if (isset($o['street2'])) $this->street2 = $o['street2'];
if (isset($o['zip'])) $this->zip = $o['zip'];
if (isset($o['city'])) $this->city = $o['city'];
if (isset($o['country'])) $this->country = $o['country'];
if (isset($o['phone'])) $this->phone = $o['phone'];
if (isset($o['withouttax'])) $this->withouttax = $o['withouttax'];
if (isset($o['taxrate'])) $this->taxrate = $o['taxrate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->firstname)) $o['firstname'] = $this->firstname;
if (isset($this->lastname)) $o['lastname'] = $this->lastname;
if (isset($this->company)) $o['company'] = $this->company;
if (isset($this->street)) $o['street'] = $this->street;
if (isset($this->street2)) $o['street2'] = $this->street2;
if (isset($this->zip)) $o['zip'] = $this->zip;
if (isset($this->city)) $o['city'] = $this->city;
if (isset($this->country)) $o['country'] = $this->country;
if (isset($this->phone)) $o['phone'] = $this->phone;
if (isset($this->withouttax)) $o['withouttax'] = $this->withouttax;
if (isset($this->taxrate)) $o['taxrate'] = $this->taxrate;
return empty($o) ? new class(){} : $o;
}
}
class Cart implements JsonSerializable
{
public function __construct(
/** @var CartHandling|null */
public ?CartHandling $Handling=null,
/** @var CartTotal|null */
public ?CartTotal $Total=null,
/** @var Shipping|null */
public ?Shipping $Shipping=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Handling'])) $this->Handling = JsonConverters::from('CartHandling', $o['Handling']);
if (isset($o['Total'])) $this->Total = JsonConverters::from('CartTotal', $o['Total']);
if (isset($o['Shipping'])) $this->Shipping = JsonConverters::from('Shipping', $o['Shipping']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Handling)) $o['Handling'] = JsonConverters::to('CartHandling', $this->Handling);
if (isset($this->Total)) $o['Total'] = JsonConverters::to('CartTotal', $this->Total);
if (isset($this->Shipping)) $o['Shipping'] = JsonConverters::to('Shipping', $this->Shipping);
return empty($o) ? new class(){} : $o;
}
}
class CustomerBilling implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $firstname=null,
/** @var string|null */
public ?string $lastname=null,
/** @var string|null */
public ?string $company=null,
/** @var string|null */
public ?string $street=null,
/** @var string|null */
public ?string $street2=null,
/** @var string|null */
public ?string $zip=null,
/** @var string|null */
public ?string $city=null,
/** @var string|null */
public ?string $country=null,
/** @var string|null */
public ?string $phone=null,
/** @var string|null */
public ?string $email=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['firstname'])) $this->firstname = $o['firstname'];
if (isset($o['lastname'])) $this->lastname = $o['lastname'];
if (isset($o['company'])) $this->company = $o['company'];
if (isset($o['street'])) $this->street = $o['street'];
if (isset($o['street2'])) $this->street2 = $o['street2'];
if (isset($o['zip'])) $this->zip = $o['zip'];
if (isset($o['city'])) $this->city = $o['city'];
if (isset($o['country'])) $this->country = $o['country'];
if (isset($o['phone'])) $this->phone = $o['phone'];
if (isset($o['email'])) $this->email = $o['email'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->firstname)) $o['firstname'] = $this->firstname;
if (isset($this->lastname)) $o['lastname'] = $this->lastname;
if (isset($this->company)) $o['company'] = $this->company;
if (isset($this->street)) $o['street'] = $this->street;
if (isset($this->street2)) $o['street2'] = $this->street2;
if (isset($this->zip)) $o['zip'] = $this->zip;
if (isset($this->city)) $o['city'] = $this->city;
if (isset($this->country)) $o['country'] = $this->country;
if (isset($this->phone)) $o['phone'] = $this->phone;
if (isset($this->email)) $o['email'] = $this->email;
return empty($o) ? new class(){} : $o;
}
}
class QvicklyCustomer implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $nr=null,
/** @var string|null */
public ?string $pno=null,
/** @var CustomerBilling|null */
public ?CustomerBilling $Billing=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['nr'])) $this->nr = $o['nr'];
if (isset($o['pno'])) $this->pno = $o['pno'];
if (isset($o['Billing'])) $this->Billing = JsonConverters::from('CustomerBilling', $o['Billing']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->nr)) $o['nr'] = $this->nr;
if (isset($this->pno)) $o['pno'] = $this->pno;
if (isset($this->Billing)) $o['Billing'] = JsonConverters::to('CustomerBilling', $this->Billing);
return empty($o) ? new class(){} : $o;
}
}
class InitCheckoutData implements JsonSerializable
{
public function __construct(
/** @var CheckoutData|null */
public ?CheckoutData $CheckoutData=null,
/** @var CheckoutPaymentData|null */
public ?CheckoutPaymentData $PaymentData=null,
/** @var PaymentInfo|null */
public ?PaymentInfo $PaymentInfo=null,
/** @var QvicklyArticle[]|null */
public ?array $Articles=null,
/** @var Cart|null */
public ?Cart $Cart=null,
/** @var QvicklyCustomer|null */
public ?QvicklyCustomer $QvicklyCustomer=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CheckoutData'])) $this->CheckoutData = JsonConverters::from('CheckoutData', $o['CheckoutData']);
if (isset($o['PaymentData'])) $this->PaymentData = JsonConverters::from('CheckoutPaymentData', $o['PaymentData']);
if (isset($o['PaymentInfo'])) $this->PaymentInfo = JsonConverters::from('PaymentInfo', $o['PaymentInfo']);
if (isset($o['Articles'])) $this->Articles = JsonConverters::fromArray('QvicklyArticle', $o['Articles']);
if (isset($o['Cart'])) $this->Cart = JsonConverters::from('Cart', $o['Cart']);
if (isset($o['QvicklyCustomer'])) $this->QvicklyCustomer = JsonConverters::from('QvicklyCustomer', $o['QvicklyCustomer']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CheckoutData)) $o['CheckoutData'] = JsonConverters::to('CheckoutData', $this->CheckoutData);
if (isset($this->PaymentData)) $o['PaymentData'] = JsonConverters::to('CheckoutPaymentData', $this->PaymentData);
if (isset($this->PaymentInfo)) $o['PaymentInfo'] = JsonConverters::to('PaymentInfo', $this->PaymentInfo);
if (isset($this->Articles)) $o['Articles'] = JsonConverters::toArray('QvicklyArticle', $this->Articles);
if (isset($this->Cart)) $o['Cart'] = JsonConverters::to('Cart', $this->Cart);
if (isset($this->QvicklyCustomer)) $o['QvicklyCustomer'] = JsonConverters::to('QvicklyCustomer', $this->QvicklyCustomer);
return empty($o) ? new class(){} : $o;
}
}
class InitCheckoutRequestBody implements JsonSerializable
{
public function __construct(
/** @var Credentials|null */
public ?Credentials $credentials=null,
/** @var InitCheckoutData|null */
public ?InitCheckoutData $data=null,
/** @var string|null */
public ?string $function=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['credentials'])) $this->credentials = JsonConverters::from('Credentials', $o['credentials']);
if (isset($o['data'])) $this->data = JsonConverters::from('InitCheckoutData', $o['data']);
if (isset($o['function'])) $this->function = $o['function'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->credentials)) $o['credentials'] = JsonConverters::to('Credentials', $this->credentials);
if (isset($this->data)) $o['data'] = JsonConverters::to('InitCheckoutData', $this->data);
if (isset($this->function)) $o['function'] = $this->function;
return empty($o) ? new class(){} : $o;
}
}
class QvicklyCheckoutResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Number=0,
/** @var string|null */
public ?string $Status=null,
/** @var string|null */
public ?string $OrderId=null,
/** @var string|null */
public ?string $Url=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Number'])) $this->Number = $o['Number'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['OrderId'])) $this->OrderId = $o['OrderId'];
if (isset($o['Url'])) $this->Url = $o['Url'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Number)) $o['Number'] = $this->Number;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->OrderId)) $o['OrderId'] = $this->OrderId;
if (isset($this->Url)) $o['Url'] = $this->Url;
return empty($o) ? new class(){} : $o;
}
}
class QvikclyPaymentData implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $method=null,
/** @var string|null */
public ?string $paymentplanid=null,
/** @var string|null */
public ?string $currency=null,
/** @var string|null */
public ?string $country=null,
/** @var string|null */
public ?string $language=null,
/** @var string|null */
public ?string $autoactivate=null,
/** @var string|null */
public ?string $orderid=null,
/** @var string|null */
public ?string $status=null,
/** @var string|null */
public ?string $paymentid_related=null,
/** @var string|null */
public ?string $url=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['method'])) $this->method = $o['method'];
if (isset($o['paymentplanid'])) $this->paymentplanid = $o['paymentplanid'];
if (isset($o['currency'])) $this->currency = $o['currency'];
if (isset($o['country'])) $this->country = $o['country'];
if (isset($o['language'])) $this->language = $o['language'];
if (isset($o['autoactivate'])) $this->autoactivate = $o['autoactivate'];
if (isset($o['orderid'])) $this->orderid = $o['orderid'];
if (isset($o['status'])) $this->status = $o['status'];
if (isset($o['paymentid_related'])) $this->paymentid_related = $o['paymentid_related'];
if (isset($o['url'])) $this->url = $o['url'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->method)) $o['method'] = $this->method;
if (isset($this->paymentplanid)) $o['paymentplanid'] = $this->paymentplanid;
if (isset($this->currency)) $o['currency'] = $this->currency;
if (isset($this->country)) $o['country'] = $this->country;
if (isset($this->language)) $o['language'] = $this->language;
if (isset($this->autoactivate)) $o['autoactivate'] = $this->autoactivate;
if (isset($this->orderid)) $o['orderid'] = $this->orderid;
if (isset($this->status)) $o['status'] = $this->status;
if (isset($this->paymentid_related)) $o['paymentid_related'] = $this->paymentid_related;
if (isset($this->url)) $o['url'] = $this->url;
return empty($o) ? new class(){} : $o;
}
}
class Card implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $promptname=null,
/** @var string|null */
public ?string $recurring=null,
/** @var string|null */
public ?string $recurringnr=null,
/** @var string|null */
public ?string $accepturl=null,
/** @var string|null */
public ?string $cancelurl=null,
/** @var string|null */
public ?string $callbackurl=null,
/** @var string|null */
public ?string $returnmethod=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['promptname'])) $this->promptname = $o['promptname'];
if (isset($o['recurring'])) $this->recurring = $o['recurring'];
if (isset($o['recurringnr'])) $this->recurringnr = $o['recurringnr'];
if (isset($o['accepturl'])) $this->accepturl = $o['accepturl'];
if (isset($o['cancelurl'])) $this->cancelurl = $o['cancelurl'];
if (isset($o['callbackurl'])) $this->callbackurl = $o['callbackurl'];
if (isset($o['returnmethod'])) $this->returnmethod = $o['returnmethod'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->promptname)) $o['promptname'] = $this->promptname;
if (isset($this->recurring)) $o['recurring'] = $this->recurring;
if (isset($this->recurringnr)) $o['recurringnr'] = $this->recurringnr;
if (isset($this->accepturl)) $o['accepturl'] = $this->accepturl;
if (isset($this->cancelurl)) $o['cancelurl'] = $this->cancelurl;
if (isset($this->callbackurl)) $o['callbackurl'] = $this->callbackurl;
if (isset($this->returnmethod)) $o['returnmethod'] = $this->returnmethod;
return empty($o) ? new class(){} : $o;
}
}
class Settlement implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $number=null,
/** @var string|null */
public ?string $date=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['number'])) $this->number = $o['number'];
if (isset($o['date'])) $this->date = $o['date'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->number)) $o['number'] = $this->number;
if (isset($this->date)) $o['date'] = $this->date;
return empty($o) ? new class(){} : $o;
}
}
class QvicklyPaymentResponse implements JsonSerializable
{
public function __construct(
/** @var QvikclyPaymentData|null */
public ?QvikclyPaymentData $PaymentData=null,
/** @var PaymentInfo|null */
public ?PaymentInfo $PaymentInfo=null,
/** @var Card|null */
public ?Card $Card=null,
/** @var Settlement|null */
public ?Settlement $Settlement=null,
/** @var QvicklyCustomer|null */
public ?QvicklyCustomer $QvicklyCustomer=null,
/** @var QvicklyArticle[]|null */
public ?array $Articles=null,
/** @var Cart|null */
public ?Cart $Cart=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PaymentData'])) $this->PaymentData = JsonConverters::from('QvikclyPaymentData', $o['PaymentData']);
if (isset($o['PaymentInfo'])) $this->PaymentInfo = JsonConverters::from('PaymentInfo', $o['PaymentInfo']);
if (isset($o['Card'])) $this->Card = JsonConverters::from('Card', $o['Card']);
if (isset($o['Settlement'])) $this->Settlement = JsonConverters::from('Settlement', $o['Settlement']);
if (isset($o['QvicklyCustomer'])) $this->QvicklyCustomer = JsonConverters::from('QvicklyCustomer', $o['QvicklyCustomer']);
if (isset($o['Articles'])) $this->Articles = JsonConverters::fromArray('QvicklyArticle', $o['Articles']);
if (isset($o['Cart'])) $this->Cart = JsonConverters::from('Cart', $o['Cart']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PaymentData)) $o['PaymentData'] = JsonConverters::to('QvikclyPaymentData', $this->PaymentData);
if (isset($this->PaymentInfo)) $o['PaymentInfo'] = JsonConverters::to('PaymentInfo', $this->PaymentInfo);
if (isset($this->Card)) $o['Card'] = JsonConverters::to('Card', $this->Card);
if (isset($this->Settlement)) $o['Settlement'] = JsonConverters::to('Settlement', $this->Settlement);
if (isset($this->QvicklyCustomer)) $o['QvicklyCustomer'] = JsonConverters::to('QvicklyCustomer', $this->QvicklyCustomer);
if (isset($this->Articles)) $o['Articles'] = JsonConverters::toArray('QvicklyArticle', $this->Articles);
if (isset($this->Cart)) $o['Cart'] = JsonConverters::to('Cart', $this->Cart);
return empty($o) ? new class(){} : $o;
}
}
enum Payson2CheckoutStatus : string
{
case None = 'None';
case Created = 'Created';
case FormsFilled = 'FormsFilled';
case ReadyToPay = 'ReadyToPay';
case ProcessingPayment = 'ProcessingPayment';
case ReadyToShip = 'ReadyToShip';
case Shipped = 'Shipped';
case PaidToAccount = 'PaidToAccount';
case Canceled = 'Canceled';
case Credited = 'Credited';
case Expired = 'Expired';
case Denied = 'Denied';
}
enum CustomerType : string
{
case Person = 'Person';
case Business = 'Business';
}
class UserAccessKeys extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $AccessKeyTypeId=0,
// @Required()
/** @var string */
public string $Value='',
// @Required()
/** @var string */
public string $CustomerId='',
/** @var string|null */
public ?string $Description=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['AccessKeyTypeId'])) $this->AccessKeyTypeId = $o['AccessKeyTypeId'];
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->AccessKeyTypeId)) $o['AccessKeyTypeId'] = $this->AccessKeyTypeId;
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class ExternalReference extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var string */
public string $Id='',
// @Required()
/** @var string */
public string $OwnerId='',
// @Required()
/** @var string */
public string $ReferenceType='',
/** @var string|null */
public ?string $ExternalData=null,
/** @var string|null */
public ?string $CreatedBy=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
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['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']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
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->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);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
enum CompanyStatus : int
{
case Registered = 1;
case AwaitingApproval = 2;
case Approved = 3;
case Inactive = 4;
case ClosedDown = 5;
case NotApproved = 6;
}
class ScheduleView extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class WeekNumberSetting extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookingTemplate extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $UsedByApplication='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['UsedByApplication'])) $this->UsedByApplication = $o['UsedByApplication'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->UsedByApplication)) $o['UsedByApplication'] = $this->UsedByApplication;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CalendarType extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class FreeSpotTexts extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $TextSingular='',
// @Required()
/** @var string */
public string $TextPlural='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['TextSingular'])) $this->TextSingular = $o['TextSingular'];
if (isset($o['TextPlural'])) $this->TextPlural = $o['TextPlural'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->TextSingular)) $o['TextSingular'] = $this->TextSingular;
if (isset($this->TextPlural)) $o['TextPlural'] = $this->TextPlural;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookingStatusOptions implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Description=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'];
}
/** @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 BookingSettings extends BaseModel implements JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.FreeSpotTexts)")
/** @var int */
public int $FreeSpotTextsId=0,
// @Ignore()
/** @var bool|null */
public ?bool $SendEmailConfirmation=null,
// @Ignore()
/** @var array<ScheduleView>|null */
public ?array $ScheduleViewOptions=null,
// @Ignore()
/** @var array<WeekNumberSetting>|null */
public ?array $WeekNumberSettingOptions=null,
// @Ignore()
/** @var array<BookingTemplate>|null */
public ?array $BookingTemplateOptions=null,
// @Ignore()
/** @var array<CalendarType>|null */
public ?array $CalendarTypeOptions=null,
// @Ignore()
/** @var array<FreeSpotTexts>|null */
public ?array $FreeSpotTextOptions=null,
// @Ignore()
/** @var array<BookingStatusOptions>|null */
public ?array $BookingStatusOptions=null,
/** @var FreeSpotTexts|null */
public ?FreeSpotTexts $FreeSpotTextsInfo=null,
// @Ignore()
/** @var string|null */
public ?string $FreeSpotsTextSingular=null,
// @Ignore()
/** @var string|null */
public ?string $FreeSpotsTextPlural=null,
// @Required()
/** @var int */
public int $BookingStatusId=0,
// @Required()
/** @var int */
public int $ScheduleViewId=0,
// @Required()
/** @var int */
public int $BookingTemplateId=0,
// @Required()
/** @var int */
public int $CalendarTypeId=0,
// @Required()
/** @var bool|null */
public ?bool $AllowBookingOnUnbookedTimes=null,
// @Required()
/** @var bool|null */
public ?bool $SendEmailReminder=null,
// @Required()
/** @var bool|null */
public ?bool $SendSmsReminder=null,
// @Required()
/** @var bool|null */
public ?bool $SendSmsConfirmation=null,
// @Required()
/** @var int */
public int $EmailReminderTime=0,
// @Required()
/** @var int */
public int $SmsReminderTime=0,
// @Required()
/** @var int */
public int $MaxActiveBookings=0,
// @Required()
/** @var bool|null */
public ?bool $SendNotifications=null,
/** @var string|null */
public ?string $SendNotificationsEmail=null,
// @Required()
/** @var bool|null */
public ?bool $EnableMobileApp=null,
/** @var DateInterval|null */
public ?DateInterval $ScheduleStartTime=null,
/** @var DateInterval|null */
public ?DateInterval $ScheduleEndTime=null,
/** @var string|null */
public ?string $ReceiptTemplate=null,
// @Required()
/** @var int */
public int $ScheduleTimeSlotMinutes=0,
// @Required()
/** @var bool|null */
public ?bool $ShowFreeTimesLeft=null,
// @Required()
/** @var bool|null */
public ?bool $EnableICalGroupBookings=null,
/** @var string|null */
public ?string $AgreementTemplate=null,
// @Required()
/** @var bool|null */
public ?bool $ScheduleShowTimeExeptions=null,
// @Required()
/** @var bool|null */
public ?bool $EnableBookingsOnSameTime=null,
// @Required()
/** @var int */
public int $ShowWeekNumberSettingId=0,
// @Required()
/** @var bool|null */
public ?bool $EnableShowBookedTimes=null,
// @Required()
/** @var bool|null */
public ?bool $EnableSendFollowUpMessage=null,
// @Required()
/** @var int */
public int $FollowUpMessageTime=0,
/** @var string|null */
public ?string $MessageText=null,
// @Required()
/** @var bool|null */
public ?bool $ScheduleGroupResources=null,
// @Required()
/** @var int */
public int $BookSpotUserResponseMinutes=0,
// @Required()
/** @var bool|null */
public ?bool $IsBookSpotDirectly=null,
// @Required()
/** @var int */
public int $BookSpotDirectlyTimeLeftMinutes=0,
// @Required()
/** @var bool|null */
public ?bool $SendEmailNotificationQueue=null,
// @Required()
/** @var bool|null */
public ?bool $SendSMSNotificationQueue=null,
// @Required()
/** @var bool|null */
public ?bool $SchedulerDisableHorizontalScrolling=null,
// @Required()
/** @var bool|null */
public ?bool $BookOnlyOnExistingCustomers=null,
// @Required()
/** @var bool|null */
public ?bool $AutoGenerateUniquePinCode=null,
// @Required()
/** @var bool|null */
public ?bool $WeightedPrices=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var bool|null */
public ?bool $AutoCreateUserProfile=null,
/** @var bool|null */
public ?bool $ShowMultipleResourcesAsOne=null,
/** @var bool|null */
public ?bool $ShowMultiDayAsTime=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['FreeSpotTextsId'])) $this->FreeSpotTextsId = $o['FreeSpotTextsId'];
if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
if (isset($o['ScheduleViewOptions'])) $this->ScheduleViewOptions = JsonConverters::fromArray('ScheduleView', $o['ScheduleViewOptions']);
if (isset($o['WeekNumberSettingOptions'])) $this->WeekNumberSettingOptions = JsonConverters::fromArray('WeekNumberSetting', $o['WeekNumberSettingOptions']);
if (isset($o['BookingTemplateOptions'])) $this->BookingTemplateOptions = JsonConverters::fromArray('BookingTemplate', $o['BookingTemplateOptions']);
if (isset($o['CalendarTypeOptions'])) $this->CalendarTypeOptions = JsonConverters::fromArray('CalendarType', $o['CalendarTypeOptions']);
if (isset($o['FreeSpotTextOptions'])) $this->FreeSpotTextOptions = JsonConverters::fromArray('FreeSpotTexts', $o['FreeSpotTextOptions']);
if (isset($o['BookingStatusOptions'])) $this->BookingStatusOptions = JsonConverters::fromArray('BookingStatusOptions', $o['BookingStatusOptions']);
if (isset($o['FreeSpotTextsInfo'])) $this->FreeSpotTextsInfo = JsonConverters::from('FreeSpotTexts', $o['FreeSpotTextsInfo']);
if (isset($o['FreeSpotsTextSingular'])) $this->FreeSpotsTextSingular = $o['FreeSpotsTextSingular'];
if (isset($o['FreeSpotsTextPlural'])) $this->FreeSpotsTextPlural = $o['FreeSpotsTextPlural'];
if (isset($o['BookingStatusId'])) $this->BookingStatusId = $o['BookingStatusId'];
if (isset($o['ScheduleViewId'])) $this->ScheduleViewId = $o['ScheduleViewId'];
if (isset($o['BookingTemplateId'])) $this->BookingTemplateId = $o['BookingTemplateId'];
if (isset($o['CalendarTypeId'])) $this->CalendarTypeId = $o['CalendarTypeId'];
if (isset($o['AllowBookingOnUnbookedTimes'])) $this->AllowBookingOnUnbookedTimes = $o['AllowBookingOnUnbookedTimes'];
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['EmailReminderTime'])) $this->EmailReminderTime = $o['EmailReminderTime'];
if (isset($o['SmsReminderTime'])) $this->SmsReminderTime = $o['SmsReminderTime'];
if (isset($o['MaxActiveBookings'])) $this->MaxActiveBookings = $o['MaxActiveBookings'];
if (isset($o['SendNotifications'])) $this->SendNotifications = $o['SendNotifications'];
if (isset($o['SendNotificationsEmail'])) $this->SendNotificationsEmail = $o['SendNotificationsEmail'];
if (isset($o['EnableMobileApp'])) $this->EnableMobileApp = $o['EnableMobileApp'];
if (isset($o['ScheduleStartTime'])) $this->ScheduleStartTime = JsonConverters::from('TimeSpan', $o['ScheduleStartTime']);
if (isset($o['ScheduleEndTime'])) $this->ScheduleEndTime = JsonConverters::from('TimeSpan', $o['ScheduleEndTime']);
if (isset($o['ReceiptTemplate'])) $this->ReceiptTemplate = $o['ReceiptTemplate'];
if (isset($o['ScheduleTimeSlotMinutes'])) $this->ScheduleTimeSlotMinutes = $o['ScheduleTimeSlotMinutes'];
if (isset($o['ShowFreeTimesLeft'])) $this->ShowFreeTimesLeft = $o['ShowFreeTimesLeft'];
if (isset($o['EnableICalGroupBookings'])) $this->EnableICalGroupBookings = $o['EnableICalGroupBookings'];
if (isset($o['AgreementTemplate'])) $this->AgreementTemplate = $o['AgreementTemplate'];
if (isset($o['ScheduleShowTimeExeptions'])) $this->ScheduleShowTimeExeptions = $o['ScheduleShowTimeExeptions'];
if (isset($o['EnableBookingsOnSameTime'])) $this->EnableBookingsOnSameTime = $o['EnableBookingsOnSameTime'];
if (isset($o['ShowWeekNumberSettingId'])) $this->ShowWeekNumberSettingId = $o['ShowWeekNumberSettingId'];
if (isset($o['EnableShowBookedTimes'])) $this->EnableShowBookedTimes = $o['EnableShowBookedTimes'];
if (isset($o['EnableSendFollowUpMessage'])) $this->EnableSendFollowUpMessage = $o['EnableSendFollowUpMessage'];
if (isset($o['FollowUpMessageTime'])) $this->FollowUpMessageTime = $o['FollowUpMessageTime'];
if (isset($o['MessageText'])) $this->MessageText = $o['MessageText'];
if (isset($o['ScheduleGroupResources'])) $this->ScheduleGroupResources = $o['ScheduleGroupResources'];
if (isset($o['BookSpotUserResponseMinutes'])) $this->BookSpotUserResponseMinutes = $o['BookSpotUserResponseMinutes'];
if (isset($o['IsBookSpotDirectly'])) $this->IsBookSpotDirectly = $o['IsBookSpotDirectly'];
if (isset($o['BookSpotDirectlyTimeLeftMinutes'])) $this->BookSpotDirectlyTimeLeftMinutes = $o['BookSpotDirectlyTimeLeftMinutes'];
if (isset($o['SendEmailNotificationQueue'])) $this->SendEmailNotificationQueue = $o['SendEmailNotificationQueue'];
if (isset($o['SendSMSNotificationQueue'])) $this->SendSMSNotificationQueue = $o['SendSMSNotificationQueue'];
if (isset($o['SchedulerDisableHorizontalScrolling'])) $this->SchedulerDisableHorizontalScrolling = $o['SchedulerDisableHorizontalScrolling'];
if (isset($o['BookOnlyOnExistingCustomers'])) $this->BookOnlyOnExistingCustomers = $o['BookOnlyOnExistingCustomers'];
if (isset($o['AutoGenerateUniquePinCode'])) $this->AutoGenerateUniquePinCode = $o['AutoGenerateUniquePinCode'];
if (isset($o['WeightedPrices'])) $this->WeightedPrices = $o['WeightedPrices'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['AutoCreateUserProfile'])) $this->AutoCreateUserProfile = $o['AutoCreateUserProfile'];
if (isset($o['ShowMultipleResourcesAsOne'])) $this->ShowMultipleResourcesAsOne = $o['ShowMultipleResourcesAsOne'];
if (isset($o['ShowMultiDayAsTime'])) $this->ShowMultiDayAsTime = $o['ShowMultiDayAsTime'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->FreeSpotTextsId)) $o['FreeSpotTextsId'] = $this->FreeSpotTextsId;
if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
if (isset($this->ScheduleViewOptions)) $o['ScheduleViewOptions'] = JsonConverters::toArray('ScheduleView', $this->ScheduleViewOptions);
if (isset($this->WeekNumberSettingOptions)) $o['WeekNumberSettingOptions'] = JsonConverters::toArray('WeekNumberSetting', $this->WeekNumberSettingOptions);
if (isset($this->BookingTemplateOptions)) $o['BookingTemplateOptions'] = JsonConverters::toArray('BookingTemplate', $this->BookingTemplateOptions);
if (isset($this->CalendarTypeOptions)) $o['CalendarTypeOptions'] = JsonConverters::toArray('CalendarType', $this->CalendarTypeOptions);
if (isset($this->FreeSpotTextOptions)) $o['FreeSpotTextOptions'] = JsonConverters::toArray('FreeSpotTexts', $this->FreeSpotTextOptions);
if (isset($this->BookingStatusOptions)) $o['BookingStatusOptions'] = JsonConverters::toArray('BookingStatusOptions', $this->BookingStatusOptions);
if (isset($this->FreeSpotTextsInfo)) $o['FreeSpotTextsInfo'] = JsonConverters::to('FreeSpotTexts', $this->FreeSpotTextsInfo);
if (isset($this->FreeSpotsTextSingular)) $o['FreeSpotsTextSingular'] = $this->FreeSpotsTextSingular;
if (isset($this->FreeSpotsTextPlural)) $o['FreeSpotsTextPlural'] = $this->FreeSpotsTextPlural;
if (isset($this->BookingStatusId)) $o['BookingStatusId'] = $this->BookingStatusId;
if (isset($this->ScheduleViewId)) $o['ScheduleViewId'] = $this->ScheduleViewId;
if (isset($this->BookingTemplateId)) $o['BookingTemplateId'] = $this->BookingTemplateId;
if (isset($this->CalendarTypeId)) $o['CalendarTypeId'] = $this->CalendarTypeId;
if (isset($this->AllowBookingOnUnbookedTimes)) $o['AllowBookingOnUnbookedTimes'] = $this->AllowBookingOnUnbookedTimes;
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->EmailReminderTime)) $o['EmailReminderTime'] = $this->EmailReminderTime;
if (isset($this->SmsReminderTime)) $o['SmsReminderTime'] = $this->SmsReminderTime;
if (isset($this->MaxActiveBookings)) $o['MaxActiveBookings'] = $this->MaxActiveBookings;
if (isset($this->SendNotifications)) $o['SendNotifications'] = $this->SendNotifications;
if (isset($this->SendNotificationsEmail)) $o['SendNotificationsEmail'] = $this->SendNotificationsEmail;
if (isset($this->EnableMobileApp)) $o['EnableMobileApp'] = $this->EnableMobileApp;
if (isset($this->ScheduleStartTime)) $o['ScheduleStartTime'] = JsonConverters::to('TimeSpan', $this->ScheduleStartTime);
if (isset($this->ScheduleEndTime)) $o['ScheduleEndTime'] = JsonConverters::to('TimeSpan', $this->ScheduleEndTime);
if (isset($this->ReceiptTemplate)) $o['ReceiptTemplate'] = $this->ReceiptTemplate;
if (isset($this->ScheduleTimeSlotMinutes)) $o['ScheduleTimeSlotMinutes'] = $this->ScheduleTimeSlotMinutes;
if (isset($this->ShowFreeTimesLeft)) $o['ShowFreeTimesLeft'] = $this->ShowFreeTimesLeft;
if (isset($this->EnableICalGroupBookings)) $o['EnableICalGroupBookings'] = $this->EnableICalGroupBookings;
if (isset($this->AgreementTemplate)) $o['AgreementTemplate'] = $this->AgreementTemplate;
if (isset($this->ScheduleShowTimeExeptions)) $o['ScheduleShowTimeExeptions'] = $this->ScheduleShowTimeExeptions;
if (isset($this->EnableBookingsOnSameTime)) $o['EnableBookingsOnSameTime'] = $this->EnableBookingsOnSameTime;
if (isset($this->ShowWeekNumberSettingId)) $o['ShowWeekNumberSettingId'] = $this->ShowWeekNumberSettingId;
if (isset($this->EnableShowBookedTimes)) $o['EnableShowBookedTimes'] = $this->EnableShowBookedTimes;
if (isset($this->EnableSendFollowUpMessage)) $o['EnableSendFollowUpMessage'] = $this->EnableSendFollowUpMessage;
if (isset($this->FollowUpMessageTime)) $o['FollowUpMessageTime'] = $this->FollowUpMessageTime;
if (isset($this->MessageText)) $o['MessageText'] = $this->MessageText;
if (isset($this->ScheduleGroupResources)) $o['ScheduleGroupResources'] = $this->ScheduleGroupResources;
if (isset($this->BookSpotUserResponseMinutes)) $o['BookSpotUserResponseMinutes'] = $this->BookSpotUserResponseMinutes;
if (isset($this->IsBookSpotDirectly)) $o['IsBookSpotDirectly'] = $this->IsBookSpotDirectly;
if (isset($this->BookSpotDirectlyTimeLeftMinutes)) $o['BookSpotDirectlyTimeLeftMinutes'] = $this->BookSpotDirectlyTimeLeftMinutes;
if (isset($this->SendEmailNotificationQueue)) $o['SendEmailNotificationQueue'] = $this->SendEmailNotificationQueue;
if (isset($this->SendSMSNotificationQueue)) $o['SendSMSNotificationQueue'] = $this->SendSMSNotificationQueue;
if (isset($this->SchedulerDisableHorizontalScrolling)) $o['SchedulerDisableHorizontalScrolling'] = $this->SchedulerDisableHorizontalScrolling;
if (isset($this->BookOnlyOnExistingCustomers)) $o['BookOnlyOnExistingCustomers'] = $this->BookOnlyOnExistingCustomers;
if (isset($this->AutoGenerateUniquePinCode)) $o['AutoGenerateUniquePinCode'] = $this->AutoGenerateUniquePinCode;
if (isset($this->WeightedPrices)) $o['WeightedPrices'] = $this->WeightedPrices;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->AutoCreateUserProfile)) $o['AutoCreateUserProfile'] = $this->AutoCreateUserProfile;
if (isset($this->ShowMultipleResourcesAsOne)) $o['ShowMultipleResourcesAsOne'] = $this->ShowMultipleResourcesAsOne;
if (isset($this->ShowMultiDayAsTime)) $o['ShowMultiDayAsTime'] = $this->ShowMultiDayAsTime;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CompanyType extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CodeLockSystem extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Supplier='',
/** @var string|null */
public ?string $LogoType=null,
// @Required()
/** @var string */
public string $Description='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Supplier'])) $this->Supplier = $o['Supplier'];
if (isset($o['LogoType'])) $this->LogoType = $o['LogoType'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Supplier)) $o['Supplier'] = $this->Supplier;
if (isset($this->LogoType)) $o['LogoType'] = $this->LogoType;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CodeLockSetting extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<CodeLockSystem>|null */
public ?array $CodeLockSystemOptions=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
// @Required()
/** @var int */
public int $CodeLockSystemsId=0,
// @Required()
/** @var int */
public int $ValidBeforeMinutes=0,
// @Required()
/** @var int */
public int $ValidAfterMinutes=0,
// @Required()
/** @var bool|null */
public ?bool $DeleteOldBySchedule=null,
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var bool|null */
public ?bool $SendEmailNotification=null,
// @Required()
/** @var bool|null */
public ?bool $SendSMSNotification=null,
// @Required()
/** @var int */
public int $EmailNotificationTime=0,
// @Required()
/** @var int */
public int $SMSNotificationTime=0,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CodeLockSystemOptions'])) $this->CodeLockSystemOptions = JsonConverters::fromArray('CodeLockSystem', $o['CodeLockSystemOptions']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['CodeLockSystemsId'])) $this->CodeLockSystemsId = $o['CodeLockSystemsId'];
if (isset($o['ValidBeforeMinutes'])) $this->ValidBeforeMinutes = $o['ValidBeforeMinutes'];
if (isset($o['ValidAfterMinutes'])) $this->ValidAfterMinutes = $o['ValidAfterMinutes'];
if (isset($o['DeleteOldBySchedule'])) $this->DeleteOldBySchedule = $o['DeleteOldBySchedule'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['SendEmailNotification'])) $this->SendEmailNotification = $o['SendEmailNotification'];
if (isset($o['SendSMSNotification'])) $this->SendSMSNotification = $o['SendSMSNotification'];
if (isset($o['EmailNotificationTime'])) $this->EmailNotificationTime = $o['EmailNotificationTime'];
if (isset($o['SMSNotificationTime'])) $this->SMSNotificationTime = $o['SMSNotificationTime'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CodeLockSystemOptions)) $o['CodeLockSystemOptions'] = JsonConverters::toArray('CodeLockSystem', $this->CodeLockSystemOptions);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->CodeLockSystemsId)) $o['CodeLockSystemsId'] = $this->CodeLockSystemsId;
if (isset($this->ValidBeforeMinutes)) $o['ValidBeforeMinutes'] = $this->ValidBeforeMinutes;
if (isset($this->ValidAfterMinutes)) $o['ValidAfterMinutes'] = $this->ValidAfterMinutes;
if (isset($this->DeleteOldBySchedule)) $o['DeleteOldBySchedule'] = $this->DeleteOldBySchedule;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->SendEmailNotification)) $o['SendEmailNotification'] = $this->SendEmailNotification;
if (isset($this->SendSMSNotification)) $o['SendSMSNotification'] = $this->SendSMSNotification;
if (isset($this->EmailNotificationTime)) $o['EmailNotificationTime'] = $this->EmailNotificationTime;
if (isset($this->SMSNotificationTime)) $o['SMSNotificationTime'] = $this->SMSNotificationTime;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class AdminPaymentOptions extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class PaymentProviders extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Category='',
/** @var string|null */
public ?string $Url=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['Url'])) $this->Url = $o['Url'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->Url)) $o['Url'] = $this->Url;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class PaymentSetting extends BaseModel implements JsonSerializable
{
public function __construct(
/** @var AdminPaymentOptions|null */
public ?AdminPaymentOptions $AdminPaymentOption=null,
// @Ignore()
/** @var array<AdminPaymentOptions>|null */
public ?array $AdminPaymentOptions=null,
// @Ignore()
/** @var array<PaymentProviders>|null */
public ?array $PaymentProviderOptions=null,
// @Required()
/** @var bool|null */
public ?bool $Enabled=null,
// @Required()
/** @var int */
public int $InvoiceFee=0,
// @Required()
/** @var bool|null */
public ?bool $AllowCreditCardPayment=null,
// @Required()
/** @var bool|null */
public ?bool $AllowInvoicePayment=null,
// @Required()
/** @var bool|null */
public ?bool $AllowBankPayment=null,
// @Required()
/** @var bool|null */
public ?bool $GuaranteeOffered=null,
// @Required()
/** @var bool|null */
public ?bool $RefundOnCancelBooking=null,
/** @var int|null */
public ?int $DefaultPaymentOptionId=null,
// @Required()
/** @var int */
public int $PaymentProviderId=0,
// @Required()
/** @var bool|null */
public ?bool $SendPaymentRequestDirectly=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['AdminPaymentOption'])) $this->AdminPaymentOption = JsonConverters::from('AdminPaymentOptions', $o['AdminPaymentOption']);
if (isset($o['AdminPaymentOptions'])) $this->AdminPaymentOptions = JsonConverters::fromArray('AdminPaymentOptions', $o['AdminPaymentOptions']);
if (isset($o['PaymentProviderOptions'])) $this->PaymentProviderOptions = JsonConverters::fromArray('PaymentProviders', $o['PaymentProviderOptions']);
if (isset($o['Enabled'])) $this->Enabled = $o['Enabled'];
if (isset($o['InvoiceFee'])) $this->InvoiceFee = $o['InvoiceFee'];
if (isset($o['AllowCreditCardPayment'])) $this->AllowCreditCardPayment = $o['AllowCreditCardPayment'];
if (isset($o['AllowInvoicePayment'])) $this->AllowInvoicePayment = $o['AllowInvoicePayment'];
if (isset($o['AllowBankPayment'])) $this->AllowBankPayment = $o['AllowBankPayment'];
if (isset($o['GuaranteeOffered'])) $this->GuaranteeOffered = $o['GuaranteeOffered'];
if (isset($o['RefundOnCancelBooking'])) $this->RefundOnCancelBooking = $o['RefundOnCancelBooking'];
if (isset($o['DefaultPaymentOptionId'])) $this->DefaultPaymentOptionId = $o['DefaultPaymentOptionId'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
if (isset($o['SendPaymentRequestDirectly'])) $this->SendPaymentRequestDirectly = $o['SendPaymentRequestDirectly'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->AdminPaymentOption)) $o['AdminPaymentOption'] = JsonConverters::to('AdminPaymentOptions', $this->AdminPaymentOption);
if (isset($this->AdminPaymentOptions)) $o['AdminPaymentOptions'] = JsonConverters::toArray('AdminPaymentOptions', $this->AdminPaymentOptions);
if (isset($this->PaymentProviderOptions)) $o['PaymentProviderOptions'] = JsonConverters::toArray('PaymentProviders', $this->PaymentProviderOptions);
if (isset($this->Enabled)) $o['Enabled'] = $this->Enabled;
if (isset($this->InvoiceFee)) $o['InvoiceFee'] = $this->InvoiceFee;
if (isset($this->AllowCreditCardPayment)) $o['AllowCreditCardPayment'] = $this->AllowCreditCardPayment;
if (isset($this->AllowInvoicePayment)) $o['AllowInvoicePayment'] = $this->AllowInvoicePayment;
if (isset($this->AllowBankPayment)) $o['AllowBankPayment'] = $this->AllowBankPayment;
if (isset($this->GuaranteeOffered)) $o['GuaranteeOffered'] = $this->GuaranteeOffered;
if (isset($this->RefundOnCancelBooking)) $o['RefundOnCancelBooking'] = $this->RefundOnCancelBooking;
if (isset($this->DefaultPaymentOptionId)) $o['DefaultPaymentOptionId'] = $this->DefaultPaymentOptionId;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
if (isset($this->SendPaymentRequestDirectly)) $o['SendPaymentRequestDirectly'] = $this->SendPaymentRequestDirectly;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class LanguageResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Id=null,
/** @var string|null */
public ?string $Name=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
return empty($o) ? new class(){} : $o;
}
}
class CompanySetting extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<LanguageResponse>|null */
public ?array $Languages=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var string|null */
public ?string $InactiveMessage=null,
// @Required()
/** @var bool|null */
public ?bool $Searchable=null,
/** @var string|null */
public ?string $GATrackingId=null,
/** @var string|null */
public ?string $FacebookPixelId=null,
// @Required()
/** @var bool|null */
public ?bool $MultiLanguage=null,
// @Required()
/** @var bool|null */
public ?bool $EnableAPITranslation=null,
// @Required()
/** @var string */
public string $DefaultLanguage='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $GTMTrackingId=null,
// @Required()
/** @var bool|null */
public ?bool $ShowOnMarketPlace=null,
/** @var string|null */
public ?string $GoogleAdsConversionId=null,
/** @var string|null */
public ?string $LinkedinTagId=null,
/** @var string|null */
public ?string $GoogleAdsConversionLabel=null,
/** @var bool|null */
public ?bool $SendCustomerInformationToExternalProviders=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Languages'])) $this->Languages = JsonConverters::fromArray('LanguageResponse', $o['Languages']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['InactiveMessage'])) $this->InactiveMessage = $o['InactiveMessage'];
if (isset($o['Searchable'])) $this->Searchable = $o['Searchable'];
if (isset($o['GATrackingId'])) $this->GATrackingId = $o['GATrackingId'];
if (isset($o['FacebookPixelId'])) $this->FacebookPixelId = $o['FacebookPixelId'];
if (isset($o['MultiLanguage'])) $this->MultiLanguage = $o['MultiLanguage'];
if (isset($o['EnableAPITranslation'])) $this->EnableAPITranslation = $o['EnableAPITranslation'];
if (isset($o['DefaultLanguage'])) $this->DefaultLanguage = $o['DefaultLanguage'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['GTMTrackingId'])) $this->GTMTrackingId = $o['GTMTrackingId'];
if (isset($o['ShowOnMarketPlace'])) $this->ShowOnMarketPlace = $o['ShowOnMarketPlace'];
if (isset($o['GoogleAdsConversionId'])) $this->GoogleAdsConversionId = $o['GoogleAdsConversionId'];
if (isset($o['LinkedinTagId'])) $this->LinkedinTagId = $o['LinkedinTagId'];
if (isset($o['GoogleAdsConversionLabel'])) $this->GoogleAdsConversionLabel = $o['GoogleAdsConversionLabel'];
if (isset($o['SendCustomerInformationToExternalProviders'])) $this->SendCustomerInformationToExternalProviders = $o['SendCustomerInformationToExternalProviders'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Languages)) $o['Languages'] = JsonConverters::toArray('LanguageResponse', $this->Languages);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->InactiveMessage)) $o['InactiveMessage'] = $this->InactiveMessage;
if (isset($this->Searchable)) $o['Searchable'] = $this->Searchable;
if (isset($this->GATrackingId)) $o['GATrackingId'] = $this->GATrackingId;
if (isset($this->FacebookPixelId)) $o['FacebookPixelId'] = $this->FacebookPixelId;
if (isset($this->MultiLanguage)) $o['MultiLanguage'] = $this->MultiLanguage;
if (isset($this->EnableAPITranslation)) $o['EnableAPITranslation'] = $this->EnableAPITranslation;
if (isset($this->DefaultLanguage)) $o['DefaultLanguage'] = $this->DefaultLanguage;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->GTMTrackingId)) $o['GTMTrackingId'] = $this->GTMTrackingId;
if (isset($this->ShowOnMarketPlace)) $o['ShowOnMarketPlace'] = $this->ShowOnMarketPlace;
if (isset($this->GoogleAdsConversionId)) $o['GoogleAdsConversionId'] = $this->GoogleAdsConversionId;
if (isset($this->LinkedinTagId)) $o['LinkedinTagId'] = $this->LinkedinTagId;
if (isset($this->GoogleAdsConversionLabel)) $o['GoogleAdsConversionLabel'] = $this->GoogleAdsConversionLabel;
if (isset($this->SendCustomerInformationToExternalProviders)) $o['SendCustomerInformationToExternalProviders'] = $this->SendCustomerInformationToExternalProviders;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class WidgetServiceLayouts extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Code='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class WidgetTimeLayouts extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Code='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class WidgetBookingLayouts extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Code='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class WidgetBookingMethods extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Code='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class HomepageWidgetSetting extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<WidgetServiceLayouts>|null */
public ?array $WidgetServiceLayoutOptions=null,
// @Ignore()
/** @var array<WidgetTimeLayouts>|null */
public ?array $WidgetTimeLayoutOptions=null,
// @Ignore()
/** @var array<WidgetBookingLayouts>|null */
public ?array $WidgetBookingLayoutOptions=null,
// @Ignore()
/** @var array<WidgetBookingMethods>|null */
public ?array $WidgetBookingMethodOptions=null,
// @Required()
/** @var int */
public int $ServiceLayoutId=0,
// @Required()
/** @var int */
public int $TimeLayoutId=0,
// @Required()
/** @var int */
public int $BookingLayoutId=0,
// @Required()
/** @var string */
public string $PrimaryColor='',
// @Required()
/** @var bool|null */
public ?bool $ShowServiceImage=null,
// @Required()
/** @var bool|null */
public ?bool $ShowNextAvailableTime=null,
// @Required()
/** @var bool|null */
public ?bool $ShowEndTime=null,
/** @var string|null */
public ?string $BookedTimeSlotText=null,
// @Required()
/** @var bool|null */
public ?bool $DarkTheme=null,
// @Required()
/** @var bool|null */
public ?bool $ShowRebateCodeField=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var bool|null */
public ?bool $EnableCreateAccount=null,
// @Required()
/** @var bool|null */
public ?bool $EnableLogin=null,
// @Required()
/** @var bool|null */
public ?bool $EnableDirectBooking=null,
// @Required()
/** @var bool|null */
public ?bool $EnableFacebookLogin=null,
// @Required()
/** @var bool|null */
public ?bool $ShowSubscribeToNewsletter=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['WidgetServiceLayoutOptions'])) $this->WidgetServiceLayoutOptions = JsonConverters::fromArray('WidgetServiceLayouts', $o['WidgetServiceLayoutOptions']);
if (isset($o['WidgetTimeLayoutOptions'])) $this->WidgetTimeLayoutOptions = JsonConverters::fromArray('WidgetTimeLayouts', $o['WidgetTimeLayoutOptions']);
if (isset($o['WidgetBookingLayoutOptions'])) $this->WidgetBookingLayoutOptions = JsonConverters::fromArray('WidgetBookingLayouts', $o['WidgetBookingLayoutOptions']);
if (isset($o['WidgetBookingMethodOptions'])) $this->WidgetBookingMethodOptions = JsonConverters::fromArray('WidgetBookingMethods', $o['WidgetBookingMethodOptions']);
if (isset($o['ServiceLayoutId'])) $this->ServiceLayoutId = $o['ServiceLayoutId'];
if (isset($o['TimeLayoutId'])) $this->TimeLayoutId = $o['TimeLayoutId'];
if (isset($o['BookingLayoutId'])) $this->BookingLayoutId = $o['BookingLayoutId'];
if (isset($o['PrimaryColor'])) $this->PrimaryColor = $o['PrimaryColor'];
if (isset($o['ShowServiceImage'])) $this->ShowServiceImage = $o['ShowServiceImage'];
if (isset($o['ShowNextAvailableTime'])) $this->ShowNextAvailableTime = $o['ShowNextAvailableTime'];
if (isset($o['ShowEndTime'])) $this->ShowEndTime = $o['ShowEndTime'];
if (isset($o['BookedTimeSlotText'])) $this->BookedTimeSlotText = $o['BookedTimeSlotText'];
if (isset($o['DarkTheme'])) $this->DarkTheme = $o['DarkTheme'];
if (isset($o['ShowRebateCodeField'])) $this->ShowRebateCodeField = $o['ShowRebateCodeField'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['EnableCreateAccount'])) $this->EnableCreateAccount = $o['EnableCreateAccount'];
if (isset($o['EnableLogin'])) $this->EnableLogin = $o['EnableLogin'];
if (isset($o['EnableDirectBooking'])) $this->EnableDirectBooking = $o['EnableDirectBooking'];
if (isset($o['EnableFacebookLogin'])) $this->EnableFacebookLogin = $o['EnableFacebookLogin'];
if (isset($o['ShowSubscribeToNewsletter'])) $this->ShowSubscribeToNewsletter = $o['ShowSubscribeToNewsletter'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->WidgetServiceLayoutOptions)) $o['WidgetServiceLayoutOptions'] = JsonConverters::toArray('WidgetServiceLayouts', $this->WidgetServiceLayoutOptions);
if (isset($this->WidgetTimeLayoutOptions)) $o['WidgetTimeLayoutOptions'] = JsonConverters::toArray('WidgetTimeLayouts', $this->WidgetTimeLayoutOptions);
if (isset($this->WidgetBookingLayoutOptions)) $o['WidgetBookingLayoutOptions'] = JsonConverters::toArray('WidgetBookingLayouts', $this->WidgetBookingLayoutOptions);
if (isset($this->WidgetBookingMethodOptions)) $o['WidgetBookingMethodOptions'] = JsonConverters::toArray('WidgetBookingMethods', $this->WidgetBookingMethodOptions);
if (isset($this->ServiceLayoutId)) $o['ServiceLayoutId'] = $this->ServiceLayoutId;
if (isset($this->TimeLayoutId)) $o['TimeLayoutId'] = $this->TimeLayoutId;
if (isset($this->BookingLayoutId)) $o['BookingLayoutId'] = $this->BookingLayoutId;
if (isset($this->PrimaryColor)) $o['PrimaryColor'] = $this->PrimaryColor;
if (isset($this->ShowServiceImage)) $o['ShowServiceImage'] = $this->ShowServiceImage;
if (isset($this->ShowNextAvailableTime)) $o['ShowNextAvailableTime'] = $this->ShowNextAvailableTime;
if (isset($this->ShowEndTime)) $o['ShowEndTime'] = $this->ShowEndTime;
if (isset($this->BookedTimeSlotText)) $o['BookedTimeSlotText'] = $this->BookedTimeSlotText;
if (isset($this->DarkTheme)) $o['DarkTheme'] = $this->DarkTheme;
if (isset($this->ShowRebateCodeField)) $o['ShowRebateCodeField'] = $this->ShowRebateCodeField;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->EnableCreateAccount)) $o['EnableCreateAccount'] = $this->EnableCreateAccount;
if (isset($this->EnableLogin)) $o['EnableLogin'] = $this->EnableLogin;
if (isset($this->EnableDirectBooking)) $o['EnableDirectBooking'] = $this->EnableDirectBooking;
if (isset($this->EnableFacebookLogin)) $o['EnableFacebookLogin'] = $this->EnableFacebookLogin;
if (isset($this->ShowSubscribeToNewsletter)) $o['ShowSubscribeToNewsletter'] = $this->ShowSubscribeToNewsletter;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class HomepageTemplate extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var bool|null */
public ?bool $Premium=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
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['Premium'])) $this->Premium = $o['Premium'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
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->Premium)) $o['Premium'] = $this->Premium;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class HeroSectionStyle extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Description=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class HomepageSetting extends BaseModel implements ICompany, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<HomepageTemplate>|null */
public ?array $HomepageTemplateOptions=null,
// @Ignore()
/** @var array<HeroSectionStyle>|null */
public ?array $HomepageHeroSectionStyleOptions=null,
// @Ignore()
/** @var string|null */
public ?string $CompanyId=null,
/** @var string|null */
public ?string $WelcomePageHeading=null,
/** @var string|null */
public ?string $WelcomePageBody=null,
/** @var string|null */
public ?string $AboutUsPageHeading=null,
/** @var string|null */
public ?string $AboutUsPageBody=null,
// @Required()
/** @var int */
public int $HomePageTemplateId=0,
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var string|null */
public ?string $HomepageHeading=null,
// @Required()
/** @var int */
public int $HeroSectionStyleId=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var bool|null */
public ?bool $ShowRating=null,
// @Required()
/** @var bool|null */
public ?bool $EnableHomepage=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['HomepageTemplateOptions'])) $this->HomepageTemplateOptions = JsonConverters::fromArray('HomepageTemplate', $o['HomepageTemplateOptions']);
if (isset($o['HomepageHeroSectionStyleOptions'])) $this->HomepageHeroSectionStyleOptions = JsonConverters::fromArray('HeroSectionStyle', $o['HomepageHeroSectionStyleOptions']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['WelcomePageHeading'])) $this->WelcomePageHeading = $o['WelcomePageHeading'];
if (isset($o['WelcomePageBody'])) $this->WelcomePageBody = $o['WelcomePageBody'];
if (isset($o['AboutUsPageHeading'])) $this->AboutUsPageHeading = $o['AboutUsPageHeading'];
if (isset($o['AboutUsPageBody'])) $this->AboutUsPageBody = $o['AboutUsPageBody'];
if (isset($o['HomePageTemplateId'])) $this->HomePageTemplateId = $o['HomePageTemplateId'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['HomepageHeading'])) $this->HomepageHeading = $o['HomepageHeading'];
if (isset($o['HeroSectionStyleId'])) $this->HeroSectionStyleId = $o['HeroSectionStyleId'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['ShowRating'])) $this->ShowRating = $o['ShowRating'];
if (isset($o['EnableHomepage'])) $this->EnableHomepage = $o['EnableHomepage'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->HomepageTemplateOptions)) $o['HomepageTemplateOptions'] = JsonConverters::toArray('HomepageTemplate', $this->HomepageTemplateOptions);
if (isset($this->HomepageHeroSectionStyleOptions)) $o['HomepageHeroSectionStyleOptions'] = JsonConverters::toArray('HeroSectionStyle', $this->HomepageHeroSectionStyleOptions);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->WelcomePageHeading)) $o['WelcomePageHeading'] = $this->WelcomePageHeading;
if (isset($this->WelcomePageBody)) $o['WelcomePageBody'] = $this->WelcomePageBody;
if (isset($this->AboutUsPageHeading)) $o['AboutUsPageHeading'] = $this->AboutUsPageHeading;
if (isset($this->AboutUsPageBody)) $o['AboutUsPageBody'] = $this->AboutUsPageBody;
if (isset($this->HomePageTemplateId)) $o['HomePageTemplateId'] = $this->HomePageTemplateId;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->HomepageHeading)) $o['HomepageHeading'] = $this->HomepageHeading;
if (isset($this->HeroSectionStyleId)) $o['HeroSectionStyleId'] = $this->HeroSectionStyleId;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->ShowRating)) $o['ShowRating'] = $this->ShowRating;
if (isset($this->EnableHomepage)) $o['EnableHomepage'] = $this->EnableHomepage;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class AverageRatingScore implements JsonSerializable
{
public function __construct(
/** @var float */
public float $AverageScore=0.0,
/** @var int */
public int $Score1Count=0,
/** @var int */
public int $Score2Count=0,
/** @var int */
public int $Score3Count=0,
/** @var int */
public int $Score4Count=0,
/** @var int */
public int $Score5Count=0,
/** @var int */
public int $Count=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AverageScore'])) $this->AverageScore = $o['AverageScore'];
if (isset($o['Score1Count'])) $this->Score1Count = $o['Score1Count'];
if (isset($o['Score2Count'])) $this->Score2Count = $o['Score2Count'];
if (isset($o['Score3Count'])) $this->Score3Count = $o['Score3Count'];
if (isset($o['Score4Count'])) $this->Score4Count = $o['Score4Count'];
if (isset($o['Score5Count'])) $this->Score5Count = $o['Score5Count'];
if (isset($o['Count'])) $this->Count = $o['Count'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AverageScore)) $o['AverageScore'] = $this->AverageScore;
if (isset($this->Score1Count)) $o['Score1Count'] = $this->Score1Count;
if (isset($this->Score2Count)) $o['Score2Count'] = $this->Score2Count;
if (isset($this->Score3Count)) $o['Score3Count'] = $this->Score3Count;
if (isset($this->Score4Count)) $o['Score4Count'] = $this->Score4Count;
if (isset($this->Score5Count)) $o['Score5Count'] = $this->Score5Count;
if (isset($this->Count)) $o['Count'] = $this->Count;
return empty($o) ? new class(){} : $o;
}
}
class Review extends BaseModel implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ReviewId='',
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var string */
public string $Title='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Author='',
// @Required()
/** @var int */
public int $Status=0,
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $ReviewAnswer=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ReviewId'])) $this->ReviewId = $o['ReviewId'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Author'])) $this->Author = $o['Author'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['ReviewAnswer'])) $this->ReviewAnswer = $o['ReviewAnswer'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ReviewId)) $o['ReviewId'] = $this->ReviewId;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Author)) $o['Author'] = $this->Author;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->ReviewAnswer)) $o['ReviewAnswer'] = $this->ReviewAnswer;
return empty($o) ? new class(){} : $o;
}
}
class Rating extends BaseModel implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ReviewId=null,
/** @var Review|null */
public ?Review $Review=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $BookingId=0,
// @Required()
/** @var int */
public int $RatingScore=0,
// @Required()
/** @var int */
public int $Status=0,
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ReviewId'])) $this->ReviewId = $o['ReviewId'];
if (isset($o['Review'])) $this->Review = JsonConverters::from('Review', $o['Review']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['RatingScore'])) $this->RatingScore = $o['RatingScore'];
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ReviewId)) $o['ReviewId'] = $this->ReviewId;
if (isset($this->Review)) $o['Review'] = JsonConverters::to('Review', $this->Review);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->RatingScore)) $o['RatingScore'] = $this->RatingScore;
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class LicenseTypeItem extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var string|null */
public ?string $Name=null,
// @Ignore()
/** @var LicenseType|null */
public ?LicenseType $LicenseType=null,
// @Required()
/** @var int */
public int $LicenseTypesId=0,
// @Required()
/** @var int */
public int $LicenseItemsId=0,
// @Required()
/** @var int */
public int $NumberOfItems=0,
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['LicenseType'])) $this->LicenseType = JsonConverters::from('LicenseType', $o['LicenseType']);
if (isset($o['LicenseTypesId'])) $this->LicenseTypesId = $o['LicenseTypesId'];
if (isset($o['LicenseItemsId'])) $this->LicenseItemsId = $o['LicenseItemsId'];
if (isset($o['NumberOfItems'])) $this->NumberOfItems = $o['NumberOfItems'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->LicenseType)) $o['LicenseType'] = JsonConverters::to('LicenseType', $this->LicenseType);
if (isset($this->LicenseTypesId)) $o['LicenseTypesId'] = $this->LicenseTypesId;
if (isset($this->LicenseItemsId)) $o['LicenseItemsId'] = $this->LicenseItemsId;
if (isset($this->NumberOfItems)) $o['NumberOfItems'] = $this->NumberOfItems;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class Country extends BaseModel implements JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
/** @var string|null */
public ?string $CurrencyId=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Culture=null,
/** @var string|null */
public ?string $TimeZone=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Culture'])) $this->Culture = $o['Culture'];
if (isset($o['TimeZone'])) $this->TimeZone = $o['TimeZone'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Culture)) $o['Culture'] = $this->Culture;
if (isset($this->TimeZone)) $o['TimeZone'] = $this->TimeZone;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class LicensePrice extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var Country|null */
public ?Country $Country=null,
// @Ignore()
/** @var bool|null */
public ?bool $MonthlyPayment=null,
// @Required()
/** @var int */
public int $LicenseTypeId=0,
// @Required()
/** @var string */
public string $CountryId='',
// @Required()
/** @var int */
public int $Price=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Country'])) $this->Country = JsonConverters::from('Country', $o['Country']);
if (isset($o['MonthlyPayment'])) $this->MonthlyPayment = $o['MonthlyPayment'];
if (isset($o['LicenseTypeId'])) $this->LicenseTypeId = $o['LicenseTypeId'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Country)) $o['Country'] = JsonConverters::to('Country', $this->Country);
if (isset($this->MonthlyPayment)) $o['MonthlyPayment'] = $this->MonthlyPayment;
if (isset($this->LicenseTypeId)) $o['LicenseTypeId'] = $this->LicenseTypeId;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class LicenseType extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<LicenseTypeItem>|null */
public ?array $LicenseItems=null,
// @Ignore()
/** @var array<LicensePrice>|null */
public ?array $Prices=null,
// @Ignore()
/** @var int */
public int $PeriodOfNoticeDays=0,
// @Ignore()
/** @var LicenseType|null */
public ?LicenseType $NextLicenseOption=null,
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var bool|null */
public ?bool $ExtraLicenseOption=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['LicenseItems'])) $this->LicenseItems = JsonConverters::fromArray('LicenseTypeItem', $o['LicenseItems']);
if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('LicensePrice', $o['Prices']);
if (isset($o['PeriodOfNoticeDays'])) $this->PeriodOfNoticeDays = $o['PeriodOfNoticeDays'];
if (isset($o['NextLicenseOption'])) $this->NextLicenseOption = JsonConverters::from('LicenseType', $o['NextLicenseOption']);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ExtraLicenseOption'])) $this->ExtraLicenseOption = $o['ExtraLicenseOption'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->LicenseItems)) $o['LicenseItems'] = JsonConverters::toArray('LicenseTypeItem', $this->LicenseItems);
if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('LicensePrice', $this->Prices);
if (isset($this->PeriodOfNoticeDays)) $o['PeriodOfNoticeDays'] = $this->PeriodOfNoticeDays;
if (isset($this->NextLicenseOption)) $o['NextLicenseOption'] = JsonConverters::to('LicenseType', $this->NextLicenseOption);
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ExtraLicenseOption)) $o['ExtraLicenseOption'] = $this->ExtraLicenseOption;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class License extends BaseModel implements JsonSerializable
{
public function __construct(
/** @var LicenseType|null */
public ?LicenseType $Type=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var int */
public int $TypeId=0,
// @Required()
/** @var DateTime */
public DateTime $ValidFrom=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $ValidTo=new DateTime(),
// @Required()
/** @var bool|null */
public ?bool $Active=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $MetaData=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Type'])) $this->Type = JsonConverters::from('LicenseType', $o['Type']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['MetaData'])) $this->MetaData = $o['MetaData'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Type)) $o['Type'] = JsonConverters::to('LicenseType', $this->Type);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->MetaData)) $o['MetaData'] = $this->MetaData;
return empty($o) ? new class(){} : $o;
}
}
class CompanyCategory extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Header='',
// @Required()
/** @var string */
public string $Description='',
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var int|null */
public ?int $SortOrder=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Header'])) $this->Header = $o['Header'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Header)) $o['Header'] = $this->Header;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class Company extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var CompanyStatus|null */
public ?CompanyStatus $Status=null,
// @Ignore()
/** @var bool|null */
public ?bool $Active=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomerCustomFieldsConfig=null,
// @Ignore()
/** @var string|null */
public ?string $BookingAgreements=null,
// @Ignore()
/** @var BookingSettings|null */
public ?BookingSettings $BookingSettings=null,
// @Ignore()
/** @var CompanyType|null */
public ?CompanyType $CompanyType=null,
// @Ignore()
/** @var CodeLockSetting|null */
public ?CodeLockSetting $CodeLockSettings=null,
// @Ignore()
/** @var PaymentSetting|null */
public ?PaymentSetting $PaymentSettings=null,
// @Ignore()
/** @var CompanySetting|null */
public ?CompanySetting $Settings=null,
// @Ignore()
/** @var HomepageWidgetSetting|null */
public ?HomepageWidgetSetting $WidgetSettings=null,
// @Ignore()
/** @var HomepageSetting|null */
public ?HomepageSetting $HomepageSettings=null,
// @Ignore()
/** @var AverageRatingScore|null */
public ?AverageRatingScore $RatingScore=null,
// @Ignore()
/** @var array<Rating>|null */
public ?array $Ratings=null,
// @Ignore()
/** @var float|null */
public ?float $Distance=null,
// @Ignore()
/** @var array<License>|null */
public ?array $Licenses=null,
// @Ignore()
/** @var array<License>|null */
public ?array $ActiveLicenses=null,
// @Ignore()
/** @var License|null */
public ?License $CurrentLicense=null,
// @Ignore()
/** @var bool|null */
public ?bool $IsFreeAccount=null,
// @Ignore()
/** @var CultureInfo|null */
public ?CultureInfo $DefaultLanguage=null,
/** @var CompanyCategory|null */
public ?CompanyCategory $Category=null,
// @Ignore()
/** @var float */
public float $Lat=0.0,
// @Ignore()
/** @var float */
public float $Lon=0.0,
// @Ignore()
/** @var bool|null */
public ?bool $IsFavorite=null,
// @Ignore()
/** @var array<ExternalReference>|null */
public ?array $ExternalReferences=null,
// @Required()
/** @var string */
public string $OrganisationNumber='',
// @Required()
/** @var int */
public int $StatusId=0,
// @Required()
/** @var int */
public int $CategoryId=0,
// @Required()
/** @var string */
public string $SitePath='',
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Street1=null,
/** @var string|null */
public ?string $Street2=null,
/** @var string|null */
public ?string $ZipCode=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $OpeningHours=null,
/** @var string|null */
public ?string $FaxNumber=null,
// @Required()
/** @var string */
public string $Email='',
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $Details=null,
/** @var string|null */
public ?string $LogoType=null,
// @Required()
/** @var bool|null */
public ?bool $ApprovedByAdmin=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var string|null */
public ?string $IpAddress=null,
/** @var string|null */
public ?string $Homepage=null,
/** @var string|null */
public ?string $DomainName=null,
// @Required()
/** @var string */
public string $CountryId='',
// @Required()
/** @var int */
public int $CompanyOwnerId=0,
/** @var int|null */
public ?int $TypeId=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Status'])) $this->Status = JsonConverters::from('CompanyStatus', $o['Status']);
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['CustomerCustomFieldsConfig'])) $this->CustomerCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomerCustomFieldsConfig']);
if (isset($o['BookingAgreements'])) $this->BookingAgreements = $o['BookingAgreements'];
if (isset($o['BookingSettings'])) $this->BookingSettings = JsonConverters::from('BookingSettings', $o['BookingSettings']);
if (isset($o['CompanyType'])) $this->CompanyType = JsonConverters::from('CompanyType', $o['CompanyType']);
if (isset($o['CodeLockSettings'])) $this->CodeLockSettings = JsonConverters::from('CodeLockSetting', $o['CodeLockSettings']);
if (isset($o['PaymentSettings'])) $this->PaymentSettings = JsonConverters::from('PaymentSetting', $o['PaymentSettings']);
if (isset($o['Settings'])) $this->Settings = JsonConverters::from('CompanySetting', $o['Settings']);
if (isset($o['WidgetSettings'])) $this->WidgetSettings = JsonConverters::from('HomepageWidgetSetting', $o['WidgetSettings']);
if (isset($o['HomepageSettings'])) $this->HomepageSettings = JsonConverters::from('HomepageSetting', $o['HomepageSettings']);
if (isset($o['RatingScore'])) $this->RatingScore = JsonConverters::from('AverageRatingScore', $o['RatingScore']);
if (isset($o['Ratings'])) $this->Ratings = JsonConverters::fromArray('Rating', $o['Ratings']);
if (isset($o['Distance'])) $this->Distance = $o['Distance'];
if (isset($o['Licenses'])) $this->Licenses = JsonConverters::fromArray('License', $o['Licenses']);
if (isset($o['ActiveLicenses'])) $this->ActiveLicenses = JsonConverters::fromArray('License', $o['ActiveLicenses']);
if (isset($o['CurrentLicense'])) $this->CurrentLicense = JsonConverters::from('License', $o['CurrentLicense']);
if (isset($o['IsFreeAccount'])) $this->IsFreeAccount = $o['IsFreeAccount'];
if (isset($o['DefaultLanguage'])) $this->DefaultLanguage = JsonConverters::from('CultureInfo', $o['DefaultLanguage']);
if (isset($o['Category'])) $this->Category = JsonConverters::from('CompanyCategory', $o['Category']);
if (isset($o['Lat'])) $this->Lat = $o['Lat'];
if (isset($o['Lon'])) $this->Lon = $o['Lon'];
if (isset($o['IsFavorite'])) $this->IsFavorite = $o['IsFavorite'];
if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
if (isset($o['OrganisationNumber'])) $this->OrganisationNumber = $o['OrganisationNumber'];
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
if (isset($o['CategoryId'])) $this->CategoryId = $o['CategoryId'];
if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
if (isset($o['Name'])) $this->Name = $o['Name'];
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['OpeningHours'])) $this->OpeningHours = $o['OpeningHours'];
if (isset($o['FaxNumber'])) $this->FaxNumber = $o['FaxNumber'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Details'])) $this->Details = $o['Details'];
if (isset($o['LogoType'])) $this->LogoType = $o['LogoType'];
if (isset($o['ApprovedByAdmin'])) $this->ApprovedByAdmin = $o['ApprovedByAdmin'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
if (isset($o['Homepage'])) $this->Homepage = $o['Homepage'];
if (isset($o['DomainName'])) $this->DomainName = $o['DomainName'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['CompanyOwnerId'])) $this->CompanyOwnerId = $o['CompanyOwnerId'];
if (isset($o['TypeId'])) $this->TypeId = $o['TypeId'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Status)) $o['Status'] = JsonConverters::to('CompanyStatus', $this->Status);
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->CustomerCustomFieldsConfig)) $o['CustomerCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomerCustomFieldsConfig);
if (isset($this->BookingAgreements)) $o['BookingAgreements'] = $this->BookingAgreements;
if (isset($this->BookingSettings)) $o['BookingSettings'] = JsonConverters::to('BookingSettings', $this->BookingSettings);
if (isset($this->CompanyType)) $o['CompanyType'] = JsonConverters::to('CompanyType', $this->CompanyType);
if (isset($this->CodeLockSettings)) $o['CodeLockSettings'] = JsonConverters::to('CodeLockSetting', $this->CodeLockSettings);
if (isset($this->PaymentSettings)) $o['PaymentSettings'] = JsonConverters::to('PaymentSetting', $this->PaymentSettings);
if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('CompanySetting', $this->Settings);
if (isset($this->WidgetSettings)) $o['WidgetSettings'] = JsonConverters::to('HomepageWidgetSetting', $this->WidgetSettings);
if (isset($this->HomepageSettings)) $o['HomepageSettings'] = JsonConverters::to('HomepageSetting', $this->HomepageSettings);
if (isset($this->RatingScore)) $o['RatingScore'] = JsonConverters::to('AverageRatingScore', $this->RatingScore);
if (isset($this->Ratings)) $o['Ratings'] = JsonConverters::toArray('Rating', $this->Ratings);
if (isset($this->Distance)) $o['Distance'] = $this->Distance;
if (isset($this->Licenses)) $o['Licenses'] = JsonConverters::toArray('License', $this->Licenses);
if (isset($this->ActiveLicenses)) $o['ActiveLicenses'] = JsonConverters::toArray('License', $this->ActiveLicenses);
if (isset($this->CurrentLicense)) $o['CurrentLicense'] = JsonConverters::to('License', $this->CurrentLicense);
if (isset($this->IsFreeAccount)) $o['IsFreeAccount'] = $this->IsFreeAccount;
if (isset($this->DefaultLanguage)) $o['DefaultLanguage'] = JsonConverters::to('CultureInfo', $this->DefaultLanguage);
if (isset($this->Category)) $o['Category'] = JsonConverters::to('CompanyCategory', $this->Category);
if (isset($this->Lat)) $o['Lat'] = $this->Lat;
if (isset($this->Lon)) $o['Lon'] = $this->Lon;
if (isset($this->IsFavorite)) $o['IsFavorite'] = $this->IsFavorite;
if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
if (isset($this->OrganisationNumber)) $o['OrganisationNumber'] = $this->OrganisationNumber;
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
if (isset($this->CategoryId)) $o['CategoryId'] = $this->CategoryId;
if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
if (isset($this->Name)) $o['Name'] = $this->Name;
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->OpeningHours)) $o['OpeningHours'] = $this->OpeningHours;
if (isset($this->FaxNumber)) $o['FaxNumber'] = $this->FaxNumber;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Details)) $o['Details'] = $this->Details;
if (isset($this->LogoType)) $o['LogoType'] = $this->LogoType;
if (isset($this->ApprovedByAdmin)) $o['ApprovedByAdmin'] = $this->ApprovedByAdmin;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
if (isset($this->Homepage)) $o['Homepage'] = $this->Homepage;
if (isset($this->DomainName)) $o['DomainName'] = $this->DomainName;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->CompanyOwnerId)) $o['CompanyOwnerId'] = $this->CompanyOwnerId;
if (isset($this->TypeId)) $o['TypeId'] = $this->TypeId;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldDataResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Column=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $Value=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|null */
public ?string $DataType=null
) {
}
/** @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 CustomerComment extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $CustomerId='',
// @Required()
/** @var string */
public string $Comments='',
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var string|null */
public ?string $ImageUrl=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class Customer extends BaseModel implements IUser, ICustomFieldTable, JsonSerializable
{
public function __construct(
/** @var int */
public int $IdentityId=0,
/** @var string */
public string $Id='',
// @Ignore()
/** @var string */
public string $CustomerId='',
// @Ignore()
/** @var array<UserAccessKeys>|null */
public ?array $AccessKeys=null,
/** @var string|null */
public ?string $Email=null,
// @Ignore()
/** @var array<ExternalReference>|null */
public ?array $ExternalReferences=null,
// @Ignore()
/** @var Company|null */
public ?Company $Company=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldDataResponse>|null */
public ?array $CustomFieldsData=null,
// @Ignore()
/** @var array<CustomerComment>|null */
public ?array $Comments=null,
// @Ignore()
/** @var array<RebateCode>|null */
public ?array $RebateCodes=null,
/** @var string|null */
public ?string $Firstname=null,
// @Ignore()
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var string|null */
public ?string $FacebookUsername=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var string|null */
public ?string $IpAddress=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $TextField1=null,
/** @var string|null */
public ?string $TextField2=null,
/** @var string|null */
public ?string $TextField3=null,
/** @var string|null */
public ?string $TextField4=null,
/** @var string|null */
public ?string $TextField5=null,
/** @var string|null */
public ?string $TextField6=null,
/** @var string|null */
public ?string $TextField7=null,
/** @var string|null */
public ?string $TextField8=null,
/** @var string|null */
public ?string $TextField9=null,
/** @var string|null */
public ?string $TextField10=null,
/** @var string|null */
public ?string $TextField11=null,
/** @var string|null */
public ?string $TextField12=null,
/** @var string|null */
public ?string $TextField13=null,
/** @var string|null */
public ?string $TextField14=null,
/** @var string|null */
public ?string $TextField15=null,
/** @var string|null */
public ?string $TextField16=null,
/** @var string|null */
public ?string $TextField17=null,
/** @var string|null */
public ?string $TextField18=null,
/** @var string|null */
public ?string $TextField19=null,
/** @var string|null */
public ?string $TextField20=null,
/** @var string */
public string $UserId='',
/** @var string|null */
public ?string $Lastname=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $CorporateIdentityNumber=null,
/** @var string|null */
public ?string $InvoiceAddress1=null,
/** @var string|null */
public ?string $InvoiceAddress2=null,
/** @var string|null */
public ?string $InvoiceCity=null,
/** @var string|null */
public ?string $InvoicePostalCode=null,
/** @var string|null */
public ?string $InvoiceCountryCode=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var bool|null */
public ?bool $SubscribedToNewsletter=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['IdentityId'])) $this->IdentityId = $o['IdentityId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['AccessKeys'])) $this->AccessKeys = JsonConverters::fromArray('UserAccessKeys', $o['AccessKeys']);
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
if (isset($o['Company'])) $this->Company = JsonConverters::from('Company', $o['Company']);
if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
if (isset($o['Comments'])) $this->Comments = JsonConverters::fromArray('CustomerComment', $o['Comments']);
if (isset($o['RebateCodes'])) $this->RebateCodes = JsonConverters::fromArray('RebateCode', $o['RebateCodes']);
if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['FacebookUsername'])) $this->FacebookUsername = $o['FacebookUsername'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
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['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['SubscribedToNewsletter'])) $this->SubscribedToNewsletter = $o['SubscribedToNewsletter'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->IdentityId)) $o['IdentityId'] = $this->IdentityId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->AccessKeys)) $o['AccessKeys'] = JsonConverters::toArray('UserAccessKeys', $this->AccessKeys);
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
if (isset($this->Company)) $o['Company'] = JsonConverters::to('Company', $this->Company);
if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
if (isset($this->Comments)) $o['Comments'] = JsonConverters::toArray('CustomerComment', $this->Comments);
if (isset($this->RebateCodes)) $o['RebateCodes'] = JsonConverters::toArray('RebateCode', $this->RebateCodes);
if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->FacebookUsername)) $o['FacebookUsername'] = $this->FacebookUsername;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
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->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->SubscribedToNewsletter)) $o['SubscribedToNewsletter'] = $this->SubscribedToNewsletter;
return empty($o) ? new class(){} : $o;
}
}
enum ItemType : string
{
case Physical = 'Physical';
case Service = 'Service';
case Fee = 'Fee';
case Discount = 'Discount';
}
class Item implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ItemId='',
/** @var float */
public float $DiscountRate=0.0,
/** @var string|null */
public ?string $Ean=null,
/** @var string|null */
public ?string $ImageUri=null,
/** @var string|null */
public ?string $Name=null,
/** @var float */
public float $Quantity=0.0,
/** @var string|null */
public ?string $Reference=null,
/** @var float */
public float $TaxRate=0.0,
/** @var float */
public float $TotalPriceExcludingTax=0.0,
/** @var float */
public float $TotalPriceIncludingTax=0.0,
/** @var float */
public float $TotalTaxAmount=0.0,
/** @var float */
public float $CreditedAmount=0.0,
/** @var ItemType|null */
public ?ItemType $Type=null,
/** @var float */
public float $UnitPrice=0.0,
/** @var string|null */
public ?string $Uri=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ItemId'])) $this->ItemId = $o['ItemId'];
if (isset($o['DiscountRate'])) $this->DiscountRate = $o['DiscountRate'];
if (isset($o['Ean'])) $this->Ean = $o['Ean'];
if (isset($o['ImageUri'])) $this->ImageUri = JsonConverters::from('string', $o['ImageUri']);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['TaxRate'])) $this->TaxRate = $o['TaxRate'];
if (isset($o['TotalPriceExcludingTax'])) $this->TotalPriceExcludingTax = $o['TotalPriceExcludingTax'];
if (isset($o['TotalPriceIncludingTax'])) $this->TotalPriceIncludingTax = $o['TotalPriceIncludingTax'];
if (isset($o['TotalTaxAmount'])) $this->TotalTaxAmount = $o['TotalTaxAmount'];
if (isset($o['CreditedAmount'])) $this->CreditedAmount = $o['CreditedAmount'];
if (isset($o['Type'])) $this->Type = JsonConverters::from('ItemType', $o['Type']);
if (isset($o['UnitPrice'])) $this->UnitPrice = $o['UnitPrice'];
if (isset($o['Uri'])) $this->Uri = JsonConverters::from('string', $o['Uri']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ItemId)) $o['ItemId'] = $this->ItemId;
if (isset($this->DiscountRate)) $o['DiscountRate'] = $this->DiscountRate;
if (isset($this->Ean)) $o['Ean'] = $this->Ean;
if (isset($this->ImageUri)) $o['ImageUri'] = JsonConverters::to('string', $this->ImageUri);
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->TaxRate)) $o['TaxRate'] = $this->TaxRate;
if (isset($this->TotalPriceExcludingTax)) $o['TotalPriceExcludingTax'] = $this->TotalPriceExcludingTax;
if (isset($this->TotalPriceIncludingTax)) $o['TotalPriceIncludingTax'] = $this->TotalPriceIncludingTax;
if (isset($this->TotalTaxAmount)) $o['TotalTaxAmount'] = $this->TotalTaxAmount;
if (isset($this->CreditedAmount)) $o['CreditedAmount'] = $this->CreditedAmount;
if (isset($this->Type)) $o['Type'] = JsonConverters::to('ItemType', $this->Type);
if (isset($this->UnitPrice)) $o['UnitPrice'] = $this->UnitPrice;
if (isset($this->Uri)) $o['Uri'] = JsonConverters::to('string', $this->Uri);
return empty($o) ? new class(){} : $o;
}
}
class Order implements JsonSerializable
{
public function __construct(
/** @var Currency|null */
public ?Currency $Currency=null,
/** @var float */
public float $TotalFeeExcludingTax=0.0,
/** @var float */
public float $TotalFeeIncludingTax=0.0,
/** @var float */
public float $TotalPriceExcludingTax=0.0,
/** @var float */
public float $TotalPriceIncludingTax=0.0,
/** @var float */
public float $TotalTaxAmount=0.0,
/** @var float */
public float $TotalCreditedAmount=0.0,
/** @var array<Item>|null */
public ?array $Items=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Currency'])) $this->Currency = JsonConverters::from('Currency', $o['Currency']);
if (isset($o['TotalFeeExcludingTax'])) $this->TotalFeeExcludingTax = $o['TotalFeeExcludingTax'];
if (isset($o['TotalFeeIncludingTax'])) $this->TotalFeeIncludingTax = $o['TotalFeeIncludingTax'];
if (isset($o['TotalPriceExcludingTax'])) $this->TotalPriceExcludingTax = $o['TotalPriceExcludingTax'];
if (isset($o['TotalPriceIncludingTax'])) $this->TotalPriceIncludingTax = $o['TotalPriceIncludingTax'];
if (isset($o['TotalTaxAmount'])) $this->TotalTaxAmount = $o['TotalTaxAmount'];
if (isset($o['TotalCreditedAmount'])) $this->TotalCreditedAmount = $o['TotalCreditedAmount'];
if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('Item', $o['Items']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Currency)) $o['Currency'] = JsonConverters::to('Currency', $this->Currency);
if (isset($this->TotalFeeExcludingTax)) $o['TotalFeeExcludingTax'] = $this->TotalFeeExcludingTax;
if (isset($this->TotalFeeIncludingTax)) $o['TotalFeeIncludingTax'] = $this->TotalFeeIncludingTax;
if (isset($this->TotalPriceExcludingTax)) $o['TotalPriceExcludingTax'] = $this->TotalPriceExcludingTax;
if (isset($this->TotalPriceIncludingTax)) $o['TotalPriceIncludingTax'] = $this->TotalPriceIncludingTax;
if (isset($this->TotalTaxAmount)) $o['TotalTaxAmount'] = $this->TotalTaxAmount;
if (isset($this->TotalCreditedAmount)) $o['TotalCreditedAmount'] = $this->TotalCreditedAmount;
if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('Item', $this->Items);
return empty($o) ? new class(){} : $o;
}
}
class Merchant implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $CheckoutUri=null,
/** @var string|null */
public ?string $ConfirmationUri=null,
/** @var string|null */
public ?string $NotificationUri=null,
/** @var string|null */
public ?string $ValidationUri=null,
/** @var string|null */
public ?string $TermsUri=null,
/** @var string|null */
public ?string $Reference=null,
/** @var string|null */
public ?string $PartnerId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CheckoutUri'])) $this->CheckoutUri = JsonConverters::from('string', $o['CheckoutUri']);
if (isset($o['ConfirmationUri'])) $this->ConfirmationUri = JsonConverters::from('string', $o['ConfirmationUri']);
if (isset($o['NotificationUri'])) $this->NotificationUri = JsonConverters::from('string', $o['NotificationUri']);
if (isset($o['ValidationUri'])) $this->ValidationUri = JsonConverters::from('string', $o['ValidationUri']);
if (isset($o['TermsUri'])) $this->TermsUri = JsonConverters::from('string', $o['TermsUri']);
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['PartnerId'])) $this->PartnerId = $o['PartnerId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CheckoutUri)) $o['CheckoutUri'] = JsonConverters::to('string', $this->CheckoutUri);
if (isset($this->ConfirmationUri)) $o['ConfirmationUri'] = JsonConverters::to('string', $this->ConfirmationUri);
if (isset($this->NotificationUri)) $o['NotificationUri'] = JsonConverters::to('string', $this->NotificationUri);
if (isset($this->ValidationUri)) $o['ValidationUri'] = JsonConverters::to('string', $this->ValidationUri);
if (isset($this->TermsUri)) $o['TermsUri'] = JsonConverters::to('string', $this->TermsUri);
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->PartnerId)) $o['PartnerId'] = $this->PartnerId;
return empty($o) ? new class(){} : $o;
}
}
enum ColorScheme : string
{
case White = 'White';
case Blue = 'Blue';
case Gray = 'Gray';
case GrayTextLogos = 'GrayTextLogos';
case BlueTextLogos = 'BlueTextLogos';
case WhiteTextLogos = 'WhiteTextLogos';
case WhiteNoFooter = 'WhiteNoFooter';
case GrayNoFooter = 'GrayNoFooter';
case BlueNoFooter = 'BlueNoFooter';
}
class Gui implements JsonSerializable
{
public function __construct(
/** @var ColorScheme|null */
public ?ColorScheme $ColorScheme=null,
/** @var string|null */
public ?string $Locale=null,
/** @var bool|null */
public ?bool $RequestPhone=null,
/** @var bool|null */
public ?bool $PhoneOptional=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ColorScheme'])) $this->ColorScheme = JsonConverters::from('ColorScheme', $o['ColorScheme']);
if (isset($o['Locale'])) $this->Locale = $o['Locale'];
if (isset($o['RequestPhone'])) $this->RequestPhone = $o['RequestPhone'];
if (isset($o['PhoneOptional'])) $this->PhoneOptional = $o['PhoneOptional'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ColorScheme)) $o['ColorScheme'] = JsonConverters::to('ColorScheme', $this->ColorScheme);
if (isset($this->Locale)) $o['Locale'] = $this->Locale;
if (isset($this->RequestPhone)) $o['RequestPhone'] = $this->RequestPhone;
if (isset($this->PhoneOptional)) $o['PhoneOptional'] = $this->PhoneOptional;
return empty($o) ? new class(){} : $o;
}
}
class History implements JsonSerializable
{
public function __construct(
/** @var DateTime|null */
public ?DateTime $Created=null,
/** @var DateTime|null */
public ?DateTime $ReadyToPay=null,
/** @var DateTime|null */
public ?DateTime $ReadyToShip=null,
/** @var DateTime|null */
public ?DateTime $Shipped=null,
/** @var DateTime|null */
public ?DateTime $PaidToAccount=null,
/** @var DateTime|null */
public ?DateTime $Canceled=null,
/** @var DateTime|null */
public ?DateTime $Expired=null,
/** @var DateTime|null */
public ?DateTime $Denied=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['ReadyToPay'])) $this->ReadyToPay = JsonConverters::from('DateTime', $o['ReadyToPay']);
if (isset($o['ReadyToShip'])) $this->ReadyToShip = JsonConverters::from('DateTime', $o['ReadyToShip']);
if (isset($o['Shipped'])) $this->Shipped = JsonConverters::from('DateTime', $o['Shipped']);
if (isset($o['PaidToAccount'])) $this->PaidToAccount = JsonConverters::from('DateTime', $o['PaidToAccount']);
if (isset($o['Canceled'])) $this->Canceled = JsonConverters::from('DateTime', $o['Canceled']);
if (isset($o['Expired'])) $this->Expired = JsonConverters::from('DateTime', $o['Expired']);
if (isset($o['Denied'])) $this->Denied = JsonConverters::from('DateTime', $o['Denied']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ReadyToPay)) $o['ReadyToPay'] = JsonConverters::to('DateTime', $this->ReadyToPay);
if (isset($this->ReadyToShip)) $o['ReadyToShip'] = JsonConverters::to('DateTime', $this->ReadyToShip);
if (isset($this->Shipped)) $o['Shipped'] = JsonConverters::to('DateTime', $this->Shipped);
if (isset($this->PaidToAccount)) $o['PaidToAccount'] = JsonConverters::to('DateTime', $this->PaidToAccount);
if (isset($this->Canceled)) $o['Canceled'] = JsonConverters::to('DateTime', $this->Canceled);
if (isset($this->Expired)) $o['Expired'] = JsonConverters::to('DateTime', $this->Expired);
if (isset($this->Denied)) $o['Denied'] = JsonConverters::to('DateTime', $this->Denied);
return empty($o) ? new class(){} : $o;
}
}
class Payson2CheckoutResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var DateTime|null */
public ?DateTime $ExpirationTime=null,
/** @var string|null */
public ?string $Snippet=null,
/** @var Payson2CheckoutStatus|null */
public ?Payson2CheckoutStatus $Status=null,
/** @var Customer|null */
public ?Customer $Customer=null,
/** @var Order|null */
public ?Order $Order=null,
/** @var Merchant|null */
public ?Merchant $Merchant=null,
/** @var Gui|null */
public ?Gui $Gui=null,
/** @var History|null */
public ?History $History=null,
/** @var int|null */
public ?int $PurchaseId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
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 = JsonConverters::from('Payson2CheckoutStatus', $o['Status']);
if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
if (isset($o['Order'])) $this->Order = JsonConverters::from('Order', $o['Order']);
if (isset($o['Merchant'])) $this->Merchant = JsonConverters::from('Merchant', $o['Merchant']);
if (isset($o['Gui'])) $this->Gui = JsonConverters::from('Gui', $o['Gui']);
if (isset($o['History'])) $this->History = JsonConverters::from('History', $o['History']);
if (isset($o['PurchaseId'])) $this->PurchaseId = $o['PurchaseId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
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'] = JsonConverters::to('Payson2CheckoutStatus', $this->Status);
if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
if (isset($this->Order)) $o['Order'] = JsonConverters::to('Order', $this->Order);
if (isset($this->Merchant)) $o['Merchant'] = JsonConverters::to('Merchant', $this->Merchant);
if (isset($this->Gui)) $o['Gui'] = JsonConverters::to('Gui', $this->Gui);
if (isset($this->History)) $o['History'] = JsonConverters::to('History', $this->History);
if (isset($this->PurchaseId)) $o['PurchaseId'] = $this->PurchaseId;
return empty($o) ? new class(){} : $o;
}
}
interface IPaysonPaymentCheckout1
{
}
class PaymentLog extends BaseModel implements JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
/** @var string|null */
public ?string $CurrencyId=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $InternalReferenceId='',
// @Required()
/** @var int */
public int $ArticleTypeId=0,
/** @var string|null */
public ?string $PaymentReferenceId=null,
/** @var int|null */
public ?int $PaymentProviderId=null,
/** @var string|null */
public ?string $OrderItemReferenceId=null,
/** @var float|null */
public ?float $Amount=null,
/** @var float|null */
public ?float $VAT=null,
/** @var float|null */
public ?float $AmountCredited=null,
/** @var string|null */
public ?string $Comments=null,
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['InternalReferenceId'])) $this->InternalReferenceId = $o['InternalReferenceId'];
if (isset($o['ArticleTypeId'])) $this->ArticleTypeId = $o['ArticleTypeId'];
if (isset($o['PaymentReferenceId'])) $this->PaymentReferenceId = $o['PaymentReferenceId'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
if (isset($o['OrderItemReferenceId'])) $this->OrderItemReferenceId = $o['OrderItemReferenceId'];
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['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']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->InternalReferenceId)) $o['InternalReferenceId'] = $this->InternalReferenceId;
if (isset($this->ArticleTypeId)) $o['ArticleTypeId'] = $this->ArticleTypeId;
if (isset($this->PaymentReferenceId)) $o['PaymentReferenceId'] = $this->PaymentReferenceId;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
if (isset($this->OrderItemReferenceId)) $o['OrderItemReferenceId'] = $this->OrderItemReferenceId;
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->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);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class PayableEntity extends BaseModel implements IPayableEntity, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var IDbConnectionFactory|null */
public ?IDbConnectionFactory $DbFactory=null,
// @Ignore()
/** @var IBokameraPaymentManager3<InitCheckoutRequestBody, QvicklyCheckoutResponse, QvicklyPaymentResponse>|null */
public ?IBokameraPaymentManager3 $QvicklyPaymentManager=null,
// @Ignore()
/** @var IBokameraPaymentManager3<Payson2CheckoutResponse, Payson2CheckoutResponse, Payson2CheckoutResponse>|null */
public ?IBokameraPaymentManager3 $Payson2PaymentManager=null,
// @Ignore()
/** @var IPaysonPaymentCheckout1|null */
public ?IPaysonPaymentCheckout1 $PaysonPaymentCheckout1=null,
// @Ignore()
/** @var ILogger<PayableEntity>|null */
public ?ILogger $Logger=null,
// @Ignore()
/** @var string|null */
public ?string $InternalReferenceId=null,
// @Ignore()
/** @var array<PaymentLog>|null */
public ?array $PaymentLog=null,
/** @var string */
public string $CompanyId='',
/** @var float|null */
public ?float $PriceVat=null,
// @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
/** @var string|null */
public ?string $CurrencyId=null,
// @Ignore()
/** @var Customer|null */
public ?Customer $Customer=null,
// @Ignore()
/** @var array<Customer>|null */
public ?array $Customers=null,
// @Ignore()
/** @var Company|null */
public ?Company $Company=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DbFactory'])) $this->DbFactory = JsonConverters::from('IDbConnectionFactory', $o['DbFactory']);
if (isset($o['QvicklyPaymentManager'])) $this->QvicklyPaymentManager = JsonConverters::from(JsonConverters::context('IBokameraPaymentManager3',genericArgs:['InitCheckoutRequestBody','QvicklyCheckoutResponse','QvicklyPaymentResponse']), $o['QvicklyPaymentManager']);
if (isset($o['Payson2PaymentManager'])) $this->Payson2PaymentManager = JsonConverters::from(JsonConverters::context('IBokameraPaymentManager3',genericArgs:['Payson2CheckoutResponse','Payson2CheckoutResponse','Payson2CheckoutResponse']), $o['Payson2PaymentManager']);
if (isset($o['PaysonPaymentCheckout1'])) $this->PaysonPaymentCheckout1 = JsonConverters::from('IPaysonPaymentCheckout1', $o['PaysonPaymentCheckout1']);
if (isset($o['Logger'])) $this->Logger = JsonConverters::from(JsonConverters::context('ILogger',genericArgs:['PayableEntity']), $o['Logger']);
if (isset($o['InternalReferenceId'])) $this->InternalReferenceId = $o['InternalReferenceId'];
if (isset($o['PaymentLog'])) $this->PaymentLog = JsonConverters::fromArray('PaymentLog', $o['PaymentLog']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['PriceVat'])) $this->PriceVat = $o['PriceVat'];
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
if (isset($o['Customers'])) $this->Customers = JsonConverters::fromArray('Customer', $o['Customers']);
if (isset($o['Company'])) $this->Company = JsonConverters::from('Company', $o['Company']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DbFactory)) $o['DbFactory'] = JsonConverters::to('IDbConnectionFactory', $this->DbFactory);
if (isset($this->QvicklyPaymentManager)) $o['QvicklyPaymentManager'] = JsonConverters::to(JsonConverters::context('IBokameraPaymentManager3',genericArgs:['InitCheckoutRequestBody','QvicklyCheckoutResponse','QvicklyPaymentResponse']), $this->QvicklyPaymentManager);
if (isset($this->Payson2PaymentManager)) $o['Payson2PaymentManager'] = JsonConverters::to(JsonConverters::context('IBokameraPaymentManager3',genericArgs:['Payson2CheckoutResponse','Payson2CheckoutResponse','Payson2CheckoutResponse']), $this->Payson2PaymentManager);
if (isset($this->PaysonPaymentCheckout1)) $o['PaysonPaymentCheckout1'] = JsonConverters::to('IPaysonPaymentCheckout1', $this->PaysonPaymentCheckout1);
if (isset($this->Logger)) $o['Logger'] = JsonConverters::to(JsonConverters::context('ILogger',genericArgs:['PayableEntity']), $this->Logger);
if (isset($this->InternalReferenceId)) $o['InternalReferenceId'] = $this->InternalReferenceId;
if (isset($this->PaymentLog)) $o['PaymentLog'] = JsonConverters::toArray('PaymentLog', $this->PaymentLog);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->PriceVat)) $o['PriceVat'] = $this->PriceVat;
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
if (isset($this->Customers)) $o['Customers'] = JsonConverters::toArray('Customer', $this->Customers);
if (isset($this->Company)) $o['Company'] = JsonConverters::to('Company', $this->Company);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeStatus extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
/** @var string|null */
public ?string $Description=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class ArticleServiceRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var int */
public int $ServiceId=0,
// @Required()
/** @var int */
public int $ArticleId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['ArticleId'])) $this->ArticleId = $o['ArticleId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->ArticleId)) $o['ArticleId'] = $this->ArticleId;
return empty($o) ? new class(){} : $o;
}
}
enum ArticleTypeEnum : int
{
case ServiceArticle = 1;
case StandAloneArticle = 2;
case RebateCodePunchTicketArticle = 3;
case RebateCodeGiftCardArticle = 4;
case RebateCodeValueCardArticle = 5;
}
class Article extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
/** @var Company|null */
public ?Company $Company=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
/** @var array<ArticleServiceRelation>|null */
public ?array $ArticleServiceRelations=null,
// @Ignore()
/** @var array<int>|null */
public ?array $ServiceIds=null,
// @Ignore()
/** @var ArticleTypeEnum|null */
public ?ArticleTypeEnum $ArticleType=null,
// @Ignore()
/** @var string|null */
public ?string $ArticleTypeName=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var int */
public int $ArticleTypeId=0,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
// @Required()
/** @var int */
public int $Amount=0,
// @Required()
/** @var float */
public float $Price=0.0,
// @Required()
// @StringLength(50)
/** @var string */
public string $CurrencyId='',
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Company'])) $this->Company = JsonConverters::from('Company', $o['Company']);
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['ArticleServiceRelations'])) $this->ArticleServiceRelations = JsonConverters::fromArray('ArticleServiceRelation', $o['ArticleServiceRelations']);
if (isset($o['ServiceIds'])) $this->ServiceIds = JsonConverters::fromArray('int', $o['ServiceIds']);
if (isset($o['ArticleType'])) $this->ArticleType = JsonConverters::from('ArticleTypeEnum', $o['ArticleType']);
if (isset($o['ArticleTypeName'])) $this->ArticleTypeName = $o['ArticleTypeName'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['ArticleTypeId'])) $this->ArticleTypeId = $o['ArticleTypeId'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Amount'])) $this->Amount = $o['Amount'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Company)) $o['Company'] = JsonConverters::to('Company', $this->Company);
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->ArticleServiceRelations)) $o['ArticleServiceRelations'] = JsonConverters::toArray('ArticleServiceRelation', $this->ArticleServiceRelations);
if (isset($this->ServiceIds)) $o['ServiceIds'] = JsonConverters::toArray('int', $this->ServiceIds);
if (isset($this->ArticleType)) $o['ArticleType'] = JsonConverters::to('ArticleTypeEnum', $this->ArticleType);
if (isset($this->ArticleTypeName)) $o['ArticleTypeName'] = $this->ArticleTypeName;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->ArticleTypeId)) $o['ArticleTypeId'] = $this->ArticleTypeId;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Amount)) $o['Amount'] = $this->Amount;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeDayOfWeekRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var BokaMeraDayOfWeek|null */
public ?BokaMeraDayOfWeek $DayOfWeek=null,
// @Required()
/** @var int */
public int $DayOfWeekId=0,
// @Required()
/** @var int */
public int $RebateCodeId=0,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DayOfWeek'])) $this->DayOfWeek = JsonConverters::from('BokaMeraDayOfWeek', $o['DayOfWeek']);
if (isset($o['DayOfWeekId'])) $this->DayOfWeekId = $o['DayOfWeekId'];
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DayOfWeek)) $o['DayOfWeek'] = JsonConverters::to('BokaMeraDayOfWeek', $this->DayOfWeek);
if (isset($this->DayOfWeekId)) $o['DayOfWeekId'] = $this->DayOfWeekId;
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeServiceRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $ServiceId=0,
// @Required()
/** @var int */
public int $RebateCodeId=0,
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeBookingPriceRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $PriceId=0,
// @Required()
/** @var int */
public int $RebateCodeId=0,
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeCustomerRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var string */
public string $CustomerId='',
// @Required()
/** @var int */
public int $RebateCodeId=0,
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var bool|null */
public ?bool $RebateCodeEmailSentToCustomer=null,
/** @var string|null */
public ?string $MessageToReceiver=null,
/** @var bool|null */
public ?bool $Buyer=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['RebateCodeEmailSentToCustomer'])) $this->RebateCodeEmailSentToCustomer = $o['RebateCodeEmailSentToCustomer'];
if (isset($o['MessageToReceiver'])) $this->MessageToReceiver = $o['MessageToReceiver'];
if (isset($o['Buyer'])) $this->Buyer = $o['Buyer'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->RebateCodeEmailSentToCustomer)) $o['RebateCodeEmailSentToCustomer'] = $this->RebateCodeEmailSentToCustomer;
if (isset($this->MessageToReceiver)) $o['MessageToReceiver'] = $this->MessageToReceiver;
if (isset($this->Buyer)) $o['Buyer'] = $this->Buyer;
return empty($o) ? new class(){} : $o;
}
}
class DaysOfWeek extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $DayOfWeek='',
// @Required()
/** @var string */
public string $DayOfWeekTranslation='',
/** @var bool|null */
public ?bool $DayOfWeekActive=null,
/** @var int|null */
public ?int $DayOfWeekSortOrder=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DayOfWeek'])) $this->DayOfWeek = $o['DayOfWeek'];
if (isset($o['DayOfWeekTranslation'])) $this->DayOfWeekTranslation = $o['DayOfWeekTranslation'];
if (isset($o['DayOfWeekActive'])) $this->DayOfWeekActive = $o['DayOfWeekActive'];
if (isset($o['DayOfWeekSortOrder'])) $this->DayOfWeekSortOrder = $o['DayOfWeekSortOrder'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DayOfWeek)) $o['DayOfWeek'] = $this->DayOfWeek;
if (isset($this->DayOfWeekTranslation)) $o['DayOfWeekTranslation'] = $this->DayOfWeekTranslation;
if (isset($this->DayOfWeekActive)) $o['DayOfWeekActive'] = $this->DayOfWeekActive;
if (isset($this->DayOfWeekSortOrder)) $o['DayOfWeekSortOrder'] = $this->DayOfWeekSortOrder;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class CalendarExport extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $BookingId=0,
// @Required()
/** @var int */
public int $ExceptionId=0,
/** @var bool|null */
public ?bool $CalendarSync=null,
/** @var string|null */
public ?string $CalendarId=null,
/** @var bool|null */
public ?bool $IsExceptionDeleted=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['ExceptionId'])) $this->ExceptionId = $o['ExceptionId'];
if (isset($o['CalendarSync'])) $this->CalendarSync = $o['CalendarSync'];
if (isset($o['CalendarId'])) $this->CalendarId = $o['CalendarId'];
if (isset($o['IsExceptionDeleted'])) $this->IsExceptionDeleted = $o['IsExceptionDeleted'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->ExceptionId)) $o['ExceptionId'] = $this->ExceptionId;
if (isset($this->CalendarSync)) $o['CalendarSync'] = $this->CalendarSync;
if (isset($this->CalendarId)) $o['CalendarId'] = $this->CalendarId;
if (isset($this->IsExceptionDeleted)) $o['IsExceptionDeleted'] = $this->IsExceptionDeleted;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookingLogEventType extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookingLog extends BaseModel implements JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.BookingLogEventType)")
/** @var int */
public int $EventTypeId=0,
/** @var BookingLogEventType|null */
public ?BookingLogEventType $EventType=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $BookingId=0,
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Comments=null,
/** @var string|null */
public ?string $UserId=null,
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['EventTypeId'])) $this->EventTypeId = $o['EventTypeId'];
if (isset($o['EventType'])) $this->EventType = JsonConverters::from('BookingLogEventType', $o['EventType']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->EventTypeId)) $o['EventTypeId'] = $this->EventTypeId;
if (isset($this->EventType)) $o['EventType'] = JsonConverters::to('BookingLogEventType', $this->EventType);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class PaymentDetails extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var QvicklyCheckoutResponse|null */
public ?QvicklyCheckoutResponse $QvicklyCheckoutSerialized=null,
// @Ignore()
/** @var Payson2CheckoutResponse|null */
public ?Payson2CheckoutResponse $Payson2CheckoutSerialized=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var string */
public string $InternalReferenceId='',
// @Required()
/** @var int */
public int $ArticleTypeId=0,
// @Required()
/** @var string */
public string $ExternalResponseData='',
// @Required()
/** @var string */
public string $ExternalResponseReference='',
// @Required()
/** @var int */
public int $PaymentProviderId=0,
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['QvicklyCheckoutSerialized'])) $this->QvicklyCheckoutSerialized = JsonConverters::from('QvicklyCheckoutResponse', $o['QvicklyCheckoutSerialized']);
if (isset($o['Payson2CheckoutSerialized'])) $this->Payson2CheckoutSerialized = JsonConverters::from('Payson2CheckoutResponse', $o['Payson2CheckoutSerialized']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['InternalReferenceId'])) $this->InternalReferenceId = $o['InternalReferenceId'];
if (isset($o['ArticleTypeId'])) $this->ArticleTypeId = $o['ArticleTypeId'];
if (isset($o['ExternalResponseData'])) $this->ExternalResponseData = $o['ExternalResponseData'];
if (isset($o['ExternalResponseReference'])) $this->ExternalResponseReference = $o['ExternalResponseReference'];
if (isset($o['PaymentProviderId'])) $this->PaymentProviderId = $o['PaymentProviderId'];
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['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->QvicklyCheckoutSerialized)) $o['QvicklyCheckoutSerialized'] = JsonConverters::to('QvicklyCheckoutResponse', $this->QvicklyCheckoutSerialized);
if (isset($this->Payson2CheckoutSerialized)) $o['Payson2CheckoutSerialized'] = JsonConverters::to('Payson2CheckoutResponse', $this->Payson2CheckoutSerialized);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->InternalReferenceId)) $o['InternalReferenceId'] = $this->InternalReferenceId;
if (isset($this->ArticleTypeId)) $o['ArticleTypeId'] = $this->ArticleTypeId;
if (isset($this->ExternalResponseData)) $o['ExternalResponseData'] = $this->ExternalResponseData;
if (isset($this->ExternalResponseReference)) $o['ExternalResponseReference'] = $this->ExternalResponseReference;
if (isset($this->PaymentProviderId)) $o['PaymentProviderId'] = $this->PaymentProviderId;
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->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class BookingPrice extends BaseModel implements JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
/** @var string|null */
public ?string $CurrencyId=null,
/** @var int|null */
public ?int $PriceId=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
// @Ignore()
/** @var string|null */
public ?string $PriceText=null,
// @Ignore()
/** @var array<AppliedRebateCodes>|null */
public ?array $AppliedCodes=null,
// @Ignore()
/** @var bool|null */
public ?bool $IsRebate=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $BookingId=0,
// @Required()
/** @var int */
public int $Quantity=0,
/** @var float|null */
public ?float $Price=null,
/** @var float|null */
public ?float $VAT=null,
/** @var string|null */
public ?string $Category=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var bool|null */
public ?bool $Invoiced=null,
// @Required()
/** @var bool|null */
public ?bool $OccupiesSpot=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['PriceId'])) $this->PriceId = $o['PriceId'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
if (isset($o['AppliedCodes'])) $this->AppliedCodes = JsonConverters::fromArray('AppliedRebateCodes', $o['AppliedCodes']);
if (isset($o['IsRebate'])) $this->IsRebate = $o['IsRebate'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['VAT'])) $this->VAT = $o['VAT'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['Invoiced'])) $this->Invoiced = $o['Invoiced'];
if (isset($o['OccupiesSpot'])) $this->OccupiesSpot = $o['OccupiesSpot'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->PriceId)) $o['PriceId'] = $this->PriceId;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
if (isset($this->AppliedCodes)) $o['AppliedCodes'] = JsonConverters::toArray('AppliedRebateCodes', $this->AppliedCodes);
if (isset($this->IsRebate)) $o['IsRebate'] = $this->IsRebate;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->VAT)) $o['VAT'] = $this->VAT;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->Invoiced)) $o['Invoiced'] = $this->Invoiced;
if (isset($this->OccupiesSpot)) $o['OccupiesSpot'] = $this->OccupiesSpot;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookingStatus extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Color='',
// @Required()
/** @var string */
public string $Icon='',
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['Icon'])) $this->Icon = $o['Icon'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->Icon)) $o['Icon'] = $this->Icon;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
class BookedResource implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Color=null,
/** @var string|null */
public ?string $ImageUrl=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $MobilePhone=null,
/** @var string|null */
public ?string $AccessGroup=null,
/** @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|null */
public ?string $Name=null,
/** @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 Booking extends PayableEntity implements IInterval, ICustomFieldTable, IBaseModelUpdated, IBaseModelCreated, JsonSerializable
{
/**
* @param IDbConnectionFactory|null $DbFactory
* @param IBokameraPaymentManager3<InitCheckoutRequestBody, QvicklyCheckoutResponse, QvicklyPaymentResponse>|null $QvicklyPaymentManager
* @param IBokameraPaymentManager3<Payson2CheckoutResponse, Payson2CheckoutResponse, Payson2CheckoutResponse>|null $Payson2PaymentManager
* @param IPaysonPaymentCheckout1|null $PaysonPaymentCheckout1
* @param ILogger<PayableEntity>|null $Logger
* @param string|null $InternalReferenceId
* @param array<PaymentLog>|null $PaymentLog
* @param string $CompanyId
* @param float|null $PriceVat
* @param string|null $CurrencyId
* @param Customer|null $Customer
* @param array<Customer>|null $Customers
* @param Company|null $Company
*/
public function __construct(
?IDbConnectionFactory $DbFactory=null,
?IBokameraPaymentManager3 $QvicklyPaymentManager=null,
?IBokameraPaymentManager3 $Payson2PaymentManager=null,
?IPaysonPaymentCheckout1 $PaysonPaymentCheckout1=null,
?ILogger $Logger=null,
?string $InternalReferenceId=null,
?array $PaymentLog=null,
string $CompanyId='',
?float $PriceVat=null,
?string $CurrencyId=null,
?Customer $Customer=null,
?array $Customers=null,
?Company $Company=null,
// @Ignore()
/** @var Service|null */
public ?Service $Service=null,
// @Ignore()
/** @var CalendarExport|null */
public ?CalendarExport $CalendarExport=null,
// @Ignore()
/** @var array<BookingLog>|null */
public ?array $Log=null,
// @Ignore()
/** @var array<PaymentDetails>|null */
public ?array $CheckoutLogs=null,
// @Ignore()
/** @var array<BookingPrice>|null */
public ?array $Prices=null,
// @Ignore()
/** @var BookingStatusEnum|null */
public ?BookingStatusEnum $Status=null,
// @Ignore()
/** @var bool|null */
public ?bool $IsReserved=null,
// @Ignore()
/** @var string|null */
public ?string $StatusName=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
/** @var BookingStatus|null */
public ?BookingStatus $BookingStatus=null,
// @Ignore()
/** @var float|null */
public ?float $TotalPrice=null,
// @Ignore()
/** @var int|null */
public ?int $TotalSpots=null,
// @Ignore()
/** @var array<Resource>|null */
public ?array $Resources=null,
// @Ignore()
/** @var array<ExternalReference>|null */
public ?array $ExternalReferences=null,
// @Ignore()
/** @var array<BookedResourceType>|null */
public ?array $BookedResources=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldDataResponse>|null */
public ?array $CustomFieldsData=null,
// @Ignore()
/** @var string */
public string $DeterministicId='',
// @Ignore()
/** @var bool|null */
public ?bool $Active=null,
// @Ignore()
/** @var DateTime|null */
public ?DateTime $LastTimeToUnBook=null,
// @Ignore()
/** @var array<PriceMapping>|null */
public ?array $PriceMappings=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $CustomerId='',
// @Required()
/** @var int */
public int $ServiceId=0,
// @Required()
/** @var int */
public int $StatusId=0,
/** @var DateTime|null */
public ?DateTime $UnbookedOn=null,
/** @var string|null */
public ?string $UnbookedComments=null,
/** @var string|null */
public ?string $BookedComments=null,
// @Required()
/** @var string */
public string $BookedBy='',
/** @var string|null */
public ?string $UnBookedBy=null,
// @Required()
/** @var bool|null */
public ?bool $SendSmsReminder=null,
// @Required()
/** @var bool|null */
public ?bool $SendEmailReminder=null,
// @Required()
/** @var bool|null */
public ?bool $SendSmsConfirmation=null,
/** @var string|null */
public ?string $RebateCode=null,
/** @var string|null */
public ?string $Comments=null,
/** @var string|null */
public ?string $IpAddress=null,
// @Required()
/** @var int */
public int $NumberOfBookedSpots=0,
/** @var string|null */
public ?string $CommentsToCustomer=null,
/** @var DateTime|null */
public ?DateTime $PaymentExpiration=null,
// @Required()
/** @var bool|null */
public ?bool $SendEmailConfirmation=null,
/** @var string|null */
public ?string $CancellationCode=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $RatingCode=null,
/** @var string|null */
public ?string $TextField1=null,
/** @var string|null */
public ?string $TextField2=null,
/** @var string|null */
public ?string $TextField3=null,
/** @var string|null */
public ?string $TextField4=null,
/** @var string|null */
public ?string $TextField5=null,
/** @var string|null */
public ?string $TextField6=null,
/** @var string|null */
public ?string $TextField7=null,
/** @var string|null */
public ?string $TextField8=null,
/** @var string|null */
public ?string $TextField9=null,
/** @var string|null */
public ?string $TextField10=null,
/** @var string|null */
public ?string $TextField11=null,
/** @var string|null */
public ?string $TextField12=null,
/** @var string|null */
public ?string $TextField13=null,
/** @var string|null */
public ?string $TextField14=null,
/** @var string|null */
public ?string $TextField15=null,
/** @var string|null */
public ?string $TextField16=null,
/** @var string|null */
public ?string $TextField17=null,
/** @var string|null */
public ?string $TextField18=null,
/** @var string|null */
public ?string $TextField19=null,
/** @var string|null */
public ?string $TextField20=null,
// @Required()
/** @var DateTime */
public DateTime $From=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $To=new DateTime()
) {
parent::__construct($DbFactory,$QvicklyPaymentManager,$Payson2PaymentManager,$PaysonPaymentCheckout1,$Logger,$InternalReferenceId,$PaymentLog,$CompanyId,$PriceVat,$CurrencyId,$Customer,$Customers,$Company);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Service'])) $this->Service = JsonConverters::from('Service', $o['Service']);
if (isset($o['CalendarExport'])) $this->CalendarExport = JsonConverters::from('CalendarExport', $o['CalendarExport']);
if (isset($o['Log'])) $this->Log = JsonConverters::fromArray('BookingLog', $o['Log']);
if (isset($o['CheckoutLogs'])) $this->CheckoutLogs = JsonConverters::fromArray('PaymentDetails', $o['CheckoutLogs']);
if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('BookingPrice', $o['Prices']);
if (isset($o['Status'])) $this->Status = JsonConverters::from('BookingStatusEnum', $o['Status']);
if (isset($o['IsReserved'])) $this->IsReserved = $o['IsReserved'];
if (isset($o['StatusName'])) $this->StatusName = $o['StatusName'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['BookingStatus'])) $this->BookingStatus = JsonConverters::from('BookingStatus', $o['BookingStatus']);
if (isset($o['TotalPrice'])) $this->TotalPrice = $o['TotalPrice'];
if (isset($o['TotalSpots'])) $this->TotalSpots = $o['TotalSpots'];
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
if (isset($o['ExternalReferences'])) $this->ExternalReferences = JsonConverters::fromArray('ExternalReference', $o['ExternalReferences']);
if (isset($o['BookedResources'])) $this->BookedResources = JsonConverters::fromArray('BookedResourceType', $o['BookedResources']);
if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
if (isset($o['DeterministicId'])) $this->DeterministicId = $o['DeterministicId'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['LastTimeToUnBook'])) $this->LastTimeToUnBook = JsonConverters::from('DateTime', $o['LastTimeToUnBook']);
if (isset($o['PriceMappings'])) $this->PriceMappings = JsonConverters::fromArray('PriceMapping', $o['PriceMappings']);
if (isset($o['InternalReferenceId'])) $this->InternalReferenceId = $o['InternalReferenceId'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
if (isset($o['UnbookedOn'])) $this->UnbookedOn = JsonConverters::from('DateTime', $o['UnbookedOn']);
if (isset($o['UnbookedComments'])) $this->UnbookedComments = $o['UnbookedComments'];
if (isset($o['BookedComments'])) $this->BookedComments = $o['BookedComments'];
if (isset($o['BookedBy'])) $this->BookedBy = $o['BookedBy'];
if (isset($o['UnBookedBy'])) $this->UnBookedBy = $o['UnBookedBy'];
if (isset($o['SendSmsReminder'])) $this->SendSmsReminder = $o['SendSmsReminder'];
if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
if (isset($o['SendSmsConfirmation'])) $this->SendSmsConfirmation = $o['SendSmsConfirmation'];
if (isset($o['RebateCode'])) $this->RebateCode = $o['RebateCode'];
if (isset($o['Comments'])) $this->Comments = $o['Comments'];
if (isset($o['IpAddress'])) $this->IpAddress = $o['IpAddress'];
if (isset($o['NumberOfBookedSpots'])) $this->NumberOfBookedSpots = $o['NumberOfBookedSpots'];
if (isset($o['CommentsToCustomer'])) $this->CommentsToCustomer = $o['CommentsToCustomer'];
if (isset($o['PaymentExpiration'])) $this->PaymentExpiration = JsonConverters::from('DateTime', $o['PaymentExpiration']);
if (isset($o['SendEmailConfirmation'])) $this->SendEmailConfirmation = $o['SendEmailConfirmation'];
if (isset($o['CancellationCode'])) $this->CancellationCode = $o['CancellationCode'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['RatingCode'])) $this->RatingCode = $o['RatingCode'];
if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Service)) $o['Service'] = JsonConverters::to('Service', $this->Service);
if (isset($this->CalendarExport)) $o['CalendarExport'] = JsonConverters::to('CalendarExport', $this->CalendarExport);
if (isset($this->Log)) $o['Log'] = JsonConverters::toArray('BookingLog', $this->Log);
if (isset($this->CheckoutLogs)) $o['CheckoutLogs'] = JsonConverters::toArray('PaymentDetails', $this->CheckoutLogs);
if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('BookingPrice', $this->Prices);
if (isset($this->Status)) $o['Status'] = JsonConverters::to('BookingStatusEnum', $this->Status);
if (isset($this->IsReserved)) $o['IsReserved'] = $this->IsReserved;
if (isset($this->StatusName)) $o['StatusName'] = $this->StatusName;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->BookingStatus)) $o['BookingStatus'] = JsonConverters::to('BookingStatus', $this->BookingStatus);
if (isset($this->TotalPrice)) $o['TotalPrice'] = $this->TotalPrice;
if (isset($this->TotalSpots)) $o['TotalSpots'] = $this->TotalSpots;
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
if (isset($this->ExternalReferences)) $o['ExternalReferences'] = JsonConverters::toArray('ExternalReference', $this->ExternalReferences);
if (isset($this->BookedResources)) $o['BookedResources'] = JsonConverters::toArray('BookedResourceType', $this->BookedResources);
if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
if (isset($this->DeterministicId)) $o['DeterministicId'] = $this->DeterministicId;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->LastTimeToUnBook)) $o['LastTimeToUnBook'] = JsonConverters::to('DateTime', $this->LastTimeToUnBook);
if (isset($this->PriceMappings)) $o['PriceMappings'] = JsonConverters::toArray('PriceMapping', $this->PriceMappings);
if (isset($this->InternalReferenceId)) $o['InternalReferenceId'] = $this->InternalReferenceId;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
if (isset($this->UnbookedOn)) $o['UnbookedOn'] = JsonConverters::to('DateTime', $this->UnbookedOn);
if (isset($this->UnbookedComments)) $o['UnbookedComments'] = $this->UnbookedComments;
if (isset($this->BookedComments)) $o['BookedComments'] = $this->BookedComments;
if (isset($this->BookedBy)) $o['BookedBy'] = $this->BookedBy;
if (isset($this->UnBookedBy)) $o['UnBookedBy'] = $this->UnBookedBy;
if (isset($this->SendSmsReminder)) $o['SendSmsReminder'] = $this->SendSmsReminder;
if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
if (isset($this->SendSmsConfirmation)) $o['SendSmsConfirmation'] = $this->SendSmsConfirmation;
if (isset($this->RebateCode)) $o['RebateCode'] = $this->RebateCode;
if (isset($this->Comments)) $o['Comments'] = $this->Comments;
if (isset($this->IpAddress)) $o['IpAddress'] = $this->IpAddress;
if (isset($this->NumberOfBookedSpots)) $o['NumberOfBookedSpots'] = $this->NumberOfBookedSpots;
if (isset($this->CommentsToCustomer)) $o['CommentsToCustomer'] = $this->CommentsToCustomer;
if (isset($this->PaymentExpiration)) $o['PaymentExpiration'] = JsonConverters::to('DateTime', $this->PaymentExpiration);
if (isset($this->SendEmailConfirmation)) $o['SendEmailConfirmation'] = $this->SendEmailConfirmation;
if (isset($this->CancellationCode)) $o['CancellationCode'] = $this->CancellationCode;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->RatingCode)) $o['RatingCode'] = $this->RatingCode;
if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
return empty($o) ? new class(){} : $o;
}
}
class RebateCodeTransaction extends BaseModel implements IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var Booking|null */
public ?Booking $Booking=null,
// @Ignore()
/** @var RebateCode|null */
public ?RebateCode $RebateCode=null,
// @Ignore()
/** @var Customer|null */
public ?Customer $Customer=null,
/** @var int */
public int $Id=0,
/** @var string */
public string $CompanyId='',
/** @var string|null */
public ?string $Note=null,
// @Required()
/** @var int */
public int $RebateCodeId=0,
// @Required()
/** @var float */
public float $Amount=0.0,
// @Required()
/** @var int */
public int $Usage=0,
/** @var int|null */
public ?int $BookingId=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Booking'])) $this->Booking = JsonConverters::from('Booking', $o['Booking']);
if (isset($o['RebateCode'])) $this->RebateCode = JsonConverters::from('RebateCode', $o['RebateCode']);
if (isset($o['Customer'])) $this->Customer = JsonConverters::from('Customer', $o['Customer']);
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['RebateCodeId'])) $this->RebateCodeId = $o['RebateCodeId'];
if (isset($o['Amount'])) $this->Amount = $o['Amount'];
if (isset($o['Usage'])) $this->Usage = $o['Usage'];
if (isset($o['BookingId'])) $this->BookingId = $o['BookingId'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Booking)) $o['Booking'] = JsonConverters::to('Booking', $this->Booking);
if (isset($this->RebateCode)) $o['RebateCode'] = JsonConverters::to('RebateCode', $this->RebateCode);
if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('Customer', $this->Customer);
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->RebateCodeId)) $o['RebateCodeId'] = $this->RebateCodeId;
if (isset($this->Amount)) $o['Amount'] = $this->Amount;
if (isset($this->Usage)) $o['Usage'] = $this->Usage;
if (isset($this->BookingId)) $o['BookingId'] = $this->BookingId;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
return empty($o) ? new class(){} : $o;
}
}
class RebateCode extends PayableEntity implements JsonSerializable
{
/**
* @param IDbConnectionFactory|null $DbFactory
* @param IBokameraPaymentManager3<InitCheckoutRequestBody, QvicklyCheckoutResponse, QvicklyPaymentResponse>|null $QvicklyPaymentManager
* @param IBokameraPaymentManager3<Payson2CheckoutResponse, Payson2CheckoutResponse, Payson2CheckoutResponse>|null $Payson2PaymentManager
* @param IPaysonPaymentCheckout1|null $PaysonPaymentCheckout1
* @param ILogger<PayableEntity>|null $Logger
* @param string|null $InternalReferenceId
* @param array<PaymentLog>|null $PaymentLog
* @param string $CompanyId
* @param float|null $PriceVat
* @param string|null $CurrencyId
* @param Customer|null $Customer
* @param array<Customer>|null $Customers
* @param Company|null $Company
*/
public function __construct(
?IDbConnectionFactory $DbFactory=null,
?IBokameraPaymentManager3 $QvicklyPaymentManager=null,
?IBokameraPaymentManager3 $Payson2PaymentManager=null,
?IPaysonPaymentCheckout1 $PaysonPaymentCheckout1=null,
?ILogger $Logger=null,
?string $InternalReferenceId=null,
?array $PaymentLog=null,
string $CompanyId='',
?float $PriceVat=null,
?string $CurrencyId=null,
?Customer $Customer=null,
?array $Customers=null,
?Company $Company=null,
// @References("typeof(BokaMera.API.ServiceModel.Db.RebateCodeType)")
/** @var int */
public int $RebateCodeTypeId=0,
/** @var RebateCodeType|null */
public ?RebateCodeType $RebateCodeTypeInfo=null,
// @References("typeof(BokaMera.API.ServiceModel.Db.RebateCodeStatus)")
/** @var int */
public int $RebateCodeStatusId=0,
/** @var RebateCodeStatus|null */
public ?RebateCodeStatus $RebateCodeStatusInfo=null,
// @Ignore()
/** @var Article|null */
public ?Article $Article=null,
// @Ignore()
/** @var array<Service>|null */
public ?array $Services=null,
/** @var array<RebateCodeDayOfWeekRelation>|null */
public ?array $RebateCodeDayOfWeekRelation=null,
/** @var array<RebateCodeServiceRelation>|null */
public ?array $RebateCodeServiceRelation=null,
/** @var array<RebateCodeBookingPriceRelation>|null */
public ?array $RebateCodeBookingPriceRelation=null,
/** @var array<RebateCodeCustomerRelation>|null */
public ?array $RebateCodeCustomerRelation=null,
// @Ignore()
/** @var string|null */
public ?string $ServicesNames=null,
// @Ignore()
/** @var array<DaysOfWeek>|null */
public ?array $DaysOfWeek=null,
// @Ignore()
/** @var RebateCodeStatus|null */
public ?RebateCodeStatus $RebateCodeStatus=null,
// @Ignore()
/** @var RebateCodeType|null */
public ?RebateCodeType $RebateCodeType=null,
// @Ignore()
/** @var array<RebateCodeTransaction>|null */
public ?array $Transactions=null,
// @Ignore()
/** @var float|null */
public ?float $RemainingAmount=null,
// @Ignore()
/** @var int|null */
public ?int $RemainingUsage=null,
// @Ignore()
/** @var int */
public int $CurrentNumberOfUsesPerCustomer=0,
// @Ignore()
/** @var bool|null */
public ?bool $IsSpecificByDayOfWeek=null,
// @Ignore()
/** @var bool|null */
public ?bool $Active=null,
// @Ignore()
/** @var bool|null */
public ?bool $ActiveByStatus=null,
// @Ignore()
/** @var string|null */
public ?string $RebateCodeCurrencySign=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
// @Ignore()
/** @var bool|null */
public ?bool $PaymentReceived=null,
// @Required()
/** @var DateTime */
public DateTime $ValidFrom=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $ValidTo=new DateTime(),
// @Required()
/** @var string */
public string $RebateCodeSign='',
// @Required()
/** @var int */
public int $RebateCodeValue=0,
// @Required()
/** @var int */
public int $MaxNumberOfUses=0,
// @Required()
/** @var int */
public int $MaxNumberOfUsesPerCustomer=0,
// @Required()
/** @var int */
public int $NumberOfUsesUsed=0,
/** @var string|null */
public ?string $PersonalNote=null,
// @Required()
/** @var string */
public string $CreatedBy='',
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var string */
public string $UpdatedBy='',
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateInterval|null */
public ?DateInterval $FromTime=null,
// @Required()
/** @var DateInterval|null */
public ?DateInterval $ToTime=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var int */
public int $Id=0,
/** @var int|null */
public ?int $ArticleId=null
) {
parent::__construct($DbFactory,$QvicklyPaymentManager,$Payson2PaymentManager,$PaysonPaymentCheckout1,$Logger,$InternalReferenceId,$PaymentLog,$CompanyId,$PriceVat,$CurrencyId,$Customer,$Customers,$Company);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['RebateCodeTypeId'])) $this->RebateCodeTypeId = $o['RebateCodeTypeId'];
if (isset($o['RebateCodeTypeInfo'])) $this->RebateCodeTypeInfo = JsonConverters::from('RebateCodeType', $o['RebateCodeTypeInfo']);
if (isset($o['RebateCodeStatusId'])) $this->RebateCodeStatusId = $o['RebateCodeStatusId'];
if (isset($o['RebateCodeStatusInfo'])) $this->RebateCodeStatusInfo = JsonConverters::from('RebateCodeStatus', $o['RebateCodeStatusInfo']);
if (isset($o['Article'])) $this->Article = JsonConverters::from('Article', $o['Article']);
if (isset($o['Services'])) $this->Services = JsonConverters::fromArray('Service', $o['Services']);
if (isset($o['RebateCodeDayOfWeekRelation'])) $this->RebateCodeDayOfWeekRelation = JsonConverters::fromArray('RebateCodeDayOfWeekRelation', $o['RebateCodeDayOfWeekRelation']);
if (isset($o['RebateCodeServiceRelation'])) $this->RebateCodeServiceRelation = JsonConverters::fromArray('RebateCodeServiceRelation', $o['RebateCodeServiceRelation']);
if (isset($o['RebateCodeBookingPriceRelation'])) $this->RebateCodeBookingPriceRelation = JsonConverters::fromArray('RebateCodeBookingPriceRelation', $o['RebateCodeBookingPriceRelation']);
if (isset($o['RebateCodeCustomerRelation'])) $this->RebateCodeCustomerRelation = JsonConverters::fromArray('RebateCodeCustomerRelation', $o['RebateCodeCustomerRelation']);
if (isset($o['ServicesNames'])) $this->ServicesNames = $o['ServicesNames'];
if (isset($o['DaysOfWeek'])) $this->DaysOfWeek = JsonConverters::fromArray('DaysOfWeek', $o['DaysOfWeek']);
if (isset($o['RebateCodeStatus'])) $this->RebateCodeStatus = JsonConverters::from('RebateCodeStatus', $o['RebateCodeStatus']);
if (isset($o['RebateCodeType'])) $this->RebateCodeType = JsonConverters::from('RebateCodeType', $o['RebateCodeType']);
if (isset($o['Transactions'])) $this->Transactions = JsonConverters::fromArray('RebateCodeTransaction', $o['Transactions']);
if (isset($o['RemainingAmount'])) $this->RemainingAmount = $o['RemainingAmount'];
if (isset($o['RemainingUsage'])) $this->RemainingUsage = $o['RemainingUsage'];
if (isset($o['CurrentNumberOfUsesPerCustomer'])) $this->CurrentNumberOfUsesPerCustomer = $o['CurrentNumberOfUsesPerCustomer'];
if (isset($o['IsSpecificByDayOfWeek'])) $this->IsSpecificByDayOfWeek = $o['IsSpecificByDayOfWeek'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['ActiveByStatus'])) $this->ActiveByStatus = $o['ActiveByStatus'];
if (isset($o['RebateCodeCurrencySign'])) $this->RebateCodeCurrencySign = $o['RebateCodeCurrencySign'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['PaymentReceived'])) $this->PaymentReceived = $o['PaymentReceived'];
if (isset($o['InternalReferenceId'])) $this->InternalReferenceId = $o['InternalReferenceId'];
if (isset($o['ValidFrom'])) $this->ValidFrom = JsonConverters::from('DateTime', $o['ValidFrom']);
if (isset($o['ValidTo'])) $this->ValidTo = JsonConverters::from('DateTime', $o['ValidTo']);
if (isset($o['RebateCodeSign'])) $this->RebateCodeSign = $o['RebateCodeSign'];
if (isset($o['RebateCodeValue'])) $this->RebateCodeValue = $o['RebateCodeValue'];
if (isset($o['MaxNumberOfUses'])) $this->MaxNumberOfUses = $o['MaxNumberOfUses'];
if (isset($o['MaxNumberOfUsesPerCustomer'])) $this->MaxNumberOfUsesPerCustomer = $o['MaxNumberOfUsesPerCustomer'];
if (isset($o['NumberOfUsesUsed'])) $this->NumberOfUsesUsed = $o['NumberOfUsesUsed'];
if (isset($o['PersonalNote'])) $this->PersonalNote = $o['PersonalNote'];
if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['UpdatedBy'])) $this->UpdatedBy = $o['UpdatedBy'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ArticleId'])) $this->ArticleId = $o['ArticleId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->RebateCodeTypeId)) $o['RebateCodeTypeId'] = $this->RebateCodeTypeId;
if (isset($this->RebateCodeTypeInfo)) $o['RebateCodeTypeInfo'] = JsonConverters::to('RebateCodeType', $this->RebateCodeTypeInfo);
if (isset($this->RebateCodeStatusId)) $o['RebateCodeStatusId'] = $this->RebateCodeStatusId;
if (isset($this->RebateCodeStatusInfo)) $o['RebateCodeStatusInfo'] = JsonConverters::to('RebateCodeStatus', $this->RebateCodeStatusInfo);
if (isset($this->Article)) $o['Article'] = JsonConverters::to('Article', $this->Article);
if (isset($this->Services)) $o['Services'] = JsonConverters::toArray('Service', $this->Services);
if (isset($this->RebateCodeDayOfWeekRelation)) $o['RebateCodeDayOfWeekRelation'] = JsonConverters::toArray('RebateCodeDayOfWeekRelation', $this->RebateCodeDayOfWeekRelation);
if (isset($this->RebateCodeServiceRelation)) $o['RebateCodeServiceRelation'] = JsonConverters::toArray('RebateCodeServiceRelation', $this->RebateCodeServiceRelation);
if (isset($this->RebateCodeBookingPriceRelation)) $o['RebateCodeBookingPriceRelation'] = JsonConverters::toArray('RebateCodeBookingPriceRelation', $this->RebateCodeBookingPriceRelation);
if (isset($this->RebateCodeCustomerRelation)) $o['RebateCodeCustomerRelation'] = JsonConverters::toArray('RebateCodeCustomerRelation', $this->RebateCodeCustomerRelation);
if (isset($this->ServicesNames)) $o['ServicesNames'] = $this->ServicesNames;
if (isset($this->DaysOfWeek)) $o['DaysOfWeek'] = JsonConverters::toArray('DaysOfWeek', $this->DaysOfWeek);
if (isset($this->RebateCodeStatus)) $o['RebateCodeStatus'] = JsonConverters::to('RebateCodeStatus', $this->RebateCodeStatus);
if (isset($this->RebateCodeType)) $o['RebateCodeType'] = JsonConverters::to('RebateCodeType', $this->RebateCodeType);
if (isset($this->Transactions)) $o['Transactions'] = JsonConverters::toArray('RebateCodeTransaction', $this->Transactions);
if (isset($this->RemainingAmount)) $o['RemainingAmount'] = $this->RemainingAmount;
if (isset($this->RemainingUsage)) $o['RemainingUsage'] = $this->RemainingUsage;
if (isset($this->CurrentNumberOfUsesPerCustomer)) $o['CurrentNumberOfUsesPerCustomer'] = $this->CurrentNumberOfUsesPerCustomer;
if (isset($this->IsSpecificByDayOfWeek)) $o['IsSpecificByDayOfWeek'] = $this->IsSpecificByDayOfWeek;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->ActiveByStatus)) $o['ActiveByStatus'] = $this->ActiveByStatus;
if (isset($this->RebateCodeCurrencySign)) $o['RebateCodeCurrencySign'] = $this->RebateCodeCurrencySign;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->PaymentReceived)) $o['PaymentReceived'] = $this->PaymentReceived;
if (isset($this->InternalReferenceId)) $o['InternalReferenceId'] = $this->InternalReferenceId;
if (isset($this->ValidFrom)) $o['ValidFrom'] = JsonConverters::to('DateTime', $this->ValidFrom);
if (isset($this->ValidTo)) $o['ValidTo'] = JsonConverters::to('DateTime', $this->ValidTo);
if (isset($this->RebateCodeSign)) $o['RebateCodeSign'] = $this->RebateCodeSign;
if (isset($this->RebateCodeValue)) $o['RebateCodeValue'] = $this->RebateCodeValue;
if (isset($this->MaxNumberOfUses)) $o['MaxNumberOfUses'] = $this->MaxNumberOfUses;
if (isset($this->MaxNumberOfUsesPerCustomer)) $o['MaxNumberOfUsesPerCustomer'] = $this->MaxNumberOfUsesPerCustomer;
if (isset($this->NumberOfUsesUsed)) $o['NumberOfUsesUsed'] = $this->NumberOfUsesUsed;
if (isset($this->PersonalNote)) $o['PersonalNote'] = $this->PersonalNote;
if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->UpdatedBy)) $o['UpdatedBy'] = $this->UpdatedBy;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ArticleId)) $o['ArticleId'] = $this->ArticleId;
return empty($o) ? new class(){} : $o;
}
}
class ServicePrice extends BaseModel implements IInterval, JsonSerializable
{
public function __construct(
// @References("typeof(BokaMera.API.ServiceModel.Db.Currency)")
/** @var string|null */
public ?string $CurrencyId=null,
/** @var Currency|null */
public ?Currency $CurrencyInfo=null,
// @Ignore()
/** @var Service|null */
public ?Service $Service=null,
// @Ignore()
/** @var array<PriceMapping>|null */
public ?array $PriceMappings=null,
// @Ignore()
/** @var bool|null */
public ?bool $isTimeSpecific=null,
// @Ignore()
/** @var bool|null */
public ?bool $isDaysOfWeekSpecific=null,
/** @var array<ServicePriceDayOfWeekRelation>|null */
public ?array $DayOfWeeks=null,
// @Ignore()
/** @var float|null */
public ?float $PriceBeforeRebate=null,
// @Ignore()
/** @var array<RebateCode>|null */
public ?array $RebateCodesApplied=null,
// @Ignore()
/** @var string|null */
public ?string $PriceText=null,
// @Ignore()
/** @var array<ServicePrice>|null */
public ?array $OverlappingPrices=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var int */
public int $ServiceId=0,
/** @var float|null */
public ?float $Price=null,
// @Required()
/** @var DateTime */
public DateTime $Updated=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $Created=new DateTime(),
// @Required()
/** @var DateInterval|null */
public ?DateInterval $FromTime=null,
// @Required()
/** @var DateInterval|null */
public ?DateInterval $ToTime=null,
// @Required()
/** @var float */
public float $VAT=0.0,
/** @var string|null */
public ?string $Category=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var DateTime */
public DateTime $From=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $To=new DateTime(),
// @Required()
/** @var int */
public int $CalculationTypeId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CurrencyId'])) $this->CurrencyId = $o['CurrencyId'];
if (isset($o['CurrencyInfo'])) $this->CurrencyInfo = JsonConverters::from('Currency', $o['CurrencyInfo']);
if (isset($o['Service'])) $this->Service = JsonConverters::from('Service', $o['Service']);
if (isset($o['PriceMappings'])) $this->PriceMappings = JsonConverters::fromArray('PriceMapping', $o['PriceMappings']);
if (isset($o['isTimeSpecific'])) $this->isTimeSpecific = $o['isTimeSpecific'];
if (isset($o['isDaysOfWeekSpecific'])) $this->isDaysOfWeekSpecific = $o['isDaysOfWeekSpecific'];
if (isset($o['DayOfWeeks'])) $this->DayOfWeeks = JsonConverters::fromArray('ServicePriceDayOfWeekRelation', $o['DayOfWeeks']);
if (isset($o['PriceBeforeRebate'])) $this->PriceBeforeRebate = $o['PriceBeforeRebate'];
if (isset($o['RebateCodesApplied'])) $this->RebateCodesApplied = JsonConverters::fromArray('RebateCode', $o['RebateCodesApplied']);
if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
if (isset($o['OverlappingPrices'])) $this->OverlappingPrices = JsonConverters::fromArray('ServicePrice', $o['OverlappingPrices']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['Updated'])) $this->Updated = JsonConverters::from('DateTime', $o['Updated']);
if (isset($o['Created'])) $this->Created = JsonConverters::from('DateTime', $o['Created']);
if (isset($o['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
if (isset($o['VAT'])) $this->VAT = $o['VAT'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
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['CalculationTypeId'])) $this->CalculationTypeId = $o['CalculationTypeId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CurrencyId)) $o['CurrencyId'] = $this->CurrencyId;
if (isset($this->CurrencyInfo)) $o['CurrencyInfo'] = JsonConverters::to('Currency', $this->CurrencyInfo);
if (isset($this->Service)) $o['Service'] = JsonConverters::to('Service', $this->Service);
if (isset($this->PriceMappings)) $o['PriceMappings'] = JsonConverters::toArray('PriceMapping', $this->PriceMappings);
if (isset($this->isTimeSpecific)) $o['isTimeSpecific'] = $this->isTimeSpecific;
if (isset($this->isDaysOfWeekSpecific)) $o['isDaysOfWeekSpecific'] = $this->isDaysOfWeekSpecific;
if (isset($this->DayOfWeeks)) $o['DayOfWeeks'] = JsonConverters::toArray('ServicePriceDayOfWeekRelation', $this->DayOfWeeks);
if (isset($this->PriceBeforeRebate)) $o['PriceBeforeRebate'] = $this->PriceBeforeRebate;
if (isset($this->RebateCodesApplied)) $o['RebateCodesApplied'] = JsonConverters::toArray('RebateCode', $this->RebateCodesApplied);
if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
if (isset($this->OverlappingPrices)) $o['OverlappingPrices'] = JsonConverters::toArray('ServicePrice', $this->OverlappingPrices);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->Updated)) $o['Updated'] = JsonConverters::to('DateTime', $this->Updated);
if (isset($this->Created)) $o['Created'] = JsonConverters::to('DateTime', $this->Created);
if (isset($this->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
if (isset($this->VAT)) $o['VAT'] = $this->VAT;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
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->CalculationTypeId)) $o['CalculationTypeId'] = $this->CalculationTypeId;
return empty($o) ? new class(){} : $o;
}
}
class Service extends BaseModel implements ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<ResourceType>|null */
public ?array $ResourceTypes=null,
// @Ignore()
/** @var array<Resource>|null */
public ?array $Resources=null,
// @Ignore()
/** @var TotalPriceInformation|null */
public ?TotalPriceInformation $TotalPrice=null,
// @Ignore()
/** @var array<ServicePrice>|null */
public ?array $Prices=null,
// @Ignore()
/** @var array<BookingStatusOptions>|null */
public ?array $BookingStatusOptions=null,
// @Ignore()
/** @var bool|null */
public ?bool $IsGroupBooking=null,
// @Ignore()
/** @var bool|null */
public ?bool $IsMultipleResource=null,
// @Ignore()
/** @var BookingSettings|null */
public ?BookingSettings $Settings=null,
// @Ignore()
/** @var PaymentSetting|null */
public ?PaymentSetting $PaymentSetting=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $BookingCustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomerCustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldDataResponse>|null */
public ?array $CustomFieldsData=null,
// @Ignore()
/** @var array<ISchedule>|null */
public ?array $Schedules=null,
// @Ignore()
/** @var array<Booking>|null */
public ?array $CustomerActiveBookings=null,
// @Ignore()
/** @var ScheduleType|null */
public ?ScheduleType $ScheduleType=null,
// @Ignore()
/** @var DateInterval|null */
public ?DateInterval $LastTimeToUnbookThreshold=null,
// @Ignore()
/** @var DateInterval|null */
public ?DateInterval $LastTimeToBookThreshold=null,
// @Ignore()
/** @var AverageRatingScore|null */
public ?AverageRatingScore $RatingScore=null,
// @Ignore()
/** @var array<Rating>|null */
public ?array $Ratings=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
/** @var string|null */
public ?string $Group=null,
// @Required()
/** @var bool|null */
public ?bool $Active=null,
// @Required()
/** @var int */
public int $SortOrder=0,
// @Required()
/** @var int */
public int $PauseAfterBooking=0,
// @Required()
/** @var int */
public int $UnbookBeforeDays=0,
// @Required()
/** @var int */
public int $UnbookBeforeHours=0,
// @Required()
/** @var int */
public int $UnbookBeforeMinutes=0,
// @Required()
/** @var int */
public int $BookBeforeDays=0,
// @Required()
/** @var int */
public int $BookBeforeHours=0,
// @Required()
/** @var int */
public int $BookBeforeMinutes=0,
/** @var int|null */
public ?int $Duration=null,
/** @var int */
public int $DurationTypeId=0,
/** @var int|null */
public ?int $MinDuration=null,
/** @var int|null */
public ?int $MaxDuration=null,
/** @var int|null */
public ?int $DurationInterval=null,
/** @var int|null */
public ?int $TotalSpots=null,
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var int */
public int $ScheduleTypeId=0,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
// @Required()
/** @var bool|null */
public ?bool $OnlyVisibleByAdmin=null,
// @Required()
/** @var int */
public int $MinNumberOfSpotsPerBooking=0,
// @Required()
/** @var int */
public int $MaxNumberOfSpotsPerBooking=0,
// @Required()
/** @var int */
public int $MinNumberOfResourcesToBook=0,
// @Required()
/** @var int */
public int $MaxNumberOfResourcesToBook=0,
// @Required()
/** @var bool|null */
public ?bool $IsPaymentEnabled=null,
// @Required()
/** @var int */
public int $MaxPaymentTime=0,
// @Required()
/** @var bool|null */
public ?bool $LockSpotsToBooking=null,
// @Required()
/** @var bool|null */
public ?bool $EnableBookingQueue=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var int */
public int $BookingStatusId=0,
// @Required()
/** @var bool|null */
public ?bool $EnableCodeLockSync=null,
// @Required()
/** @var bool|null */
public ?bool $EnableCustomerManualPayment=null,
/** @var int|null */
public ?int $PriceViewTypeId=null,
/** @var string|null */
public ?string $TextField1=null,
/** @var string|null */
public ?string $TextField2=null,
/** @var string|null */
public ?string $TextField3=null,
/** @var string|null */
public ?string $TextField4=null,
/** @var string|null */
public ?string $TextField5=null,
/** @var string|null */
public ?string $TextField6=null,
/** @var string|null */
public ?string $TextField7=null,
/** @var string|null */
public ?string $TextField8=null,
/** @var string|null */
public ?string $TextField9=null,
/** @var string|null */
public ?string $TextField10=null,
/** @var string|null */
public ?string $TextField11=null,
/** @var string|null */
public ?string $TextField12=null,
/** @var string|null */
public ?string $TextField13=null,
/** @var string|null */
public ?string $TextField14=null,
/** @var string|null */
public ?string $TextField15=null,
/** @var string|null */
public ?string $TextField16=null,
/** @var string|null */
public ?string $TextField17=null,
/** @var string|null */
public ?string $TextField18=null,
/** @var string|null */
public ?string $TextField19=null,
/** @var string|null */
public ?string $TextField20=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ResourceTypes'])) $this->ResourceTypes = JsonConverters::fromArray('ResourceType', $o['ResourceTypes']);
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('Resource', $o['Resources']);
if (isset($o['TotalPrice'])) $this->TotalPrice = JsonConverters::from('TotalPriceInformation', $o['TotalPrice']);
if (isset($o['Prices'])) $this->Prices = JsonConverters::fromArray('ServicePrice', $o['Prices']);
if (isset($o['BookingStatusOptions'])) $this->BookingStatusOptions = JsonConverters::fromArray('BookingStatusOptions', $o['BookingStatusOptions']);
if (isset($o['IsGroupBooking'])) $this->IsGroupBooking = $o['IsGroupBooking'];
if (isset($o['IsMultipleResource'])) $this->IsMultipleResource = $o['IsMultipleResource'];
if (isset($o['Settings'])) $this->Settings = JsonConverters::from('BookingSettings', $o['Settings']);
if (isset($o['PaymentSetting'])) $this->PaymentSetting = JsonConverters::from('PaymentSetting', $o['PaymentSetting']);
if (isset($o['BookingCustomFieldsConfig'])) $this->BookingCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['BookingCustomFieldsConfig']);
if (isset($o['CustomerCustomFieldsConfig'])) $this->CustomerCustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomerCustomFieldsConfig']);
if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
if (isset($o['Schedules'])) $this->Schedules = JsonConverters::fromArray('ISchedule', $o['Schedules']);
if (isset($o['CustomerActiveBookings'])) $this->CustomerActiveBookings = JsonConverters::fromArray('Booking', $o['CustomerActiveBookings']);
if (isset($o['ScheduleType'])) $this->ScheduleType = JsonConverters::from('ScheduleType', $o['ScheduleType']);
if (isset($o['LastTimeToUnbookThreshold'])) $this->LastTimeToUnbookThreshold = JsonConverters::from('DateInterval', $o['LastTimeToUnbookThreshold']);
if (isset($o['LastTimeToBookThreshold'])) $this->LastTimeToBookThreshold = JsonConverters::from('DateInterval', $o['LastTimeToBookThreshold']);
if (isset($o['RatingScore'])) $this->RatingScore = JsonConverters::from('AverageRatingScore', $o['RatingScore']);
if (isset($o['Ratings'])) $this->Ratings = JsonConverters::fromArray('Rating', $o['Ratings']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
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['Group'])) $this->Group = $o['Group'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['PauseAfterBooking'])) $this->PauseAfterBooking = $o['PauseAfterBooking'];
if (isset($o['UnbookBeforeDays'])) $this->UnbookBeforeDays = $o['UnbookBeforeDays'];
if (isset($o['UnbookBeforeHours'])) $this->UnbookBeforeHours = $o['UnbookBeforeHours'];
if (isset($o['UnbookBeforeMinutes'])) $this->UnbookBeforeMinutes = $o['UnbookBeforeMinutes'];
if (isset($o['BookBeforeDays'])) $this->BookBeforeDays = $o['BookBeforeDays'];
if (isset($o['BookBeforeHours'])) $this->BookBeforeHours = $o['BookBeforeHours'];
if (isset($o['BookBeforeMinutes'])) $this->BookBeforeMinutes = $o['BookBeforeMinutes'];
if (isset($o['Duration'])) $this->Duration = $o['Duration'];
if (isset($o['DurationTypeId'])) $this->DurationTypeId = $o['DurationTypeId'];
if (isset($o['MinDuration'])) $this->MinDuration = $o['MinDuration'];
if (isset($o['MaxDuration'])) $this->MaxDuration = $o['MaxDuration'];
if (isset($o['DurationInterval'])) $this->DurationInterval = $o['DurationInterval'];
if (isset($o['TotalSpots'])) $this->TotalSpots = $o['TotalSpots'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['ScheduleTypeId'])) $this->ScheduleTypeId = $o['ScheduleTypeId'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['OnlyVisibleByAdmin'])) $this->OnlyVisibleByAdmin = $o['OnlyVisibleByAdmin'];
if (isset($o['MinNumberOfSpotsPerBooking'])) $this->MinNumberOfSpotsPerBooking = $o['MinNumberOfSpotsPerBooking'];
if (isset($o['MaxNumberOfSpotsPerBooking'])) $this->MaxNumberOfSpotsPerBooking = $o['MaxNumberOfSpotsPerBooking'];
if (isset($o['MinNumberOfResourcesToBook'])) $this->MinNumberOfResourcesToBook = $o['MinNumberOfResourcesToBook'];
if (isset($o['MaxNumberOfResourcesToBook'])) $this->MaxNumberOfResourcesToBook = $o['MaxNumberOfResourcesToBook'];
if (isset($o['IsPaymentEnabled'])) $this->IsPaymentEnabled = $o['IsPaymentEnabled'];
if (isset($o['MaxPaymentTime'])) $this->MaxPaymentTime = $o['MaxPaymentTime'];
if (isset($o['LockSpotsToBooking'])) $this->LockSpotsToBooking = $o['LockSpotsToBooking'];
if (isset($o['EnableBookingQueue'])) $this->EnableBookingQueue = $o['EnableBookingQueue'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['BookingStatusId'])) $this->BookingStatusId = $o['BookingStatusId'];
if (isset($o['EnableCodeLockSync'])) $this->EnableCodeLockSync = $o['EnableCodeLockSync'];
if (isset($o['EnableCustomerManualPayment'])) $this->EnableCustomerManualPayment = $o['EnableCustomerManualPayment'];
if (isset($o['PriceViewTypeId'])) $this->PriceViewTypeId = $o['PriceViewTypeId'];
if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ResourceTypes)) $o['ResourceTypes'] = JsonConverters::toArray('ResourceType', $this->ResourceTypes);
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('Resource', $this->Resources);
if (isset($this->TotalPrice)) $o['TotalPrice'] = JsonConverters::to('TotalPriceInformation', $this->TotalPrice);
if (isset($this->Prices)) $o['Prices'] = JsonConverters::toArray('ServicePrice', $this->Prices);
if (isset($this->BookingStatusOptions)) $o['BookingStatusOptions'] = JsonConverters::toArray('BookingStatusOptions', $this->BookingStatusOptions);
if (isset($this->IsGroupBooking)) $o['IsGroupBooking'] = $this->IsGroupBooking;
if (isset($this->IsMultipleResource)) $o['IsMultipleResource'] = $this->IsMultipleResource;
if (isset($this->Settings)) $o['Settings'] = JsonConverters::to('BookingSettings', $this->Settings);
if (isset($this->PaymentSetting)) $o['PaymentSetting'] = JsonConverters::to('PaymentSetting', $this->PaymentSetting);
if (isset($this->BookingCustomFieldsConfig)) $o['BookingCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->BookingCustomFieldsConfig);
if (isset($this->CustomerCustomFieldsConfig)) $o['CustomerCustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomerCustomFieldsConfig);
if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
if (isset($this->Schedules)) $o['Schedules'] = JsonConverters::toArray('ISchedule', $this->Schedules);
if (isset($this->CustomerActiveBookings)) $o['CustomerActiveBookings'] = JsonConverters::toArray('Booking', $this->CustomerActiveBookings);
if (isset($this->ScheduleType)) $o['ScheduleType'] = JsonConverters::to('ScheduleType', $this->ScheduleType);
if (isset($this->LastTimeToUnbookThreshold)) $o['LastTimeToUnbookThreshold'] = JsonConverters::to('DateInterval', $this->LastTimeToUnbookThreshold);
if (isset($this->LastTimeToBookThreshold)) $o['LastTimeToBookThreshold'] = JsonConverters::to('DateInterval', $this->LastTimeToBookThreshold);
if (isset($this->RatingScore)) $o['RatingScore'] = JsonConverters::to('AverageRatingScore', $this->RatingScore);
if (isset($this->Ratings)) $o['Ratings'] = JsonConverters::toArray('Rating', $this->Ratings);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
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->Group)) $o['Group'] = $this->Group;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->PauseAfterBooking)) $o['PauseAfterBooking'] = $this->PauseAfterBooking;
if (isset($this->UnbookBeforeDays)) $o['UnbookBeforeDays'] = $this->UnbookBeforeDays;
if (isset($this->UnbookBeforeHours)) $o['UnbookBeforeHours'] = $this->UnbookBeforeHours;
if (isset($this->UnbookBeforeMinutes)) $o['UnbookBeforeMinutes'] = $this->UnbookBeforeMinutes;
if (isset($this->BookBeforeDays)) $o['BookBeforeDays'] = $this->BookBeforeDays;
if (isset($this->BookBeforeHours)) $o['BookBeforeHours'] = $this->BookBeforeHours;
if (isset($this->BookBeforeMinutes)) $o['BookBeforeMinutes'] = $this->BookBeforeMinutes;
if (isset($this->Duration)) $o['Duration'] = $this->Duration;
if (isset($this->DurationTypeId)) $o['DurationTypeId'] = $this->DurationTypeId;
if (isset($this->MinDuration)) $o['MinDuration'] = $this->MinDuration;
if (isset($this->MaxDuration)) $o['MaxDuration'] = $this->MaxDuration;
if (isset($this->DurationInterval)) $o['DurationInterval'] = $this->DurationInterval;
if (isset($this->TotalSpots)) $o['TotalSpots'] = $this->TotalSpots;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->ScheduleTypeId)) $o['ScheduleTypeId'] = $this->ScheduleTypeId;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->OnlyVisibleByAdmin)) $o['OnlyVisibleByAdmin'] = $this->OnlyVisibleByAdmin;
if (isset($this->MinNumberOfSpotsPerBooking)) $o['MinNumberOfSpotsPerBooking'] = $this->MinNumberOfSpotsPerBooking;
if (isset($this->MaxNumberOfSpotsPerBooking)) $o['MaxNumberOfSpotsPerBooking'] = $this->MaxNumberOfSpotsPerBooking;
if (isset($this->MinNumberOfResourcesToBook)) $o['MinNumberOfResourcesToBook'] = $this->MinNumberOfResourcesToBook;
if (isset($this->MaxNumberOfResourcesToBook)) $o['MaxNumberOfResourcesToBook'] = $this->MaxNumberOfResourcesToBook;
if (isset($this->IsPaymentEnabled)) $o['IsPaymentEnabled'] = $this->IsPaymentEnabled;
if (isset($this->MaxPaymentTime)) $o['MaxPaymentTime'] = $this->MaxPaymentTime;
if (isset($this->LockSpotsToBooking)) $o['LockSpotsToBooking'] = $this->LockSpotsToBooking;
if (isset($this->EnableBookingQueue)) $o['EnableBookingQueue'] = $this->EnableBookingQueue;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->BookingStatusId)) $o['BookingStatusId'] = $this->BookingStatusId;
if (isset($this->EnableCodeLockSync)) $o['EnableCodeLockSync'] = $this->EnableCodeLockSync;
if (isset($this->EnableCustomerManualPayment)) $o['EnableCustomerManualPayment'] = $this->EnableCustomerManualPayment;
if (isset($this->PriceViewTypeId)) $o['PriceViewTypeId'] = $this->PriceViewTypeId;
if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldServiceRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var int */
public int $CustomFieldConfigId=0,
// @Required()
/** @var int */
public int $ServiceId=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CustomFieldConfigId'])) $this->CustomFieldConfigId = $o['CustomFieldConfigId'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CustomFieldConfigId)) $o['CustomFieldConfigId'] = $this->CustomFieldConfigId;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class CustomFieldConfig extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var array<CustomFieldValue>|null */
public ?array $Values=null,
/** @var CustomField|null */
public ?CustomField $CustomField=null,
// @Ignore()
/** @var RegEx|null */
public ?RegEx $RegEx=null,
// @Ignore()
/** @var array<Service>|null */
public ?array $Services=null,
/** @var array<CustomFieldServiceRelation>|null */
public ?array $CustomFieldServiceRelation=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
/** @var int|null */
public ?int $GroupId=null,
// @Required()
/** @var int */
public int $FieldId=0,
// @Required()
/** @var int */
public int $IconId=0,
/** @var int|null */
public ?int $RegExId=null,
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $Description='',
// @Required()
/** @var string */
public string $Datatype='',
// @Required()
/** @var int */
public int $MaxLength=0,
// @Required()
/** @var bool|null */
public ?bool $IsPublic=null,
// @Required()
/** @var bool|null */
public ?bool $IsHidden=null,
// @Required()
/** @var bool|null */
public ?bool $IsMandatory=null,
/** @var string|null */
public ?string $DefaultValue=null,
/** @var string|null */
public ?string $RegExErrorMessage=null,
/** @var string|null */
public ?string $MandatoryErrorMessage=null,
/** @var int|null */
public ?int $Width=null,
// @Required()
/** @var bool|null */
public ?bool $MultipleLineText=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Values'])) $this->Values = JsonConverters::fromArray('CustomFieldValue', $o['Values']);
if (isset($o['CustomField'])) $this->CustomField = JsonConverters::from('CustomField', $o['CustomField']);
if (isset($o['RegEx'])) $this->RegEx = JsonConverters::from('RegEx', $o['RegEx']);
if (isset($o['Services'])) $this->Services = JsonConverters::fromArray('Service', $o['Services']);
if (isset($o['CustomFieldServiceRelation'])) $this->CustomFieldServiceRelation = JsonConverters::fromArray('CustomFieldServiceRelation', $o['CustomFieldServiceRelation']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['GroupId'])) $this->GroupId = $o['GroupId'];
if (isset($o['FieldId'])) $this->FieldId = $o['FieldId'];
if (isset($o['IconId'])) $this->IconId = $o['IconId'];
if (isset($o['RegExId'])) $this->RegExId = $o['RegExId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Datatype'])) $this->Datatype = $o['Datatype'];
if (isset($o['MaxLength'])) $this->MaxLength = $o['MaxLength'];
if (isset($o['IsPublic'])) $this->IsPublic = $o['IsPublic'];
if (isset($o['IsHidden'])) $this->IsHidden = $o['IsHidden'];
if (isset($o['IsMandatory'])) $this->IsMandatory = $o['IsMandatory'];
if (isset($o['DefaultValue'])) $this->DefaultValue = $o['DefaultValue'];
if (isset($o['RegExErrorMessage'])) $this->RegExErrorMessage = $o['RegExErrorMessage'];
if (isset($o['MandatoryErrorMessage'])) $this->MandatoryErrorMessage = $o['MandatoryErrorMessage'];
if (isset($o['Width'])) $this->Width = $o['Width'];
if (isset($o['MultipleLineText'])) $this->MultipleLineText = $o['MultipleLineText'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Values)) $o['Values'] = JsonConverters::toArray('CustomFieldValue', $this->Values);
if (isset($this->CustomField)) $o['CustomField'] = JsonConverters::to('CustomField', $this->CustomField);
if (isset($this->RegEx)) $o['RegEx'] = JsonConverters::to('RegEx', $this->RegEx);
if (isset($this->Services)) $o['Services'] = JsonConverters::toArray('Service', $this->Services);
if (isset($this->CustomFieldServiceRelation)) $o['CustomFieldServiceRelation'] = JsonConverters::toArray('CustomFieldServiceRelation', $this->CustomFieldServiceRelation);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->GroupId)) $o['GroupId'] = $this->GroupId;
if (isset($this->FieldId)) $o['FieldId'] = $this->FieldId;
if (isset($this->IconId)) $o['IconId'] = $this->IconId;
if (isset($this->RegExId)) $o['RegExId'] = $this->RegExId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Datatype)) $o['Datatype'] = $this->Datatype;
if (isset($this->MaxLength)) $o['MaxLength'] = $this->MaxLength;
if (isset($this->IsPublic)) $o['IsPublic'] = $this->IsPublic;
if (isset($this->IsHidden)) $o['IsHidden'] = $this->IsHidden;
if (isset($this->IsMandatory)) $o['IsMandatory'] = $this->IsMandatory;
if (isset($this->DefaultValue)) $o['DefaultValue'] = $this->DefaultValue;
if (isset($this->RegExErrorMessage)) $o['RegExErrorMessage'] = $this->RegExErrorMessage;
if (isset($this->MandatoryErrorMessage)) $o['MandatoryErrorMessage'] = $this->MandatoryErrorMessage;
if (isset($this->Width)) $o['Width'] = $this->Width;
if (isset($this->MultipleLineText)) $o['MultipleLineText'] = $this->MultipleLineText;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class Resource extends BaseModel implements ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
// @Ignore()
/** @var int */
public int $Priority=0,
// @Ignore()
/** @var array<ISchedule>|null */
public ?array $Schedules=null,
// @Ignore()
/** @var array<ITimeException>|null */
public ?array $Exceptions=null,
// @Ignore()
/** @var array<IBookedTime>|null */
public ?array $Bookings=null,
// @Ignore()
/** @var array<CustomFieldConfig>|null */
public ?array $CustomFieldsConfig=null,
// @Ignore()
/** @var array<CustomFieldDataResponse>|null */
public ?array $CustomFieldsData=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $ImageUrl=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
// @Required()
/** @var string */
public string $Color='',
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $MobilePhone=null,
/** @var bool|null */
public ?bool $EmailNotification=null,
/** @var bool|null */
public ?bool $SMSNotification=null,
// @Required()
/** @var bool|null */
public ?bool $SendSMSReminder=null,
// @Required()
/** @var bool|null */
public ?bool $SendEmailReminder=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
/** @var string|null */
public ?string $AccessGroup=null,
/** @var string|null */
public ?string $TextField1=null,
/** @var string|null */
public ?string $TextField2=null,
/** @var string|null */
public ?string $TextField3=null,
/** @var string|null */
public ?string $TextField4=null,
/** @var string|null */
public ?string $TextField5=null,
/** @var string|null */
public ?string $TextField6=null,
/** @var string|null */
public ?string $TextField7=null,
/** @var string|null */
public ?string $TextField8=null,
/** @var string|null */
public ?string $TextField9=null,
/** @var string|null */
public ?string $TextField10=null,
/** @var string|null */
public ?string $TextField11=null,
/** @var string|null */
public ?string $TextField12=null,
/** @var string|null */
public ?string $TextField13=null,
/** @var string|null */
public ?string $TextField14=null,
/** @var string|null */
public ?string $TextField15=null,
/** @var string|null */
public ?string $TextField16=null,
/** @var string|null */
public ?string $TextField17=null,
/** @var string|null */
public ?string $TextField18=null,
/** @var string|null */
public ?string $TextField19=null,
/** @var string|null */
public ?string $TextField20=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Priority'])) $this->Priority = $o['Priority'];
if (isset($o['Schedules'])) $this->Schedules = JsonConverters::fromArray('ISchedule', $o['Schedules']);
if (isset($o['Exceptions'])) $this->Exceptions = JsonConverters::fromArray('ITimeException', $o['Exceptions']);
if (isset($o['Bookings'])) $this->Bookings = JsonConverters::fromArray('IBookedTime', $o['Bookings']);
if (isset($o['CustomFieldsConfig'])) $this->CustomFieldsConfig = JsonConverters::fromArray('CustomFieldConfig', $o['CustomFieldsConfig']);
if (isset($o['CustomFieldsData'])) $this->CustomFieldsData = JsonConverters::fromArray('CustomFieldDataResponse', $o['CustomFieldsData']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
if (isset($o['EmailNotification'])) $this->EmailNotification = $o['EmailNotification'];
if (isset($o['SMSNotification'])) $this->SMSNotification = $o['SMSNotification'];
if (isset($o['SendSMSReminder'])) $this->SendSMSReminder = $o['SendSMSReminder'];
if (isset($o['SendEmailReminder'])) $this->SendEmailReminder = $o['SendEmailReminder'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['AccessGroup'])) $this->AccessGroup = $o['AccessGroup'];
if (isset($o['TextField1'])) $this->TextField1 = $o['TextField1'];
if (isset($o['TextField2'])) $this->TextField2 = $o['TextField2'];
if (isset($o['TextField3'])) $this->TextField3 = $o['TextField3'];
if (isset($o['TextField4'])) $this->TextField4 = $o['TextField4'];
if (isset($o['TextField5'])) $this->TextField5 = $o['TextField5'];
if (isset($o['TextField6'])) $this->TextField6 = $o['TextField6'];
if (isset($o['TextField7'])) $this->TextField7 = $o['TextField7'];
if (isset($o['TextField8'])) $this->TextField8 = $o['TextField8'];
if (isset($o['TextField9'])) $this->TextField9 = $o['TextField9'];
if (isset($o['TextField10'])) $this->TextField10 = $o['TextField10'];
if (isset($o['TextField11'])) $this->TextField11 = $o['TextField11'];
if (isset($o['TextField12'])) $this->TextField12 = $o['TextField12'];
if (isset($o['TextField13'])) $this->TextField13 = $o['TextField13'];
if (isset($o['TextField14'])) $this->TextField14 = $o['TextField14'];
if (isset($o['TextField15'])) $this->TextField15 = $o['TextField15'];
if (isset($o['TextField16'])) $this->TextField16 = $o['TextField16'];
if (isset($o['TextField17'])) $this->TextField17 = $o['TextField17'];
if (isset($o['TextField18'])) $this->TextField18 = $o['TextField18'];
if (isset($o['TextField19'])) $this->TextField19 = $o['TextField19'];
if (isset($o['TextField20'])) $this->TextField20 = $o['TextField20'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Priority)) $o['Priority'] = $this->Priority;
if (isset($this->Schedules)) $o['Schedules'] = JsonConverters::toArray('ISchedule', $this->Schedules);
if (isset($this->Exceptions)) $o['Exceptions'] = JsonConverters::toArray('ITimeException', $this->Exceptions);
if (isset($this->Bookings)) $o['Bookings'] = JsonConverters::toArray('IBookedTime', $this->Bookings);
if (isset($this->CustomFieldsConfig)) $o['CustomFieldsConfig'] = JsonConverters::toArray('CustomFieldConfig', $this->CustomFieldsConfig);
if (isset($this->CustomFieldsData)) $o['CustomFieldsData'] = JsonConverters::toArray('CustomFieldDataResponse', $this->CustomFieldsData);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
if (isset($this->EmailNotification)) $o['EmailNotification'] = $this->EmailNotification;
if (isset($this->SMSNotification)) $o['SMSNotification'] = $this->SMSNotification;
if (isset($this->SendSMSReminder)) $o['SendSMSReminder'] = $this->SendSMSReminder;
if (isset($this->SendEmailReminder)) $o['SendEmailReminder'] = $this->SendEmailReminder;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->AccessGroup)) $o['AccessGroup'] = $this->AccessGroup;
if (isset($this->TextField1)) $o['TextField1'] = $this->TextField1;
if (isset($this->TextField2)) $o['TextField2'] = $this->TextField2;
if (isset($this->TextField3)) $o['TextField3'] = $this->TextField3;
if (isset($this->TextField4)) $o['TextField4'] = $this->TextField4;
if (isset($this->TextField5)) $o['TextField5'] = $this->TextField5;
if (isset($this->TextField6)) $o['TextField6'] = $this->TextField6;
if (isset($this->TextField7)) $o['TextField7'] = $this->TextField7;
if (isset($this->TextField8)) $o['TextField8'] = $this->TextField8;
if (isset($this->TextField9)) $o['TextField9'] = $this->TextField9;
if (isset($this->TextField10)) $o['TextField10'] = $this->TextField10;
if (isset($this->TextField11)) $o['TextField11'] = $this->TextField11;
if (isset($this->TextField12)) $o['TextField12'] = $this->TextField12;
if (isset($this->TextField13)) $o['TextField13'] = $this->TextField13;
if (isset($this->TextField14)) $o['TextField14'] = $this->TextField14;
if (isset($this->TextField15)) $o['TextField15'] = $this->TextField15;
if (isset($this->TextField16)) $o['TextField16'] = $this->TextField16;
if (isset($this->TextField17)) $o['TextField17'] = $this->TextField17;
if (isset($this->TextField18)) $o['TextField18'] = $this->TextField18;
if (isset($this->TextField19)) $o['TextField19'] = $this->TextField19;
if (isset($this->TextField20)) $o['TextField20'] = $this->TextField20;
return empty($o) ? new class(){} : $o;
}
}
class ResourceTimeExceptionResourceRelation extends BaseModel implements JsonSerializable
{
public function __construct(
// @Ignore()
/** @var Resource|null */
public ?Resource $Resource=null,
// @Required()
/** @var string */
public string $CompanyId='',
// @Required()
/** @var int */
public int $ResourceTimeExceptionId=0,
// @Required()
/** @var int */
public int $ResourceId=0,
/** @var int */
public int $Id=0,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Resource'])) $this->Resource = JsonConverters::from('Resource', $o['Resource']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['ResourceTimeExceptionId'])) $this->ResourceTimeExceptionId = $o['ResourceTimeExceptionId'];
if (isset($o['ResourceId'])) $this->ResourceId = $o['ResourceId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Resource)) $o['Resource'] = JsonConverters::to('Resource', $this->Resource);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->ResourceTimeExceptionId)) $o['ResourceTimeExceptionId'] = $this->ResourceTimeExceptionId;
if (isset($this->ResourceId)) $o['ResourceId'] = $this->ResourceId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
return empty($o) ? new class(){} : $o;
}
}
class ResourceTimeException extends BaseModel implements IInterval, IBaseModelCreated, IBaseModelUpdated, JsonSerializable
{
public function __construct(
/** @var array<ResourceTimeExceptionDayOfWeekRelation>|null */
public ?array $DayOfWeeks=null,
/** @var array<ResourceTimeExceptionResourceRelation>|null */
public ?array $Resources=null,
// @Ignore()
/** @var CalendarExport|null */
public ?CalendarExport $CalendarExport=null,
// @Required()
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
// @Required()
/** @var string */
public string $ReasonText='',
// @Required()
/** @var DateInterval|null */
public ?DateInterval $FromTime=null,
// @Required()
/** @var DateInterval|null */
public ?DateInterval $ToTime=null,
// @Required()
/** @var DateTime */
public DateTime $UpdatedDate=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $CreatedDate=new DateTime(),
/** @var string|null */
public ?string $Color=null,
/** @var string|null */
public ?string $ReasonTextPublic=null,
// @Required()
/** @var bool|null */
public ?bool $BlockTime=null,
// @Required()
/** @var bool|null */
public ?bool $Private=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var DateTime */
public DateTime $From=new DateTime(),
// @Required()
/** @var DateTime */
public DateTime $To=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['DayOfWeeks'])) $this->DayOfWeeks = JsonConverters::fromArray('ResourceTimeExceptionDayOfWeekRelation', $o['DayOfWeeks']);
if (isset($o['Resources'])) $this->Resources = JsonConverters::fromArray('ResourceTimeExceptionResourceRelation', $o['Resources']);
if (isset($o['CalendarExport'])) $this->CalendarExport = JsonConverters::from('CalendarExport', $o['CalendarExport']);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ReasonText'])) $this->ReasonText = $o['ReasonText'];
if (isset($o['FromTime'])) $this->FromTime = JsonConverters::from('DateInterval', $o['FromTime']);
if (isset($o['ToTime'])) $this->ToTime = JsonConverters::from('DateInterval', $o['ToTime']);
if (isset($o['UpdatedDate'])) $this->UpdatedDate = JsonConverters::from('DateTime', $o['UpdatedDate']);
if (isset($o['CreatedDate'])) $this->CreatedDate = JsonConverters::from('DateTime', $o['CreatedDate']);
if (isset($o['Color'])) $this->Color = $o['Color'];
if (isset($o['ReasonTextPublic'])) $this->ReasonTextPublic = $o['ReasonTextPublic'];
if (isset($o['BlockTime'])) $this->BlockTime = $o['BlockTime'];
if (isset($o['Private'])) $this->Private = $o['Private'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['From'])) $this->From = JsonConverters::from('DateTime', $o['From']);
if (isset($o['To'])) $this->To = JsonConverters::from('DateTime', $o['To']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->DayOfWeeks)) $o['DayOfWeeks'] = JsonConverters::toArray('ResourceTimeExceptionDayOfWeekRelation', $this->DayOfWeeks);
if (isset($this->Resources)) $o['Resources'] = JsonConverters::toArray('ResourceTimeExceptionResourceRelation', $this->Resources);
if (isset($this->CalendarExport)) $o['CalendarExport'] = JsonConverters::to('CalendarExport', $this->CalendarExport);
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ReasonText)) $o['ReasonText'] = $this->ReasonText;
if (isset($this->FromTime)) $o['FromTime'] = JsonConverters::to('DateInterval', $this->FromTime);
if (isset($this->ToTime)) $o['ToTime'] = JsonConverters::to('DateInterval', $this->ToTime);
if (isset($this->UpdatedDate)) $o['UpdatedDate'] = JsonConverters::to('DateTime', $this->UpdatedDate);
if (isset($this->CreatedDate)) $o['CreatedDate'] = JsonConverters::to('DateTime', $this->CreatedDate);
if (isset($this->Color)) $o['Color'] = $this->Color;
if (isset($this->ReasonTextPublic)) $o['ReasonTextPublic'] = $this->ReasonTextPublic;
if (isset($this->BlockTime)) $o['BlockTime'] = $this->BlockTime;
if (isset($this->Private)) $o['Private'] = $this->Private;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->From)) $o['From'] = JsonConverters::to('DateTime', $this->From);
if (isset($this->To)) $o['To'] = JsonConverters::to('DateTime', $this->To);
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
// @ValidateRequest(Validator="IsAuthenticated")
/**
* @template QueryDb2 of ResourceTimeException
* @template QueryDb21 of ResourceTimeExceptionQueryResponse
*/
class ResourceTimeExceptionQuery extends QueryDb2 implements JsonSerializable
{
/**
* @param int|null $Skip
* @param int|null $Take
* @param string|null $OrderBy
* @param string|null $OrderByDesc
* @param string|null $Include
* @param string|null $Fields
* @param array<string,string>|null $Meta
*/
public function __construct(
?int $Skip=null,
?int $Take=null,
?string $OrderBy=null,
?string $OrderByDesc=null,
?string $Include=null,
?string $Fields=null,
?array $Meta=null,
/** @description The company id, if empty will use the company id for the user you are logged in with. */
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
/** @var string|null */
public ?string $CompanyId=null,
/** @description Enter the resource id's separated by comma that you want to see time exceptions for, if no value is given all time exceptions will be returned */
// @ApiMember(Description="Enter the resource id's separated by comma that you want to see time exceptions for, if no value is given all time exceptions will be returned", ParameterType="query")
/** @var int[]|null */
public ?array $ResourceIds=null,
/** @description Start of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339 */
// @ApiMember(DataType="dateTime", Description="Start of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339")
/** @var DateTime|null */
public ?DateTime $TimeExceptionStart=null,
/** @description End of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339 */
// @ApiMember(DataType="dateTime", Description="End of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339")
/** @var DateTime|null */
public ?DateTime $TimeExceptionEnd=null,
/** @description Include only recurring time exceptions or not, if no value is given, all time exceptions will be returned */
// @ApiMember(Description="Include only recurring time exceptions or not, if no value is given, all time exceptions will be returned", ParameterType="query")
/** @var bool|null */
public ?bool $IsRecurring=null,
/** @description Include only time exceptions that are blocking, if no value is given, all time exceptions will be returned */
// @ApiMember(Description="Include only time exceptions that are blocking, if no value is given, all time exceptions will be returned", ParameterType="query")
/** @var bool|null */
public ?bool $IsBlocking=null,
/** @description If you want to include the resource details */
// @ApiMember(DataType="boolean", Description="If you want to include the resource details", ParameterType="query")
/** @var bool|null */
public ?bool $IncludeResourceDetails=null,
/** @description If you want to include google calendar sync status */
// @ApiMember(DataType="boolean", Description="If you want to include google calendar sync status", ParameterType="query")
/** @var bool|null */
public ?bool $IncludeCalendarExportStatus=null,
/** @description The max limit of records you want to retrieve, default is 200 */
// @ApiMember(DataType="int", Description="The max limit of records you want to retrieve, default is 200", ParameterType="query")
/** @var int|null */
public ?int $MaxLimit=null
) {
parent::__construct($Skip,$Take,$OrderBy,$OrderByDesc,$Include,$Fields,$Meta);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['ResourceIds'])) $this->ResourceIds = JsonConverters::fromArray('int', $o['ResourceIds']);
if (isset($o['TimeExceptionStart'])) $this->TimeExceptionStart = JsonConverters::from('DateTime', $o['TimeExceptionStart']);
if (isset($o['TimeExceptionEnd'])) $this->TimeExceptionEnd = JsonConverters::from('DateTime', $o['TimeExceptionEnd']);
if (isset($o['IsRecurring'])) $this->IsRecurring = $o['IsRecurring'];
if (isset($o['IsBlocking'])) $this->IsBlocking = $o['IsBlocking'];
if (isset($o['IncludeResourceDetails'])) $this->IncludeResourceDetails = $o['IncludeResourceDetails'];
if (isset($o['IncludeCalendarExportStatus'])) $this->IncludeCalendarExportStatus = $o['IncludeCalendarExportStatus'];
if (isset($o['MaxLimit'])) $this->MaxLimit = $o['MaxLimit'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->ResourceIds)) $o['ResourceIds'] = JsonConverters::toArray('int', $this->ResourceIds);
if (isset($this->TimeExceptionStart)) $o['TimeExceptionStart'] = JsonConverters::to('DateTime', $this->TimeExceptionStart);
if (isset($this->TimeExceptionEnd)) $o['TimeExceptionEnd'] = JsonConverters::to('DateTime', $this->TimeExceptionEnd);
if (isset($this->IsRecurring)) $o['IsRecurring'] = $this->IsRecurring;
if (isset($this->IsBlocking)) $o['IsBlocking'] = $this->IsBlocking;
if (isset($this->IncludeResourceDetails)) $o['IncludeResourceDetails'] = $this->IncludeResourceDetails;
if (isset($this->IncludeCalendarExportStatus)) $o['IncludeCalendarExportStatus'] = $this->IncludeCalendarExportStatus;
if (isset($this->MaxLimit)) $o['MaxLimit'] = $this->MaxLimit;
return empty($o) ? new class(){} : $o;
}
}
class Currency extends BaseModel implements JsonSerializable
{
public function __construct(
// @Required()
/** @var string */
public string $Name='',
// @Required()
/** @var string */
public string $CurrencySign='',
// @Required()
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime|null */
public ?DateTime $ModifiedDate=null,
// @Required()
/** @var string */
public string $Id=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['CurrencySign'])) $this->CurrencySign = $o['CurrencySign'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['ModifiedDate'])) $this->ModifiedDate = JsonConverters::from('DateTimeOffset', $o['ModifiedDate']);
if (isset($o['Id'])) $this->Id = $o['Id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->CurrencySign)) $o['CurrencySign'] = $this->CurrencySign;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->ModifiedDate)) $o['ModifiedDate'] = JsonConverters::to('DateTimeOffset', $this->ModifiedDate);
if (isset($this->Id)) $o['Id'] = $this->Id;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template TCreatedCheckoutResponse
* @template TCheckoutResponse
* @template TPaymentResponse
*/
interface IBokameraPaymentManager3
{
}
class QvicklyArticle implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $artnr=null,
/** @var string|null */
public ?string $title=null,
/** @var int */
public int $quantity=0,
/** @var int */
public int $aprice=0,
/** @var int */
public int $tax=0,
/** @var int */
public int $discount=0,
/** @var int */
public int $withouttax=0,
/** @var int */
public int $taxrate=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['artnr'])) $this->artnr = $o['artnr'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['quantity'])) $this->quantity = $o['quantity'];
if (isset($o['aprice'])) $this->aprice = $o['aprice'];
if (isset($o['tax'])) $this->tax = $o['tax'];
if (isset($o['discount'])) $this->discount = $o['discount'];
if (isset($o['withouttax'])) $this->withouttax = $o['withouttax'];
if (isset($o['taxrate'])) $this->taxrate = $o['taxrate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->artnr)) $o['artnr'] = $this->artnr;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->quantity)) $o['quantity'] = $this->quantity;
if (isset($this->aprice)) $o['aprice'] = $this->aprice;
if (isset($this->tax)) $o['tax'] = $this->tax;
if (isset($this->discount)) $o['discount'] = $this->discount;
if (isset($this->withouttax)) $o['withouttax'] = $this->withouttax;
if (isset($this->taxrate)) $o['taxrate'] = $this->taxrate;
return empty($o) ? new class(){} : $o;
}
}
class Customer implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $CountryCode=null,
/** @var string|null */
public ?string $IdentityNumber=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $LastName=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $PostalCode=null,
/** @var string|null */
public ?string $Street=null,
/** @var string|null */
public ?string $Reference=null,
/** @var CustomerType|null */
public ?CustomerType $Type=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryCode'])) $this->CountryCode = $o['CountryCode'];
if (isset($o['IdentityNumber'])) $this->IdentityNumber = $o['IdentityNumber'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['LastName'])) $this->LastName = $o['LastName'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['PostalCode'])) $this->PostalCode = $o['PostalCode'];
if (isset($o['Street'])) $this->Street = $o['Street'];
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['Type'])) $this->Type = JsonConverters::from('CustomerType', $o['Type']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryCode)) $o['CountryCode'] = $this->CountryCode;
if (isset($this->IdentityNumber)) $o['IdentityNumber'] = $this->IdentityNumber;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->LastName)) $o['LastName'] = $this->LastName;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->PostalCode)) $o['PostalCode'] = $this->PostalCode;
if (isset($this->Street)) $o['Street'] = $this->Street;
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->Type)) $o['Type'] = JsonConverters::to('CustomerType', $this->Type);
return empty($o) ? new class(){} : $o;
}
}
/**
* @template TCategoryName
*/
interface ILogger extends ILogger
{
}
class AccessKeyTypeResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $KeyType=null,
/** @var string|null */
public ?string $Description=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['KeyType'])) $this->KeyType = $o['KeyType'];
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->KeyType)) $o['KeyType'] = $this->KeyType;
if (isset($this->Description)) $o['Description'] = $this->Description;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
/**
* @template AccessKeyTypeResponse
*/
class QueryResponse implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): QueryResponse {
$to = new QueryResponse();
$to->genericArgs = $genericArgs;
return $to;
}
public function __construct(
// @DataMember(Order=1)
/** @var int */
public mixed $Offset=0,
// @DataMember(Order=2)
/** @var int */
public mixed $Total=0,
// @DataMember(Order=3)
/** @var array<AccessKeyTypeResponse>|null */
public mixed $Results=null,
// @DataMember(Order=4)
/** @var array<string,string>|null */
public mixed $Meta=null,
// @DataMember(Order=5)
/** @var ResponseStatus|null */
public mixed $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Offset'])) $this->Offset = $o['Offset'];
if (isset($o['Total'])) $this->Total = $o['Total'];
if (isset($o['Results'])) $this->Results = JsonConverters::fromArray($this->genericArgs[0], $o['Results']);
if (isset($o['Meta'])) $this->Meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Meta']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Offset)) $o['Offset'] = $this->Offset;
if (isset($this->Total)) $o['Total'] = $this->Total;
if (isset($this->Results)) $o['Results'] = JsonConverters::toArray($this->genericArgs[0], $this->Results);
if (isset($this->Meta)) $o['Meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Meta);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
PHP ResourceTimeExceptionQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /timeexceptions HTTP/1.1 Host: api.bokamera.se Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Offset":0,"Total":0,"Results":[{"Id":0,"Locked":false,"ResourceIds":[0],"Resources":[{"Id":0,"Name":"String","Description":"String","Color":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"IsRecurring":false,"FromTime":"00:00:00","ToTime":"00:00:00","ReasonText":"String","ReasonTextPublic":"String","Color":"String","BlockTime":false,"Private":false,"CalendarExportStatus":{"CalendarId":"String","ExceptionId":0,"Synced":false},"DaysOfWeek":[{"DayOfWeekId":0,"DotNetDayOfWeekId":0,"DayOfWeek":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}