| POST | /v1/onboarding/dismiss |
|---|
<?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 OnboardingStep implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Key=null,
/** @var string|null */
public ?string $Chapter=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Why=null,
/** @var string|null */
public ?string $HelpHtml=null,
/** @var string|null */
public ?string $IconHtml=null,
/** @var string|null */
public ?string $CtaLabel=null,
/** @var string|null */
public ?string $CtaRoute=null,
/** @var bool|null */
public ?bool $Required=null,
/** @var int */
public int $State=0,
/** @var bool|null */
public ?bool $Done=null,
/** @var bool|null */
public ?bool $AutoDetected=null,
/** @var int */
public int $Count=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Key'])) $this->Key = $o['Key'];
if (isset($o['Chapter'])) $this->Chapter = $o['Chapter'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Why'])) $this->Why = $o['Why'];
if (isset($o['HelpHtml'])) $this->HelpHtml = $o['HelpHtml'];
if (isset($o['IconHtml'])) $this->IconHtml = $o['IconHtml'];
if (isset($o['CtaLabel'])) $this->CtaLabel = $o['CtaLabel'];
if (isset($o['CtaRoute'])) $this->CtaRoute = $o['CtaRoute'];
if (isset($o['Required'])) $this->Required = $o['Required'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['Done'])) $this->Done = $o['Done'];
if (isset($o['AutoDetected'])) $this->AutoDetected = $o['AutoDetected'];
if (isset($o['Count'])) $this->Count = $o['Count'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Key)) $o['Key'] = $this->Key;
if (isset($this->Chapter)) $o['Chapter'] = $this->Chapter;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Why)) $o['Why'] = $this->Why;
if (isset($this->HelpHtml)) $o['HelpHtml'] = $this->HelpHtml;
if (isset($this->IconHtml)) $o['IconHtml'] = $this->IconHtml;
if (isset($this->CtaLabel)) $o['CtaLabel'] = $this->CtaLabel;
if (isset($this->CtaRoute)) $o['CtaRoute'] = $this->CtaRoute;
if (isset($this->Required)) $o['Required'] = $this->Required;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->Done)) $o['Done'] = $this->Done;
if (isset($this->AutoDetected)) $o['AutoDetected'] = $this->AutoDetected;
if (isset($this->Count)) $o['Count'] = $this->Count;
return empty($o) ? new class(){} : $o;
}
}
class OnboardingStatus implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $TenantName=null,
/** @var string|null */
public ?string $PropertyTerm=null,
/** @var array<OnboardingStep>|null */
public ?array $Steps=null,
/** @var int */
public int $TotalSteps=0,
/** @var int */
public int $DoneSteps=0,
/** @var int */
public int $RequiredTotal=0,
/** @var int */
public int $RequiredDone=0,
/** @var int */
public int $PercentComplete=0,
/** @var bool|null */
public ?bool $IsComplete=null,
/** @var bool|null */
public ?bool $Dismissed=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TenantName'])) $this->TenantName = $o['TenantName'];
if (isset($o['PropertyTerm'])) $this->PropertyTerm = $o['PropertyTerm'];
if (isset($o['Steps'])) $this->Steps = JsonConverters::fromArray('OnboardingStep', $o['Steps']);
if (isset($o['TotalSteps'])) $this->TotalSteps = $o['TotalSteps'];
if (isset($o['DoneSteps'])) $this->DoneSteps = $o['DoneSteps'];
if (isset($o['RequiredTotal'])) $this->RequiredTotal = $o['RequiredTotal'];
if (isset($o['RequiredDone'])) $this->RequiredDone = $o['RequiredDone'];
if (isset($o['PercentComplete'])) $this->PercentComplete = $o['PercentComplete'];
if (isset($o['IsComplete'])) $this->IsComplete = $o['IsComplete'];
if (isset($o['Dismissed'])) $this->Dismissed = $o['Dismissed'];
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TenantName)) $o['TenantName'] = $this->TenantName;
if (isset($this->PropertyTerm)) $o['PropertyTerm'] = $this->PropertyTerm;
if (isset($this->Steps)) $o['Steps'] = JsonConverters::toArray('OnboardingStep', $this->Steps);
if (isset($this->TotalSteps)) $o['TotalSteps'] = $this->TotalSteps;
if (isset($this->DoneSteps)) $o['DoneSteps'] = $this->DoneSteps;
if (isset($this->RequiredTotal)) $o['RequiredTotal'] = $this->RequiredTotal;
if (isset($this->RequiredDone)) $o['RequiredDone'] = $this->RequiredDone;
if (isset($this->PercentComplete)) $o['PercentComplete'] = $this->PercentComplete;
if (isset($this->IsComplete)) $o['IsComplete'] = $this->IsComplete;
if (isset($this->Dismissed)) $o['Dismissed'] = $this->Dismissed;
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class DismissOnboardingRequest implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $Dismissed=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Dismissed'])) $this->Dismissed = $o['Dismissed'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Dismissed)) $o['Dismissed'] = $this->Dismissed;
return empty($o) ? new class(){} : $o;
}
}
PHP DismissOnboardingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/onboarding/dismiss HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Dismissed":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"TenantName":"String","PropertyTerm":"String","Steps":[{"Key":"String","Chapter":"String","Title":"String","Why":"String","HelpHtml":"String","IconHtml":"String","CtaLabel":"String","CtaRoute":"String","Required":false,"State":0,"Done":false,"AutoDetected":false,"Count":0}],"TotalSteps":0,"DoneSteps":0,"RequiredTotal":0,"RequiredDone":0,"PercentComplete":0,"IsComplete":false,"Dismissed":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}