| GET | /v1/forms/go-sent |
|---|
<?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 FormGoSentRow implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Position=null,
/** @var string|null */
public ?string $FirstSentAt=null,
/** @var string|null */
public ?string $FirstSentBy=null,
/** @var string|null */
public ?string $LastSentAt=null,
/** @var string|null */
public ?string $LastSentBy=null,
/** @var int */
public int $Times=0,
/** @var string|null */
public ?string $How=null,
/** @var string|null */
public ?string $Went=null,
/** @var string|null */
public ?string $Where=null,
/** @var bool|null */
public ?bool $CanRemove=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['Position'])) $this->Position = $o['Position'];
if (isset($o['FirstSentAt'])) $this->FirstSentAt = $o['FirstSentAt'];
if (isset($o['FirstSentBy'])) $this->FirstSentBy = $o['FirstSentBy'];
if (isset($o['LastSentAt'])) $this->LastSentAt = $o['LastSentAt'];
if (isset($o['LastSentBy'])) $this->LastSentBy = $o['LastSentBy'];
if (isset($o['Times'])) $this->Times = $o['Times'];
if (isset($o['How'])) $this->How = $o['How'];
if (isset($o['Went'])) $this->Went = $o['Went'];
if (isset($o['Where'])) $this->Where = $o['Where'];
if (isset($o['CanRemove'])) $this->CanRemove = $o['CanRemove'];
}
/** @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->Position)) $o['Position'] = $this->Position;
if (isset($this->FirstSentAt)) $o['FirstSentAt'] = $this->FirstSentAt;
if (isset($this->FirstSentBy)) $o['FirstSentBy'] = $this->FirstSentBy;
if (isset($this->LastSentAt)) $o['LastSentAt'] = $this->LastSentAt;
if (isset($this->LastSentBy)) $o['LastSentBy'] = $this->LastSentBy;
if (isset($this->Times)) $o['Times'] = $this->Times;
if (isset($this->How)) $o['How'] = $this->How;
if (isset($this->Went)) $o['Went'] = $this->Went;
if (isset($this->Where)) $o['Where'] = $this->Where;
if (isset($this->CanRemove)) $o['CanRemove'] = $this->CanRemove;
return empty($o) ? new class(){} : $o;
}
}
class FormGoSentResponse implements JsonSerializable
{
public function __construct(
/** @var array<FormGoSentRow>|null */
public ?array $Rows=null,
/** @var string|null */
public ?string $Message=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Rows'])) $this->Rows = JsonConverters::fromArray('FormGoSentRow', $o['Rows']);
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Rows)) $o['Rows'] = JsonConverters::toArray('FormGoSentRow', $this->Rows);
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormGoSentRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $FormUID=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/forms/go-sent HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Rows":[{"Id":0,"Name":"String","Position":"String","FirstSentAt":"String","FirstSentBy":"String","LastSentAt":"String","LastSentBy":"String","Times":0,"How":"String","Went":"String","Where":"String","CanRemove":false}],"Message":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}