| POST | /v1/formfill/status/{Token}/withdraw |
|---|
<?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 FormFillStage implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Id=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Tone=null,
/** @var string|null */
public ?string $Kind=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
return empty($o) ? new class(){} : $o;
}
}
class FormFillStageSeen implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Id=null,
/** @var DateTime */
public DateTime $At=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['At'])) $this->At = JsonConverters::from('DateTime', $o['At']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->At)) $o['At'] = JsonConverters::to('DateTime', $this->At);
return empty($o) ? new class(){} : $o;
}
}
class FormFillReceiptLine implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Channel=null,
/** @var string|null */
public ?string $To=null,
/** @var string|null */
public ?string $Outcome=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Channel'])) $this->Channel = $o['Channel'];
if (isset($o['To'])) $this->To = $o['To'];
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Channel)) $o['Channel'] = $this->Channel;
if (isset($this->To)) $o['To'] = $this->To;
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
return empty($o) ? new class(){} : $o;
}
}
class FormFillStatusResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Number=null,
/** @var string|null */
public ?string $FormName=null,
/** @var string|null */
public ?string $Noun=null,
/** @var string|null */
public ?string $TenantName=null,
/** @var string|null */
public ?string $Stage=null,
/** @var string|null */
public ?string $StageKind=null,
/** @var array<FormFillStage>|null */
public ?array $Stages=null,
/** @var array<FormFillStageSeen>|null */
public ?array $Seen=null,
/** @var DateTime|null */
public ?DateTime $SubmittedAt=null,
/** @var array<FormFillReceiptLine>|null */
public ?array $Receipt=null,
/** @var bool|null */
public ?bool $CanWithdraw=null,
/** @var string|null */
public ?string $Lang=null,
/** @var string|null */
public ?string $NounEs=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Number'])) $this->Number = $o['Number'];
if (isset($o['FormName'])) $this->FormName = $o['FormName'];
if (isset($o['Noun'])) $this->Noun = $o['Noun'];
if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['StageKind'])) $this->StageKind = $o['StageKind'];
if (isset($o['Stages'])) $this->Stages = JsonConverters::fromArray('FormFillStage', $o['Stages']);
if (isset($o['Seen'])) $this->Seen = JsonConverters::fromArray('FormFillStageSeen', $o['Seen']);
if (isset($o['SubmittedAt'])) $this->SubmittedAt = JsonConverters::from('DateTime', $o['SubmittedAt']);
if (isset($o['Receipt'])) $this->Receipt = JsonConverters::fromArray('FormFillReceiptLine', $o['Receipt']);
if (isset($o['CanWithdraw'])) $this->CanWithdraw = $o['CanWithdraw'];
if (isset($o['Lang'])) $this->Lang = $o['Lang'];
if (isset($o['NounEs'])) $this->NounEs = $o['NounEs'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Number)) $o['Number'] = $this->Number;
if (isset($this->FormName)) $o['FormName'] = $this->FormName;
if (isset($this->Noun)) $o['Noun'] = $this->Noun;
if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->StageKind)) $o['StageKind'] = $this->StageKind;
if (isset($this->Stages)) $o['Stages'] = JsonConverters::toArray('FormFillStage', $this->Stages);
if (isset($this->Seen)) $o['Seen'] = JsonConverters::toArray('FormFillStageSeen', $this->Seen);
if (isset($this->SubmittedAt)) $o['SubmittedAt'] = JsonConverters::to('DateTime', $this->SubmittedAt);
if (isset($this->Receipt)) $o['Receipt'] = JsonConverters::toArray('FormFillReceiptLine', $this->Receipt);
if (isset($this->CanWithdraw)) $o['CanWithdraw'] = $this->CanWithdraw;
if (isset($this->Lang)) $o['Lang'] = $this->Lang;
if (isset($this->NounEs)) $o['NounEs'] = $this->NounEs;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormFillWithdrawRequest 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;
}
}
PHP FormFillWithdrawRequest 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.
POST /v1/formfill/status/{Token}/withdraw HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormFillWithdrawRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Token>String</Token>
</FormFillWithdrawRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormFillStatusResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanWithdraw>false</CanWithdraw>
<FormName>String</FormName>
<Lang>String</Lang>
<Noun>String</Noun>
<NounEs>String</NounEs>
<Number>String</Number>
<Receipt>
<FormFillReceiptLine>
<Channel>String</Channel>
<Outcome>String</Outcome>
<To>String</To>
</FormFillReceiptLine>
</Receipt>
<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>
<Seen>
<FormFillStageSeen>
<At>0001-01-01T00:00:00</At>
<Id>String</Id>
</FormFillStageSeen>
</Seen>
<Stage>String</Stage>
<StageKind>String</StageKind>
<Stages>
<FormFillStage>
<Id>String</Id>
<Kind>String</Kind>
<Label>String</Label>
<Tone>String</Tone>
</FormFillStage>
</Stages>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<TenantName>String</TenantName>
</FormFillStatusResponse>