| 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 .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
Content-Length: length
{"BranchId":"00000000000000000000000000000000","FormUID":"00000000000000000000000000000000","Show":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"BranchName":"String","Apps":[{"FormUID":"String","Name":"String","Noun":"String","Shown":false,"Offered":false}],"NotOffered":0,"Branches":[{"BranchId":"String","Name":"String"}],"Count":0,"Sentence":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}