| GET | /v1/CustomersInLine/{LocationId} | ||
|---|---|---|---|
| GET | /v1/CustomersInLine |
<?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 CustomerInLineObject implements JsonSerializable
{
public function __construct(
/** @var string */
public string $Id='',
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $FullName=null,
/** @var DateTime */
public DateTime $SignInTime=new DateTime(),
/** @var DateTime */
public DateTime $AdjustedSignInTime=new DateTime(),
/** @var int */
public int $Status=0,
/** @var int */
public int $TaskTime=0,
/** @var bool|null */
public ?bool $Completed=null,
/** @var bool|null */
public ?bool $SendReminders=null,
/** @var DateTime */
public DateTime $CompletedTime=new DateTime(),
/** @var string */
public string $EmployeeId='',
/** @var string|null */
public ?string $Employee=null,
/** @var string|null */
public ?string $Line=null,
/** @var string|null */
public ?string $Description=null,
/** @var string */
public string $ServiceId='',
/** @var string */
public string $StationId='',
/** @var string|null */
public ?string $StationName=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['FullName'])) $this->FullName = $o['FullName'];
if (isset($o['SignInTime'])) $this->SignInTime = JsonConverters::from('DateTime', $o['SignInTime']);
if (isset($o['AdjustedSignInTime'])) $this->AdjustedSignInTime = JsonConverters::from('DateTime', $o['AdjustedSignInTime']);
if (isset($o['Status'])) $this->Status = $o['Status'];
if (isset($o['TaskTime'])) $this->TaskTime = $o['TaskTime'];
if (isset($o['Completed'])) $this->Completed = $o['Completed'];
if (isset($o['SendReminders'])) $this->SendReminders = $o['SendReminders'];
if (isset($o['CompletedTime'])) $this->CompletedTime = JsonConverters::from('DateTime', $o['CompletedTime']);
if (isset($o['EmployeeId'])) $this->EmployeeId = $o['EmployeeId'];
if (isset($o['Employee'])) $this->Employee = $o['Employee'];
if (isset($o['Line'])) $this->Line = $o['Line'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['ServiceId'])) $this->ServiceId = $o['ServiceId'];
if (isset($o['StationId'])) $this->StationId = $o['StationId'];
if (isset($o['StationName'])) $this->StationName = $o['StationName'];
}
/** @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->FullName)) $o['FullName'] = $this->FullName;
if (isset($this->SignInTime)) $o['SignInTime'] = JsonConverters::to('DateTime', $this->SignInTime);
if (isset($this->AdjustedSignInTime)) $o['AdjustedSignInTime'] = JsonConverters::to('DateTime', $this->AdjustedSignInTime);
if (isset($this->Status)) $o['Status'] = $this->Status;
if (isset($this->TaskTime)) $o['TaskTime'] = $this->TaskTime;
if (isset($this->Completed)) $o['Completed'] = $this->Completed;
if (isset($this->SendReminders)) $o['SendReminders'] = $this->SendReminders;
if (isset($this->CompletedTime)) $o['CompletedTime'] = JsonConverters::to('DateTime', $this->CompletedTime);
if (isset($this->EmployeeId)) $o['EmployeeId'] = $this->EmployeeId;
if (isset($this->Employee)) $o['Employee'] = $this->Employee;
if (isset($this->Line)) $o['Line'] = $this->Line;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->ServiceId)) $o['ServiceId'] = $this->ServiceId;
if (isset($this->StationId)) $o['StationId'] = $this->StationId;
if (isset($this->StationName)) $o['StationName'] = $this->StationName;
return empty($o) ? new class(){} : $o;
}
}
class CustomersInLineResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<CustomerInLineObject>|null */
public ?array $Customers=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Customers'])) $this->Customers = JsonConverters::fromArray('CustomerInLineObject', $o['Customers']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Customers)) $o['Customers'] = JsonConverters::toArray('CustomerInLineObject', $this->Customers);
return empty($o) ? new class(){} : $o;
}
}
class CustomersInLine implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ApiKey='',
/** @var string */
public string $LocationId='',
/** @var bool|null */
public ?bool $clientIsLoading=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ApiKey'])) $this->ApiKey = $o['ApiKey'];
if (isset($o['LocationId'])) $this->LocationId = $o['LocationId'];
if (isset($o['clientIsLoading'])) $this->clientIsLoading = $o['clientIsLoading'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ApiKey)) $o['ApiKey'] = $this->ApiKey;
if (isset($this->LocationId)) $o['LocationId'] = $this->LocationId;
if (isset($this->clientIsLoading)) $o['clientIsLoading'] = $this->clientIsLoading;
return empty($o) ? new class(){} : $o;
}
}
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/CustomersInLine/{LocationId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CustomersInLineResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Customers>
<CustomerInLineObject>
<AdjustedSignInTime>0001-01-01T00:00:00</AdjustedSignInTime>
<Completed>false</Completed>
<CompletedTime>0001-01-01T00:00:00</CompletedTime>
<Description>String</Description>
<Employee>String</Employee>
<EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
<FullName>String</FullName>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Line>String</Line>
<Name>String</Name>
<SendReminders>false</SendReminders>
<ServiceId>00000000-0000-0000-0000-000000000000</ServiceId>
<SignInTime>0001-01-01T00:00:00</SignInTime>
<StationId>00000000-0000-0000-0000-000000000000</StationId>
<StationName>String</StationName>
<Status>0</Status>
<TaskTime>0</TaskTime>
</CustomerInLineObject>
</Customers>
<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>
</CustomersInLineResponse>