BokaMera.API.Host

<back to all web services

GetAllBookingQueueForUser

Requires Authentication
The following routes are available for this service:
GET/bookinguserqueue/userGet all (future) 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};


// @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,

        /** @description Optional start date for the search interval. If not set it will default to todays date. */
        // @ApiMember(DataType="dateTime", Description="Optional start date for the search interval. If not set it will default to todays date.", ParameterType="query")
        /** @var DateTime|null */
        public ?DateTime $DateStart=null,

        /** @description Optional end date for the search interval. If not set all future queue items will be returned. */
        // @ApiMember(DataType="dateTime", Description="Optional end date for the search interval. If not set all future queue items will be returned.", ParameterType="query")
        /** @var DateTime|null */
        public ?DateTime $DateEnd=null,

        /** @description Set to true if you want to include the queue items for the company you are logged in as administrator on, if false only queue items for the logged in user will be retrieved. Only administrators are allowed to do this. */
        // @ApiMember(DataType="boolean", Description="Set to true if you want to include the queue items for the company you are logged in as administrator on, if false only queue items for the logged in user will be retrieved. Only administrators are allowed to do this.", ParameterType="query")
        /** @var bool|null */
        public ?bool $CompanyQueueItems=null,

        /** @description Optional filter for a specific service id. */
        // @ApiMember(DataType="int", Description="Optional filter for a specific service id.", ParameterType="query")
        /** @var int|null */
        public ?int $ServiceId=null,

        /** @description Optional filter for a specific customer id. */
        // @ApiMember(DataType="Guid", Description="Optional filter for a specific customer id.", ParameterType="query")
        /** @var string|null */
        public ?string $CustomerId=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,

        /** @description If you want to include the customer information for the booking */
        // @ApiMember(DataType="boolean", Description="If you want to include the customer information for the booking", ParameterType="query")
        /** @var bool|null */
        public ?bool $IncludeCustomerInformation=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['CompanyQueueItems'])) $this->CompanyQueueItems = $o['CompanyQueueItems'];
        if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
        if (isset($o['CustomerId'])) $this->CustomerId = $o['CustomerId'];
        if (isset($o['IncludeServiceInformation'])) $this->IncludeServiceInformation = $o['IncludeServiceInformation'];
        if (isset($o['IncludeCompanyInformation'])) $this->IncludeCompanyInformation = $o['IncludeCompanyInformation'];
        if (isset($o['IncludeCustomerInformation'])) $this->IncludeCustomerInformation = $o['IncludeCustomerInformation'];
    }
    
    /** @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->CompanyQueueItems)) $o['CompanyQueueItems'] = $this->CompanyQueueItems;
        if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
        if (isset($this->CustomerId)) $o['CustomerId'] = $this->CustomerId;
        if (isset($this->IncludeServiceInformation)) $o['IncludeServiceInformation'] = $this->IncludeServiceInformation;
        if (isset($this->IncludeCompanyInformation)) $o['IncludeCompanyInformation'] = $this->IncludeCompanyInformation;
        if (isset($this->IncludeCustomerInformation)) $o['IncludeCustomerInformation'] = $this->IncludeCustomerInformation;
        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

HTTP + 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: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ArrayOfBookingUserQueueItemResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookingUserQueueItemResponse>
    <BookingUserQueueId>0</BookingUserQueueId>
    <Company>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <LogoType i:nil="true" />
      <Name>String</Name>
      <SitePath>String</SitePath>
    </Company>
    <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
    <Customer>
      <CorporateIdentityNumber>String</CorporateIdentityNumber>
      <Email>String</Email>
      <FacebookUserName>String</FacebookUserName>
      <Firstname>String</Firstname>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <ImageUrl>String</ImageUrl>
      <InvoiceAddress1>String</InvoiceAddress1>
      <InvoiceAddress2>String</InvoiceAddress2>
      <InvoiceCity>String</InvoiceCity>
      <InvoiceCountryCode>String</InvoiceCountryCode>
      <InvoicePostalCode>String</InvoicePostalCode>
      <Lastname>String</Lastname>
      <PersonalIdentityNumber>String</PersonalIdentityNumber>
      <Phone>String</Phone>
    </Customer>
    <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>
        <Price>0</Price>
        <PriceText>String</PriceText>
        <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>
</ArrayOfBookingUserQueueItemResponse>