| GET | /v1/forms/contacts/{ContactId} |
|---|
<?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 FormContactPanelSub implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $SubmissionUID=null,
/** @var string|null */
public ?string $Number=null,
/** @var string|null */
public ?string $FormName=null,
/** @var string|null */
public ?string $Stage=null,
/** @var string|null */
public ?string $Tone=null,
/** @var string|null */
public ?string $SubmittedAt=null,
/** @var string|null */
public ?string $BranchName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SubmissionUID'])) $this->SubmissionUID = $o['SubmissionUID'];
if (isset($o['Number'])) $this->Number = $o['Number'];
if (isset($o['FormName'])) $this->FormName = $o['FormName'];
if (isset($o['Stage'])) $this->Stage = $o['Stage'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
if (isset($o['SubmittedAt'])) $this->SubmittedAt = $o['SubmittedAt'];
if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SubmissionUID)) $o['SubmissionUID'] = $this->SubmissionUID;
if (isset($this->Number)) $o['Number'] = $this->Number;
if (isset($this->FormName)) $o['FormName'] = $this->FormName;
if (isset($this->Stage)) $o['Stage'] = $this->Stage;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
if (isset($this->SubmittedAt)) $o['SubmittedAt'] = $this->SubmittedAt;
if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
return empty($o) ? new class(){} : $o;
}
}
class FormOfficeDraftRow implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $SubmissionUID=null,
/** @var string|null */
public ?string $FormUID=null,
/** @var string|null */
public ?string $FormName=null,
/** @var string|null */
public ?string $ForName=null,
/** @var string|null */
public ?string $BranchName=null,
/** @var int|null */
public ?int $ContactId=null,
/** @var int */
public int $Page=0,
/** @var int */
public int $Pages=0,
/** @var string|null */
public ?string $SavedBy=null,
/** @var string|null */
public ?string $SavedAt=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['SubmissionUID'])) $this->SubmissionUID = $o['SubmissionUID'];
if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
if (isset($o['FormName'])) $this->FormName = $o['FormName'];
if (isset($o['ForName'])) $this->ForName = $o['ForName'];
if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['Page'])) $this->Page = $o['Page'];
if (isset($o['Pages'])) $this->Pages = $o['Pages'];
if (isset($o['SavedBy'])) $this->SavedBy = $o['SavedBy'];
if (isset($o['SavedAt'])) $this->SavedAt = $o['SavedAt'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->SubmissionUID)) $o['SubmissionUID'] = $this->SubmissionUID;
if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
if (isset($this->FormName)) $o['FormName'] = $this->FormName;
if (isset($this->ForName)) $o['ForName'] = $this->ForName;
if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->Page)) $o['Page'] = $this->Page;
if (isset($this->Pages)) $o['Pages'] = $this->Pages;
if (isset($this->SavedBy)) $o['SavedBy'] = $this->SavedBy;
if (isset($this->SavedAt)) $o['SavedAt'] = $this->SavedAt;
return empty($o) ? new class(){} : $o;
}
}
class FormOfficeApp implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $FormUID=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Noun=null,
/** @var string|null */
public ?string $DefaultBranchId=null,
/** @var bool|null */
public ?bool $IsRecord=null,
/** @var string|null */
public ?string $RoleName=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Noun'])) $this->Noun = $o['Noun'];
if (isset($o['DefaultBranchId'])) $this->DefaultBranchId = $o['DefaultBranchId'];
if (isset($o['IsRecord'])) $this->IsRecord = $o['IsRecord'];
if (isset($o['RoleName'])) $this->RoleName = $o['RoleName'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Noun)) $o['Noun'] = $this->Noun;
if (isset($this->DefaultBranchId)) $o['DefaultBranchId'] = $this->DefaultBranchId;
if (isset($this->IsRecord)) $o['IsRecord'] = $this->IsRecord;
if (isset($this->RoleName)) $o['RoleName'] = $this->RoleName;
return empty($o) ? new class(){} : $o;
}
}
class FormContactPanelResponse implements JsonSerializable
{
public function __construct(
/** @var array<FormContactPanelSub>|null */
public ?array $Subs=null,
/** @var array<FormOfficeDraftRow>|null */
public ?array $Drafts=null,
/** @var array<FormOfficeApp>|null */
public ?array $Forms=null,
/** @var bool|null */
public ?bool $CanStart=null,
/** @var string|null */
public ?string $ContactName=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Subs'])) $this->Subs = JsonConverters::fromArray('FormContactPanelSub', $o['Subs']);
if (isset($o['Drafts'])) $this->Drafts = JsonConverters::fromArray('FormOfficeDraftRow', $o['Drafts']);
if (isset($o['Forms'])) $this->Forms = JsonConverters::fromArray('FormOfficeApp', $o['Forms']);
if (isset($o['CanStart'])) $this->CanStart = $o['CanStart'];
if (isset($o['ContactName'])) $this->ContactName = $o['ContactName'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Subs)) $o['Subs'] = JsonConverters::toArray('FormContactPanelSub', $this->Subs);
if (isset($this->Drafts)) $o['Drafts'] = JsonConverters::toArray('FormOfficeDraftRow', $this->Drafts);
if (isset($this->Forms)) $o['Forms'] = JsonConverters::toArray('FormOfficeApp', $this->Forms);
if (isset($this->CanStart)) $o['CanStart'] = $this->CanStart;
if (isset($this->ContactName)) $o['ContactName'] = $this->ContactName;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormContactPanelRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ContactId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
return empty($o) ? new class(){} : $o;
}
}
PHP FormContactPanelRequest 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.
GET /v1/forms/contacts/{ContactId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormContactPanelResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanStart>false</CanStart>
<ContactName>String</ContactName>
<Drafts>
<FormOfficeDraftRow>
<BranchName>String</BranchName>
<ContactId>0</ContactId>
<ForName>String</ForName>
<FormName>String</FormName>
<FormUID>String</FormUID>
<Page>0</Page>
<Pages>0</Pages>
<SavedAt>String</SavedAt>
<SavedBy>String</SavedBy>
<SubmissionUID>String</SubmissionUID>
</FormOfficeDraftRow>
</Drafts>
<Forms>
<FormOfficeApp>
<DefaultBranchId>String</DefaultBranchId>
<FormUID>String</FormUID>
<IsRecord>false</IsRecord>
<Name>String</Name>
<Noun>String</Noun>
<RoleName>String</RoleName>
</FormOfficeApp>
</Forms>
<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>
<Subs>
<FormContactPanelSub>
<BranchName>String</BranchName>
<FormName>String</FormName>
<Number>String</Number>
<Stage>String</Stage>
<SubmissionUID>String</SubmissionUID>
<SubmittedAt>String</SubmittedAt>
<Tone>String</Tone>
</FormContactPanelSub>
</Subs>
</FormContactPanelResponse>