| GET | /v1/formfill/appt/{Token} |
|---|
<?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 FormFillApptResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $FormName=null,
/** @var string|null */
public ?string $Message=null,
/** @var string|null */
public ?string $StatusUrl=null,
/** @var bool|null */
public ?bool $More=null,
/** @var string|null */
public ?string $Token=null,
/** @var string|null */
public ?string $AppJson=null,
/** @var string|null */
public ?string $TenantName=null,
/** @var string|null */
public ?string $Today=null,
/** @var string|null */
public ?string $AnswersJson=null,
/** @var int */
public int $Page=0,
/** @var int */
public int $Rev=0,
/** @var string|null */
public ?string $Lang=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['FormName'])) $this->FormName = $o['FormName'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['StatusUrl'])) $this->StatusUrl = $o['StatusUrl'];
if (isset($o['More'])) $this->More = $o['More'];
if (isset($o['Token'])) $this->Token = $o['Token'];
if (isset($o['AppJson'])) $this->AppJson = $o['AppJson'];
if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
if (isset($o['Today'])) $this->Today = $o['Today'];
if (isset($o['AnswersJson'])) $this->AnswersJson = $o['AnswersJson'];
if (isset($o['Page'])) $this->Page = $o['Page'];
if (isset($o['Rev'])) $this->Rev = $o['Rev'];
if (isset($o['Lang'])) $this->Lang = $o['Lang'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->FormName)) $o['FormName'] = $this->FormName;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->StatusUrl)) $o['StatusUrl'] = $this->StatusUrl;
if (isset($this->More)) $o['More'] = $this->More;
if (isset($this->Token)) $o['Token'] = $this->Token;
if (isset($this->AppJson)) $o['AppJson'] = $this->AppJson;
if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
if (isset($this->Today)) $o['Today'] = $this->Today;
if (isset($this->AnswersJson)) $o['AnswersJson'] = $this->AnswersJson;
if (isset($this->Page)) $o['Page'] = $this->Page;
if (isset($this->Rev)) $o['Rev'] = $this->Rev;
if (isset($this->Lang)) $o['Lang'] = $this->Lang;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormFillApptRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Token=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Token'])) $this->Token = $o['Token'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Token)) $o['Token'] = $this->Token;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/formfill/appt/{Token} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
State: String,
FormName: String,
Message: String,
StatusUrl: String,
More: False,
Token: String,
AppJson: String,
TenantName: String,
Today: String,
AnswersJson: String,
Page: 0,
Rev: 0,
Lang: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}