| Requires any of the roles: | Agent, Administrator |
| 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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BranchApptSlotsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Capacity>0</Capacity>
<Date>String</Date>
<OnlinePaused>false</OnlinePaused>
<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>
<SlotMinutes>0</SlotMinutes>
<Slots>
<BranchApptSlot>
<Booked>0</Booked>
<Capacity>0</Capacity>
<Fits>false</Fits>
<Full>false</Full>
<Open>0</Open>
<Past>false</Past>
<Reason>String</Reason>
<StartLocal>String</StartLocal>
</BranchApptSlot>
</Slots>
<TimeslotMinutes>0</TimeslotMinutes>
</BranchApptSlotsResponse>