GET | /bookinguserqueue/user | Get all queue items for the logged in user |
---|
<?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};
class BookingUserQueuePriceResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $CompanyId='',
/** @var int */
public int $Id=0,
/** @var int */
public int $BookingUserQueueId=0,
/** @var int|null */
public ?int $ServicePriceId=null,
/** @var int|null */
public ?int $Quantity=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['BookingUserQueueId'])) $this->BookingUserQueueId = $o['BookingUserQueueId'];
if (isset($o['ServicePriceId'])) $this->ServicePriceId = $o['ServicePriceId'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->BookingUserQueueId)) $o['BookingUserQueueId'] = $this->BookingUserQueueId;
if (isset($this->ServicePriceId)) $o['ServicePriceId'] = $this->ServicePriceId;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
return empty($o) ? new class(){} : $o;
}
}
class GroupBookingSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class MultipleResourceSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class ServiceInfoResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $ImageUrl=null,
/** @var int|null */
public ?int $LengthInMinutes=null,
/** @var int */
public int $MaxNumberOfSpotsPerBooking=0,
/** @var int */
public int $MinNumberOfSpotsPerBooking=0,
/** @var GroupBookingSettings|null */
public ?GroupBookingSettings $GroupBooking=null,
/** @var MultipleResourceSettings|null */
public ?MultipleResourceSettings $MultipleResource=null,
/** @var bool|null */
public ?bool $IsGroupBooking=null,
/** @var bool|null */
public ?bool $IsPaymentEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['LengthInMinutes'])) $this->LengthInMinutes = $o['LengthInMinutes'];
if (isset($o['MaxNumberOfSpotsPerBooking'])) $this->MaxNumberOfSpotsPerBooking = $o['MaxNumberOfSpotsPerBooking'];
if (isset($o['MinNumberOfSpotsPerBooking'])) $this->MinNumberOfSpotsPerBooking = $o['MinNumberOfSpotsPerBooking'];
if (isset($o['GroupBooking'])) $this->GroupBooking = JsonConverters::from('GroupBookingSettings', $o['GroupBooking']);
if (isset($o['MultipleResource'])) $this->MultipleResource = JsonConverters::from('MultipleResourceSettings', $o['MultipleResource']);
if (isset($o['IsGroupBooking'])) $this->IsGroupBooking = $o['IsGroupBooking'];
if (isset($o['IsPaymentEnabled'])) $this->IsPaymentEnabled = $o['IsPaymentEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->LengthInMinutes)) $o['LengthInMinutes'] = $this->LengthInMinutes;
if (isset($this->MaxNumberOfSpotsPerBooking)) $o['MaxNumberOfSpotsPerBooking'] = $this->MaxNumberOfSpotsPerBooking;
if (isset($this->MinNumberOfSpotsPerBooking)) $o['MinNumberOfSpotsPerBooking'] = $this->MinNumberOfSpotsPerBooking;
if (isset($this->GroupBooking)) $o['GroupBooking'] = JsonConverters::to('GroupBookingSettings', $this->GroupBooking);
if (isset($this->MultipleResource)) $o['MultipleResource'] = JsonConverters::to('MultipleResourceSettings', $this->MultipleResource);
if (isset($this->IsGroupBooking)) $o['IsGroupBooking'] = $this->IsGroupBooking;
if (isset($this->IsPaymentEnabled)) $o['IsPaymentEnabled'] = $this->IsPaymentEnabled;
return empty($o) ? new class(){} : $o;
}
}
class CompanyInfoResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $LogoType=null,
/** @var string|null */
public ?string $Category=null,
/** @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 $CountryId=null,
/** @var string|null */
public ?string $Longitude=null,
/** @var string|null */
public ?string $Latitude=null,
/** @var string|null */
public ?string $Phone=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $HomePage=null,
/** @var string|null */
public ?string $SitePath=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['LogoType'])) $this->LogoType = JsonConverters::from('string', $o['LogoType']);
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['Street1'])) $this->Street1 = $o['Street1'];
if (isset($o['Street2'])) $this->Street2 = $o['Street2'];
if (isset($o['ZipCode'])) $this->ZipCode = $o['ZipCode'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['CountryId'])) $this->CountryId = $o['CountryId'];
if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['HomePage'])) $this->HomePage = $o['HomePage'];
if (isset($o['SitePath'])) $this->SitePath = $o['SitePath'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->LogoType)) $o['LogoType'] = JsonConverters::to('string', $this->LogoType);
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->Street1)) $o['Street1'] = $this->Street1;
if (isset($this->Street2)) $o['Street2'] = $this->Street2;
if (isset($this->ZipCode)) $o['ZipCode'] = $this->ZipCode;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->CountryId)) $o['CountryId'] = $this->CountryId;
if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->HomePage)) $o['HomePage'] = $this->HomePage;
if (isset($this->SitePath)) $o['SitePath'] = $this->SitePath;
return empty($o) ? new class(){} : $o;
}
}
class BookingUserQueueItemResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $BookingUserQueueId=0,
/** @var string */
public string $CompanyId='',
/** @var string */
public string $CustomerId='',
/** @var int */
public int $ServiceId=0,
/** @var DateTime */
public DateTime $From=new DateTime(),
/** @var DateTime */
public DateTime $To=new DateTime(),
/** @var int */
public int $StatusCode=0,
/** @var string|null */
public ?string $StatusName=null,
/** @var DateTime|null */
public ?DateTime $SendConfirmationTime=null,
/** @var array<BookingUserQueuePriceResponse>|null */
public ?array $Quantities=null,
/** @var ServiceInfoResponse|null */
public ?ServiceInfoResponse $Service=null,
/** @var CompanyInfoResponse|null */
public ?CompanyInfoResponse $Company=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BookingUserQueueId'])) $this->BookingUserQueueId = $o['BookingUserQueueId'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
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['StatusCode'])) $this->StatusCode = $o['StatusCode'];
if (isset($o['StatusName'])) $this->StatusName = $o['StatusName'];
if (isset($o['SendConfirmationTime'])) $this->SendConfirmationTime = JsonConverters::from('DateTime', $o['SendConfirmationTime']);
if (isset($o['Quantities'])) $this->Quantities = JsonConverters::fromArray('BookingUserQueuePriceResponse', $o['Quantities']);
if (isset($o['Service'])) $this->Service = JsonConverters::from('ServiceInfoResponse', $o['Service']);
if (isset($o['Company'])) $this->Company = JsonConverters::from('CompanyInfoResponse', $o['Company']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BookingUserQueueId)) $o['BookingUserQueueId'] = $this->BookingUserQueueId;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
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->StatusCode)) $o['StatusCode'] = $this->StatusCode;
if (isset($this->StatusName)) $o['StatusName'] = $this->StatusName;
if (isset($this->SendConfirmationTime)) $o['SendConfirmationTime'] = JsonConverters::to('DateTime', $this->SendConfirmationTime);
if (isset($this->Quantities)) $o['Quantities'] = JsonConverters::toArray('BookingUserQueuePriceResponse', $this->Quantities);
if (isset($this->Service)) $o['Service'] = JsonConverters::to('ServiceInfoResponse', $this->Service);
if (isset($this->Company)) $o['Company'] = JsonConverters::to('CompanyInfoResponse', $this->Company);
return empty($o) ? new class(){} : $o;
}
}
class GetAllBookingQueueForUserResponse implements JsonSerializable
{
public function __construct(
/** @var array<BookingUserQueueItemResponse>|null */
public ?array $BookingUserQueueResponseList=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BookingUserQueueResponseList'])) $this->BookingUserQueueResponseList = JsonConverters::fromArray('BookingUserQueueItemResponse', $o['BookingUserQueueResponseList']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BookingUserQueueResponseList)) $o['BookingUserQueueResponseList'] = JsonConverters::toArray('BookingUserQueueItemResponse', $this->BookingUserQueueResponseList);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
class GetAllBookingQueueForUser implements JsonSerializable
{
public function __construct(
/** @description The user id for your profile. If not set it will set it automatically from your session */
// @ApiMember(Description="The user id for your profile. If not set it will set it automatically from your session")
/** @var string|null */
public ?string $UserId=null,
/** @var DateTime|null */
public ?DateTime $DateStart=null,
/** @var DateTime|null */
public ?DateTime $DateEnd=null,
/** @description If you want to include the service information for the booking */
// @ApiMember(DataType="boolean", Description="If you want to include the service information for the booking", ParameterType="query")
/** @var bool|null */
public ?bool $IncludeServiceInformation=null,
/** @description If you want to include the company information for the booking */
// @ApiMember(DataType="boolean", Description="If you want to include the company information for the booking", ParameterType="query")
/** @var bool|null */
public ?bool $IncludeCompanyInformation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['DateStart'])) $this->DateStart = JsonConverters::from('DateTime', $o['DateStart']);
if (isset($o['DateEnd'])) $this->DateEnd = JsonConverters::from('DateTime', $o['DateEnd']);
if (isset($o['IncludeServiceInformation'])) $this->IncludeServiceInformation = $o['IncludeServiceInformation'];
if (isset($o['IncludeCompanyInformation'])) $this->IncludeCompanyInformation = $o['IncludeCompanyInformation'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->DateStart)) $o['DateStart'] = JsonConverters::to('DateTime', $this->DateStart);
if (isset($this->DateEnd)) $o['DateEnd'] = JsonConverters::to('DateTime', $this->DateEnd);
if (isset($this->IncludeServiceInformation)) $o['IncludeServiceInformation'] = $this->IncludeServiceInformation;
if (isset($this->IncludeCompanyInformation)) $o['IncludeCompanyInformation'] = $this->IncludeCompanyInformation;
return empty($o) ? new class(){} : $o;
}
}
PHP GetAllBookingQueueForUser DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /bookinguserqueue/user HTTP/1.1 Host: api.bokamera.se Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetAllBookingQueueForUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <BookingUserQueueResponseList> <BookingUserQueueItemResponse> <BookingUserQueueId>0</BookingUserQueueId> <Company> <Category>String</Category> <City>String</City> <CountryId>String</CountryId> <Email>String</Email> <HomePage>String</HomePage> <Id>00000000-0000-0000-0000-000000000000</Id> <Latitude>String</Latitude> <LogoType i:nil="true" /> <Longitude>String</Longitude> <Name>String</Name> <Phone>String</Phone> <SitePath>String</SitePath> <Street1>String</Street1> <Street2>String</Street2> <ZipCode>String</ZipCode> </Company> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId> <From>0001-01-01T00:00:00</From> <Quantities> <BookingUserQueuePriceResponse> <BookingUserQueueId>0</BookingUserQueueId> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <Id>0</Id> <Quantity>0</Quantity> <ServicePriceId>0</ServicePriceId> </BookingUserQueuePriceResponse> </Quantities> <SendConfirmationTime>0001-01-01T00:00:00</SendConfirmationTime> <Service> <Description>String</Description> <GroupBooking> <Active>false</Active> <Max>0</Max> <Min>0</Min> </GroupBooking> <Id>0</Id> <ImageUrl i:nil="true" /> <IsGroupBooking>false</IsGroupBooking> <IsPaymentEnabled>false</IsPaymentEnabled> <LengthInMinutes>0</LengthInMinutes> <MaxNumberOfSpotsPerBooking>0</MaxNumberOfSpotsPerBooking> <MinNumberOfSpotsPerBooking>0</MinNumberOfSpotsPerBooking> <MultipleResource> <Active>false</Active> <Max>0</Max> <Min>0</Min> </MultipleResource> <Name>String</Name> </Service> <ServiceId>0</ServiceId> <StatusCode>0</StatusCode> <StatusName>String</StatusName> <To>0001-01-01T00:00:00</To> </BookingUserQueueItemResponse> </BookingUserQueueResponseList> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> </GetAllBookingQueueForUserResponse>