Trendsic Platform Service

<back to all web services

BranchApptSlotsRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/queue/appointments/slots
<?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 BranchApptSlot implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $StartLocal=null,
        /** @var int */
        public int $Booked=0,
        /** @var int */
        public int $Capacity=0,
        /** @var int */
        public int $Open=0,
        /** @var bool|null */
        public ?bool $Full=null,
        /** @var bool|null */
        public ?bool $Past=null,
        /** @var bool|null */
        public ?bool $Fits=null,
        /** @var string|null */
        public ?string $Reason=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['StartLocal'])) $this->StartLocal = $o['StartLocal'];
        if (isset($o['Booked'])) $this->Booked = $o['Booked'];
        if (isset($o['Capacity'])) $this->Capacity = $o['Capacity'];
        if (isset($o['Open'])) $this->Open = $o['Open'];
        if (isset($o['Full'])) $this->Full = $o['Full'];
        if (isset($o['Past'])) $this->Past = $o['Past'];
        if (isset($o['Fits'])) $this->Fits = $o['Fits'];
        if (isset($o['Reason'])) $this->Reason = $o['Reason'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->StartLocal)) $o['StartLocal'] = $this->StartLocal;
        if (isset($this->Booked)) $o['Booked'] = $this->Booked;
        if (isset($this->Capacity)) $o['Capacity'] = $this->Capacity;
        if (isset($this->Open)) $o['Open'] = $this->Open;
        if (isset($this->Full)) $o['Full'] = $this->Full;
        if (isset($this->Past)) $o['Past'] = $this->Past;
        if (isset($this->Fits)) $o['Fits'] = $this->Fits;
        if (isset($this->Reason)) $o['Reason'] = $this->Reason;
        return empty($o) ? new class(){} : $o;
    }
}

class BranchApptSlotsResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var string|null */
        public ?string $Date=null,
        /** @var int */
        public int $TimeslotMinutes=0,
        /** @var int */
        public int $SlotMinutes=0,
        /** @var int */
        public int $Capacity=0,
        /** @var bool|null */
        public ?bool $OnlinePaused=null,
        /** @var array<BranchApptSlot>|null */
        public ?array $Slots=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['Date'])) $this->Date = $o['Date'];
        if (isset($o['TimeslotMinutes'])) $this->TimeslotMinutes = $o['TimeslotMinutes'];
        if (isset($o['SlotMinutes'])) $this->SlotMinutes = $o['SlotMinutes'];
        if (isset($o['Capacity'])) $this->Capacity = $o['Capacity'];
        if (isset($o['OnlinePaused'])) $this->OnlinePaused = $o['OnlinePaused'];
        if (isset($o['Slots'])) $this->Slots = JsonConverters::fromArray('BranchApptSlot', $o['Slots']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->Date)) $o['Date'] = $this->Date;
        if (isset($this->TimeslotMinutes)) $o['TimeslotMinutes'] = $this->TimeslotMinutes;
        if (isset($this->SlotMinutes)) $o['SlotMinutes'] = $this->SlotMinutes;
        if (isset($this->Capacity)) $o['Capacity'] = $this->Capacity;
        if (isset($this->OnlinePaused)) $o['OnlinePaused'] = $this->OnlinePaused;
        if (isset($this->Slots)) $o['Slots'] = JsonConverters::toArray('BranchApptSlot', $this->Slots);
        return empty($o) ? new class(){} : $o;
    }
}

class BranchApptSlotsRequest implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $LocationId='',
        /** @var string|null */
        public ?string $Date=null,
        /** @var string|null */
        public ?string $LineIds=null,
        /** @var string|null */
        public ?string $ExcludeCheckInId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
        if (isset($o['Date'])) $this->Date = $o['Date'];
        if (isset($o['LineIds'])) $this->LineIds = $o['LineIds'];
        if (isset($o['ExcludeCheckInId'])) $this->ExcludeCheckInId = $o['ExcludeCheckInId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
        if (isset($this->Date)) $o['Date'] = $this->Date;
        if (isset($this->LineIds)) $o['LineIds'] = $this->LineIds;
        if (isset($this->ExcludeCheckInId)) $o['ExcludeCheckInId'] = $this->ExcludeCheckInId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP BranchApptSlotsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/queue/appointments/slots HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Date":"String","TimeslotMinutes":0,"SlotMinutes":0,"Capacity":0,"OnlinePaused":false,"Slots":[{"StartLocal":"String","Booked":0,"Capacity":0,"Open":0,"Full":false,"Past":false,"Fits":false,"Reason":"String"}]}