| 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 .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/onboarding/dismiss HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DismissOnboardingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Dismissed>false</Dismissed>
</DismissOnboardingRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<OnboardingStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Dismissed>false</Dismissed>
<DoneSteps>0</DoneSteps>
<IsComplete>false</IsComplete>
<PercentComplete>0</PercentComplete>
<PropertyTerm>String</PropertyTerm>
<RequiredDone>0</RequiredDone>
<RequiredTotal>0</RequiredTotal>
<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>
<Steps>
<OnboardingStep>
<AutoDetected>false</AutoDetected>
<Chapter>String</Chapter>
<Count>0</Count>
<CtaLabel>String</CtaLabel>
<CtaRoute>String</CtaRoute>
<Done>false</Done>
<HelpHtml>String</HelpHtml>
<IconHtml>String</IconHtml>
<Key>String</Key>
<Required>false</Required>
<State>0</State>
<Title>String</Title>
<Why>String</Why>
</OnboardingStep>
</Steps>
<TenantName>String</TenantName>
<TotalSteps>0</TotalSteps>
</OnboardingStatus>