| POST | /v1/forms/submissions/{SubmissionUID}/request-info/preview |
|---|
<?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 FormRequestItem implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $K=null,
/** @var string|null */
public ?string $L=null,
/** @var string|null */
public ?string $Tag=null,
/** @var string|null */
public ?string $Tone=null,
/** @var bool|null */
public ?bool $Pre=null,
/** @var bool|null */
public ?bool $IsSignature=null,
/** @var bool|null */
public ?bool $IsSensitive=null,
/** @var int */
public int $Pi=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['K'])) $this->K = $o['K'];
if (isset($o['L'])) $this->L = $o['L'];
if (isset($o['Tag'])) $this->Tag = $o['Tag'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['Pre'])) $this->Pre = $o['Pre'];
if (isset($o['IsSignature'])) $this->IsSignature = $o['IsSignature'];
if (isset($o['IsSensitive'])) $this->IsSensitive = $o['IsSensitive'];
if (isset($o['Pi'])) $this->Pi = $o['Pi'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->K)) $o['K'] = $this->K;
if (isset($this->L)) $o['L'] = $this->L;
if (isset($this->Tag)) $o['Tag'] = $this->Tag;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->Pre)) $o['Pre'] = $this->Pre;
if (isset($this->IsSignature)) $o['IsSignature'] = $this->IsSignature;
if (isset($this->IsSensitive)) $o['IsSensitive'] = $this->IsSensitive;
if (isset($this->Pi)) $o['Pi'] = $this->Pi;
return empty($o) ? new class(){} : $o;
}
}
class FormRequestPlan implements JsonSerializable
{
public function __construct(
/** @var array<FormRequestItem>|null */
public ?array $Items=null,
/** @var array<string>|null */
public ?array $Keys=null,
/** @var array<string>|null */
public ?array $Resign=null,
/** @var array<string>|null */
public ?array $ResignKeys=null,
/** @var string|null */
public ?string $Channels=null,
/** @var string|null */
public ?string $StageLabel=null,
/** @var string|null */
public ?string $Consequence=null,
/** @var string|null */
public ?string $Applicant=null,
/** @var string|null */
public ?string $Stage=null,
/** @var bool|null */
public ?bool $CanSend=null,
/** @var string|null */
public ?string $Refusal=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('FormRequestItem', $o['Items']);
if (isset($o['Keys'])) $this->Keys = JsonConverters::fromArray('string', $o['Keys']);
if (isset($o['Resign'])) $this->Resign = JsonConverters::fromArray('string', $o['Resign']);
if (isset($o['ResignKeys'])) $this->ResignKeys = JsonConverters::fromArray('string', $o['ResignKeys']);
if (isset($o['Channels'])) $this->Channels = $o['Channels'];
if (isset($o['StageLabel'])) $this->StageLabel = $o['StageLabel'];
if (isset($o['Consequence'])) $this->Consequence = $o['Consequence'];
if (isset($o['Applicant'])) $this->Applicant = $o['Applicant'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['CanSend'])) $this->CanSend = $o['CanSend'];
if (isset($o['Refusal'])) $this->Refusal = $o['Refusal'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('FormRequestItem', $this->Items);
if (isset($this->Keys)) $o['Keys'] = JsonConverters::toArray('string', $this->Keys);
if (isset($this->Resign)) $o['Resign'] = JsonConverters::toArray('string', $this->Resign);
if (isset($this->ResignKeys)) $o['ResignKeys'] = JsonConverters::toArray('string', $this->ResignKeys);
if (isset($this->Channels)) $o['Channels'] = $this->Channels;
if (isset($this->StageLabel)) $o['StageLabel'] = $this->StageLabel;
if (isset($this->Consequence)) $o['Consequence'] = $this->Consequence;
if (isset($this->Applicant)) $o['Applicant'] = $this->Applicant;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->CanSend)) $o['CanSend'] = $this->CanSend;
if (isset($this->Refusal)) $o['Refusal'] = $this->Refusal;
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionRequestPreviewResponse implements JsonSerializable
{
public function __construct(
/** @var FormRequestPlan|null */
public ?FormRequestPlan $Plan=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Plan'])) $this->Plan = JsonConverters::from('FormRequestPlan', $o['Plan']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Plan)) $o['Plan'] = JsonConverters::to('FormRequestPlan', $this->Plan);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormSubmissionRequestPreviewRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $SubmissionUID='',
/** @var array<string>|null */
public ?array $Keys=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SubmissionUID'])) $this->SubmissionUID = $o['SubmissionUID'];
if (isset($o['Keys'])) $this->Keys = JsonConverters::fromArray('string', $o['Keys']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SubmissionUID)) $o['SubmissionUID'] = $this->SubmissionUID;
if (isset($this->Keys)) $o['Keys'] = JsonConverters::toArray('string', $this->Keys);
return empty($o) ? new class(){} : $o;
}
}
PHP FormSubmissionRequestPreviewRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/submissions/{SubmissionUID}/request-info/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"SubmissionUID":"00000000000000000000000000000000","Keys":["String"]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Plan":{"Items":[{"K":"String","L":"String","Tag":"String","Tone":"String","Pre":false,"IsSignature":false,"IsSensitive":false,"Pi":0}],"Keys":["String"],"Resign":["String"],"ResignKeys":["String"],"Channels":"String","StageLabel":"String","Consequence":"String","Applicant":"String","Stage":"String","CanSend":false,"Refusal":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}