| PUT | /v1/forms/kiosk-branches/{BranchId} |
|---|
<?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 FormKioskBranchApp 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 bool|null */
public ?bool $Shown=null,
/** @var bool|null */
public ?bool $Offered=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['Shown'])) $this->Shown = $o['Shown'];
if (isset($o['Offered'])) $this->Offered = $o['Offered'];
}
/** @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->Shown)) $o['Shown'] = $this->Shown;
if (isset($this->Offered)) $o['Offered'] = $this->Offered;
return empty($o) ? new class(){} : $o;
}
}
class FormKioskBranchName implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $BranchId=null,
/** @var string|null */
public ?string $Name=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
if (isset($this->Name)) $o['Name'] = $this->Name;
return empty($o) ? new class(){} : $o;
}
}
class FormKioskBranchesResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $BranchName=null,
/** @var array<FormKioskBranchApp>|null */
public ?array $Apps=null,
/** @var int */
public int $NotOffered=0,
/** @var array<FormKioskBranchName>|null */
public ?array $Branches=null,
/** @var int */
public int $Count=0,
/** @var string|null */
public ?string $Sentence=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
if (isset($o['Apps'])) $this->Apps = JsonConverters::fromArray('FormKioskBranchApp', $o['Apps']);
if (isset($o['NotOffered'])) $this->NotOffered = $o['NotOffered'];
if (isset($o['Branches'])) $this->Branches = JsonConverters::fromArray('FormKioskBranchName', $o['Branches']);
if (isset($o['Count'])) $this->Count = $o['Count'];
if (isset($o['Sentence'])) $this->Sentence = $o['Sentence'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
if (isset($this->Apps)) $o['Apps'] = JsonConverters::toArray('FormKioskBranchApp', $this->Apps);
if (isset($this->NotOffered)) $o['NotOffered'] = $this->NotOffered;
if (isset($this->Branches)) $o['Branches'] = JsonConverters::toArray('FormKioskBranchName', $this->Branches);
if (isset($this->Count)) $o['Count'] = $this->Count;
if (isset($this->Sentence)) $o['Sentence'] = $this->Sentence;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class FormKioskBranchSetRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $BranchId='',
/** @var string */
public string $FormUID='',
/** @var bool|null */
public ?bool $Show=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
if (isset($o['FormUID'])) $this->FormUID = $o['FormUID'];
if (isset($o['Show'])) $this->Show = $o['Show'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
if (isset($this->FormUID)) $o['FormUID'] = $this->FormUID;
if (isset($this->Show)) $o['Show'] = $this->Show;
return empty($o) ? new class(){} : $o;
}
}
PHP FormKioskBranchSetRequest 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.
PUT /v1/forms/kiosk-branches/{BranchId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormKioskBranchSetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<BranchId>00000000-0000-0000-0000-000000000000</BranchId>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<Show>false</Show>
</FormKioskBranchSetRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormKioskBranchesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Apps>
<FormKioskBranchApp>
<FormUID>String</FormUID>
<Name>String</Name>
<Noun>String</Noun>
<Offered>false</Offered>
<Shown>false</Shown>
</FormKioskBranchApp>
</Apps>
<BranchName>String</BranchName>
<Branches>
<FormKioskBranchName>
<BranchId>String</BranchId>
<Name>String</Name>
</FormKioskBranchName>
</Branches>
<Count>0</Count>
<NotOffered>0</NotOffered>
<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>
<Sentence>String</Sentence>
</FormKioskBranchesResponse>