| GET,OPTIONS | /v1/coverage/board |
|---|
<?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 CoverageSelfMatrixRow implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Note=null,
/** @var string|null */
public ?string $Tone=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Note'])) $this->Note = $o['Note'];
if (isset($o['Tone'])) $this->Tone = $o['Tone'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Note)) $o['Note'] = $this->Note;
if (isset($this->Tone)) $o['Tone'] = $this->Tone;
return empty($o) ? new class(){} : $o;
}
}
class CoverageBoardShift implements JsonSerializable
{
public function __construct(
/** @var int */
public int $CoverageGapId=0,
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $Day=null,
/** @var string|null */
public ?string $Window=null,
/** @var string|null */
public ?string $Site=null,
/** @var string|null */
public ?string $Role=null,
/** @var string|null */
public ?string $Poster=null,
/** @var string|null */
public ?string $ExpiryLabel=null,
/** @var bool|null */
public ?bool $ExpiresSoon=null,
/** @var int */
public int $EligibleCount=0,
/** @var int */
public int $IneligibleCount=0,
/** @var int */
public int $OfferedCount=0,
/** @var int */
public int $ClaimsCount=0,
/** @var string|null */
public ?string $ClaimantName=null,
/** @var string|null */
public ?string $AudienceTier=null,
/** @var array<CoverageSelfMatrixRow>|null */
public ?array $Matrix=null,
/** @var int */
public int $NotYetOffered=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CoverageGapId'])) $this->CoverageGapId = $o['CoverageGapId'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['Day'])) $this->Day = $o['Day'];
if (isset($o['Window'])) $this->Window = $o['Window'];
if (isset($o['Site'])) $this->Site = $o['Site'];
if (isset($o['Role'])) $this->Role = $o['Role'];
if (isset($o['Poster'])) $this->Poster = $o['Poster'];
if (isset($o['ExpiryLabel'])) $this->ExpiryLabel = $o['ExpiryLabel'];
if (isset($o['ExpiresSoon'])) $this->ExpiresSoon = $o['ExpiresSoon'];
if (isset($o['EligibleCount'])) $this->EligibleCount = $o['EligibleCount'];
if (isset($o['IneligibleCount'])) $this->IneligibleCount = $o['IneligibleCount'];
if (isset($o['OfferedCount'])) $this->OfferedCount = $o['OfferedCount'];
if (isset($o['ClaimsCount'])) $this->ClaimsCount = $o['ClaimsCount'];
if (isset($o['ClaimantName'])) $this->ClaimantName = $o['ClaimantName'];
if (isset($o['AudienceTier'])) $this->AudienceTier = $o['AudienceTier'];
if (isset($o['Matrix'])) $this->Matrix = JsonConverters::fromArray('CoverageSelfMatrixRow', $o['Matrix']);
if (isset($o['NotYetOffered'])) $this->NotYetOffered = $o['NotYetOffered'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CoverageGapId)) $o['CoverageGapId'] = $this->CoverageGapId;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->Day)) $o['Day'] = $this->Day;
if (isset($this->Window)) $o['Window'] = $this->Window;
if (isset($this->Site)) $o['Site'] = $this->Site;
if (isset($this->Role)) $o['Role'] = $this->Role;
if (isset($this->Poster)) $o['Poster'] = $this->Poster;
if (isset($this->ExpiryLabel)) $o['ExpiryLabel'] = $this->ExpiryLabel;
if (isset($this->ExpiresSoon)) $o['ExpiresSoon'] = $this->ExpiresSoon;
if (isset($this->EligibleCount)) $o['EligibleCount'] = $this->EligibleCount;
if (isset($this->IneligibleCount)) $o['IneligibleCount'] = $this->IneligibleCount;
if (isset($this->OfferedCount)) $o['OfferedCount'] = $this->OfferedCount;
if (isset($this->ClaimsCount)) $o['ClaimsCount'] = $this->ClaimsCount;
if (isset($this->ClaimantName)) $o['ClaimantName'] = $this->ClaimantName;
if (isset($this->AudienceTier)) $o['AudienceTier'] = $this->AudienceTier;
if (isset($this->Matrix)) $o['Matrix'] = JsonConverters::toArray('CoverageSelfMatrixRow', $this->Matrix);
if (isset($this->NotYetOffered)) $o['NotYetOffered'] = $this->NotYetOffered;
return empty($o) ? new class(){} : $o;
}
}
class CoverageBoardApproval implements JsonSerializable
{
public function __construct(
/** @var int */
public int $CoverageApprovalId=0,
/** @var int */
public int $CoverageGapId=0,
/** @var string|null */
public ?string $Claimant=null,
/** @var string|null */
public ?string $Poster=null,
/** @var string|null */
public ?string $Day=null,
/** @var string|null */
public ?string $Window=null,
/** @var string|null */
public ?string $Site=null,
/** @var string|null */
public ?string $Role=null,
/** @var string|null */
public ?string $OtText=null,
/** @var string|null */
public ?string $OtNote=null,
/** @var bool|null */
public ?bool $OtWarn=null,
/** @var string|null */
public ?string $MarginText=null,
/** @var string|null */
public ?string $MarginNote=null,
/** @var string|null */
public ?string $MarginTone=null,
/** @var string|null */
public ?string $EligText=null,
/** @var string|null */
public ?string $EligNote=null,
/** @var bool|null */
public ?bool $EligWarn=null,
/** @var string|null */
public ?string $Channel=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CoverageApprovalId'])) $this->CoverageApprovalId = $o['CoverageApprovalId'];
if (isset($o['CoverageGapId'])) $this->CoverageGapId = $o['CoverageGapId'];
if (isset($o['Claimant'])) $this->Claimant = $o['Claimant'];
if (isset($o['Poster'])) $this->Poster = $o['Poster'];
if (isset($o['Day'])) $this->Day = $o['Day'];
if (isset($o['Window'])) $this->Window = $o['Window'];
if (isset($o['Site'])) $this->Site = $o['Site'];
if (isset($o['Role'])) $this->Role = $o['Role'];
if (isset($o['OtText'])) $this->OtText = $o['OtText'];
if (isset($o['OtNote'])) $this->OtNote = $o['OtNote'];
if (isset($o['OtWarn'])) $this->OtWarn = $o['OtWarn'];
if (isset($o['MarginText'])) $this->MarginText = $o['MarginText'];
if (isset($o['MarginNote'])) $this->MarginNote = $o['MarginNote'];
if (isset($o['MarginTone'])) $this->MarginTone = $o['MarginTone'];
if (isset($o['EligText'])) $this->EligText = $o['EligText'];
if (isset($o['EligNote'])) $this->EligNote = $o['EligNote'];
if (isset($o['EligWarn'])) $this->EligWarn = $o['EligWarn'];
if (isset($o['Channel'])) $this->Channel = $o['Channel'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CoverageApprovalId)) $o['CoverageApprovalId'] = $this->CoverageApprovalId;
if (isset($this->CoverageGapId)) $o['CoverageGapId'] = $this->CoverageGapId;
if (isset($this->Claimant)) $o['Claimant'] = $this->Claimant;
if (isset($this->Poster)) $o['Poster'] = $this->Poster;
if (isset($this->Day)) $o['Day'] = $this->Day;
if (isset($this->Window)) $o['Window'] = $this->Window;
if (isset($this->Site)) $o['Site'] = $this->Site;
if (isset($this->Role)) $o['Role'] = $this->Role;
if (isset($this->OtText)) $o['OtText'] = $this->OtText;
if (isset($this->OtNote)) $o['OtNote'] = $this->OtNote;
if (isset($this->OtWarn)) $o['OtWarn'] = $this->OtWarn;
if (isset($this->MarginText)) $o['MarginText'] = $this->MarginText;
if (isset($this->MarginNote)) $o['MarginNote'] = $this->MarginNote;
if (isset($this->MarginTone)) $o['MarginTone'] = $this->MarginTone;
if (isset($this->EligText)) $o['EligText'] = $this->EligText;
if (isset($this->EligNote)) $o['EligNote'] = $this->EligNote;
if (isset($this->EligWarn)) $o['EligWarn'] = $this->EligWarn;
if (isset($this->Channel)) $o['Channel'] = $this->Channel;
return empty($o) ? new class(){} : $o;
}
}
class CoverageBoardHistoryRow implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Kind=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Detail=null,
/** @var string|null */
public ?string $Outcome=null,
/** @var string|null */
public ?string $WhenLabel=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Kind'])) $this->Kind = $o['Kind'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Detail'])) $this->Detail = $o['Detail'];
if (isset($o['Outcome'])) $this->Outcome = $o['Outcome'];
if (isset($o['WhenLabel'])) $this->WhenLabel = $o['WhenLabel'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Kind)) $o['Kind'] = $this->Kind;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Detail)) $o['Detail'] = $this->Detail;
if (isset($this->Outcome)) $o['Outcome'] = $this->Outcome;
if (isset($this->WhenLabel)) $o['WhenLabel'] = $this->WhenLabel;
return empty($o) ? new class(){} : $o;
}
}
class CoverageBoardResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<CoverageBoardShift>|null */
public ?array $Shifts=null,
/** @var array<CoverageBoardApproval>|null */
public ?array $Approvals=null,
/** @var array<CoverageBoardHistoryRow>|null */
public ?array $History=null,
/** @var bool|null */
public ?bool $CanApprove=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Shifts'])) $this->Shifts = JsonConverters::fromArray('CoverageBoardShift', $o['Shifts']);
if (isset($o['Approvals'])) $this->Approvals = JsonConverters::fromArray('CoverageBoardApproval', $o['Approvals']);
if (isset($o['History'])) $this->History = JsonConverters::fromArray('CoverageBoardHistoryRow', $o['History']);
if (isset($o['CanApprove'])) $this->CanApprove = $o['CanApprove'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Shifts)) $o['Shifts'] = JsonConverters::toArray('CoverageBoardShift', $this->Shifts);
if (isset($this->Approvals)) $o['Approvals'] = JsonConverters::toArray('CoverageBoardApproval', $this->Approvals);
if (isset($this->History)) $o['History'] = JsonConverters::toArray('CoverageBoardHistoryRow', $this->History);
if (isset($this->CanApprove)) $o['CanApprove'] = $this->CanApprove;
return empty($o) ? new class(){} : $o;
}
}
class CoverageBoardRequest implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $BranchId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
return empty($o) ? new class(){} : $o;
}
}
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/coverage/board HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CoverageBoardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Approvals>
<CoverageBoardApproval>
<Channel>String</Channel>
<Claimant>String</Claimant>
<CoverageApprovalId>0</CoverageApprovalId>
<CoverageGapId>0</CoverageGapId>
<Day>String</Day>
<EligNote>String</EligNote>
<EligText>String</EligText>
<EligWarn>false</EligWarn>
<MarginNote>String</MarginNote>
<MarginText>String</MarginText>
<MarginTone>String</MarginTone>
<OtNote>String</OtNote>
<OtText>String</OtText>
<OtWarn>false</OtWarn>
<Poster>String</Poster>
<Role>String</Role>
<Site>String</Site>
<Window>String</Window>
</CoverageBoardApproval>
</Approvals>
<CanApprove>false</CanApprove>
<History>
<CoverageBoardHistoryRow>
<Detail>String</Detail>
<Kind>String</Kind>
<Outcome>String</Outcome>
<Title>String</Title>
<WhenLabel>String</WhenLabel>
</CoverageBoardHistoryRow>
</History>
<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>
<Shifts>
<CoverageBoardShift>
<AudienceTier>String</AudienceTier>
<ClaimantName>String</ClaimantName>
<ClaimsCount>0</ClaimsCount>
<CoverageGapId>0</CoverageGapId>
<Day>String</Day>
<EligibleCount>0</EligibleCount>
<ExpiresSoon>false</ExpiresSoon>
<ExpiryLabel>String</ExpiryLabel>
<IneligibleCount>0</IneligibleCount>
<Matrix>
<CoverageSelfMatrixRow>
<Name>String</Name>
<Note>String</Note>
<Tone>String</Tone>
</CoverageSelfMatrixRow>
</Matrix>
<NotYetOffered>0</NotYetOffered>
<OfferedCount>0</OfferedCount>
<Poster>String</Poster>
<Role>String</Role>
<Site>String</Site>
<State>String</State>
<Window>String</Window>
</CoverageBoardShift>
</Shifts>
</CoverageBoardResponse>