| GET | /bookinguserqueue/{Id} | Get queue item by Id |
|---|
<?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,
/** @var float|null */
public ?float $Price=null,
/** @var string */
public string $PriceText=''
) {
}
/** @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'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['PriceText'])) $this->PriceText = $o['PriceText'];
}
/** @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;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->PriceText)) $o['PriceText'] = $this->PriceText;
return empty($o) ? new class(){} : $o;
}
}
class GroupBookingSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class MultipleResourceSettings implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Active=null,
/** @var int */
public int $Min=0,
/** @var int */
public int $Max=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['Min'])) $this->Min = $o['Min'];
if (isset($o['Max'])) $this->Max = $o['Max'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->Min)) $o['Min'] = $this->Min;
if (isset($this->Max)) $o['Max'] = $this->Max;
return empty($o) ? new class(){} : $o;
}
}
class ServiceInfoResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string */
public string $Name='',
/** @var string */
public string $Description='',
/** @var string */
public string $ImageUrl='',
/** @var int|null */
public ?int $LengthInMinutes=null,
/** @var int */
public int $MaxNumberOfSpotsPerBooking=0,
/** @var int */
public int $MinNumberOfSpotsPerBooking=0,
/** @var GroupBookingSettings|null */
public ?GroupBookingSettings $GroupBooking=null,
/** @var MultipleResourceSettings|null */
public ?MultipleResourceSettings $MultipleResource=null,
/** @var bool|null */
public ?bool $IsGroupBooking=null,
/** @var bool|null */
public ?bool $IsPaymentEnabled=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ImageUrl'])) $this->ImageUrl = JsonConverters::from('string', $o['ImageUrl']);
if (isset($o['LengthInMinutes'])) $this->LengthInMinutes = $o['LengthInMinutes'];
if (isset($o['MaxNumberOfSpotsPerBooking'])) $this->MaxNumberOfSpotsPerBooking = $o['MaxNumberOfSpotsPerBooking'];
if (isset($o['MinNumberOfSpotsPerBooking'])) $this->MinNumberOfSpotsPerBooking = $o['MinNumberOfSpotsPerBooking'];
if (isset($o['GroupBooking'])) $this->GroupBooking = JsonConverters::from('GroupBookingSettings', $o['GroupBooking']);
if (isset($o['MultipleResource'])) $this->MultipleResource = JsonConverters::from('MultipleResourceSettings', $o['MultipleResource']);
if (isset($o['IsGroupBooking'])) $this->IsGroupBooking = $o['IsGroupBooking'];
if (isset($o['IsPaymentEnabled'])) $this->IsPaymentEnabled = $o['IsPaymentEnabled'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ImageUrl)) $o['ImageUrl'] = JsonConverters::to('string', $this->ImageUrl);
if (isset($this->LengthInMinutes)) $o['LengthInMinutes'] = $this->LengthInMinutes;
if (isset($this->MaxNumberOfSpotsPerBooking)) $o['MaxNumberOfSpotsPerBooking'] = $this->MaxNumberOfSpotsPerBooking;
if (isset($this->MinNumberOfSpotsPerBooking)) $o['MinNumberOfSpotsPerBooking'] = $this->MinNumberOfSpotsPerBooking;
if (isset($this->GroupBooking)) $o['GroupBooking'] = JsonConverters::to('GroupBookingSettings', $this->GroupBooking);
if (isset($this->MultipleResource)) $o['MultipleResource'] = JsonConverters::to('MultipleResourceSettings', $this->MultipleResource);
if (isset($this->IsGroupBooking)) $o['IsGroupBooking'] = $this->IsGroupBooking;
if (isset($this->IsPaymentEnabled)) $o['IsPaymentEnabled'] = $this->IsPaymentEnabled;
return empty($o) ? new class(){} : $o;
}
}
class CompanyInfoResponse implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string */
public string $Name='',
/** @var string */
public string $LogoType='',
/** @var string */
public string $SitePath=''
) {
}
/** @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['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->SitePath)) $o['SitePath'] = $this->SitePath;
return empty($o) ? new class(){} : $o;
}
}
class BookedCustomer implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string */
public string $Firstname='',
/** @var string */
public string $Lastname='',
/** @var string */
public string $Email='',
/** @var string */
public string $Phone='',
/** @var string */
public string $FacebookUserName='',
/** @var string */
public string $ImageUrl='',
/** @var string */
public string $PersonalIdentityNumber='',
/** @var string */
public string $CorporateIdentityNumber='',
/** @var string */
public string $InvoiceAddress1='',
/** @var string */
public string $InvoiceAddress2='',
/** @var string */
public string $InvoiceCity='',
/** @var string */
public string $InvoicePostalCode='',
/** @var string */
public string $InvoiceCountryCode=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Firstname'])) $this->Firstname = $o['Firstname'];
if (isset($o['Lastname'])) $this->Lastname = $o['Lastname'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['Phone'])) $this->Phone = $o['Phone'];
if (isset($o['FacebookUserName'])) $this->FacebookUserName = $o['FacebookUserName'];
if (isset($o['ImageUrl'])) $this->ImageUrl = $o['ImageUrl'];
if (isset($o['PersonalIdentityNumber'])) $this->PersonalIdentityNumber = $o['PersonalIdentityNumber'];
if (isset($o['CorporateIdentityNumber'])) $this->CorporateIdentityNumber = $o['CorporateIdentityNumber'];
if (isset($o['InvoiceAddress1'])) $this->InvoiceAddress1 = $o['InvoiceAddress1'];
if (isset($o['InvoiceAddress2'])) $this->InvoiceAddress2 = $o['InvoiceAddress2'];
if (isset($o['InvoiceCity'])) $this->InvoiceCity = $o['InvoiceCity'];
if (isset($o['InvoicePostalCode'])) $this->InvoicePostalCode = $o['InvoicePostalCode'];
if (isset($o['InvoiceCountryCode'])) $this->InvoiceCountryCode = $o['InvoiceCountryCode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Firstname)) $o['Firstname'] = $this->Firstname;
if (isset($this->Lastname)) $o['Lastname'] = $this->Lastname;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->Phone)) $o['Phone'] = $this->Phone;
if (isset($this->FacebookUserName)) $o['FacebookUserName'] = $this->FacebookUserName;
if (isset($this->ImageUrl)) $o['ImageUrl'] = $this->ImageUrl;
if (isset($this->PersonalIdentityNumber)) $o['PersonalIdentityNumber'] = $this->PersonalIdentityNumber;
if (isset($this->CorporateIdentityNumber)) $o['CorporateIdentityNumber'] = $this->CorporateIdentityNumber;
if (isset($this->InvoiceAddress1)) $o['InvoiceAddress1'] = $this->InvoiceAddress1;
if (isset($this->InvoiceAddress2)) $o['InvoiceAddress2'] = $this->InvoiceAddress2;
if (isset($this->InvoiceCity)) $o['InvoiceCity'] = $this->InvoiceCity;
if (isset($this->InvoicePostalCode)) $o['InvoicePostalCode'] = $this->InvoicePostalCode;
if (isset($this->InvoiceCountryCode)) $o['InvoiceCountryCode'] = $this->InvoiceCountryCode;
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 */
public string $StatusName='',
/** @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,
/** @var BookedCustomer|null */
public ?BookedCustomer $Customer=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']);
if (isset($o['Customer'])) $this->Customer = JsonConverters::from('BookedCustomer', $o['Customer']);
}
/** @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);
if (isset($this->Customer)) $o['Customer'] = JsonConverters::to('BookedCustomer', $this->Customer);
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
class GetBookingUserQueue implements JsonSerializable
{
public function __construct(
/** @description Id of the booking user queue */
// @ApiMember(Description="Id of the booking user queue", IsRequired=true, ParameterType="path")
/** @var int */
public int $Id=0,
/** @description */
// @ApiMember(Description="", IsRequired=true)
/** @var string */
public string $CompanyId='',
/** @description */
// @ApiMember(Description="", IsRequired=true)
/** @var string */
public string $CustomerId='',
/** @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['Id'])) $this->Id = $o['Id'];
if (isset($o['CompanyId'])) $this->CompanyId = $o['CompanyId'];
if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
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->Id)) $o['Id'] = $this->Id;
if (isset($this->CompanyId)) $o['CompanyId'] = $this->CompanyId;
if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
if (isset($this->IncludeServiceInformation)) $o['IncludeServiceInformation'] = $this->IncludeServiceInformation;
if (isset($this->IncludeCompanyInformation)) $o['IncludeCompanyInformation'] = $this->IncludeCompanyInformation;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /bookinguserqueue/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"BookingUserQueueId":0,"ServiceId":0,"StatusCode":0,"StatusName":"String","SendConfirmationTime":"0001-01-01T00:00:00","Quantities":[{"Id":0,"BookingUserQueueId":0,"ServicePriceId":0,"Quantity":0,"Price":0,"PriceText":"String"}],"Service":{"Id":0,"Name":"String","Description":"String","LengthInMinutes":0,"MaxNumberOfSpotsPerBooking":0,"MinNumberOfSpotsPerBooking":0,"GroupBooking":{"Active":false,"Min":0,"Max":0},"MultipleResource":{"Active":false,"Min":0,"Max":0},"IsGroupBooking":false,"IsPaymentEnabled":false},"Company":{"Name":"String","SitePath":"String"},"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","FacebookUserName":"String","ImageUrl":"String","PersonalIdentityNumber":"String","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}}