Trendsic Platform Service

<back to all web services

CoverageSelfCardRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/coverage/self/card/{CoverageGapId}
<?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 CoverageSelfEligibility implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Tone=null,
        /** @var string|null */
        public ?string $Text=null,
        /** @var bool|null */
        public ?bool $CanClaim=null,
        /** @var string|null */
        public ?string $ClaimLabel=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Tone'])) $this->Tone = $o['Tone'];
        if (isset($o['Text'])) $this->Text = $o['Text'];
        if (isset($o['CanClaim'])) $this->CanClaim = $o['CanClaim'];
        if (isset($o['ClaimLabel'])) $this->ClaimLabel = $o['ClaimLabel'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Tone)) $o['Tone'] = $this->Tone;
        if (isset($this->Text)) $o['Text'] = $this->Text;
        if (isset($this->CanClaim)) $o['CanClaim'] = $this->CanClaim;
        if (isset($this->ClaimLabel)) $o['ClaimLabel'] = $this->ClaimLabel;
        return empty($o) ? new class(){} : $o;
    }
}

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 CoverageSelfCard implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $CoverageGapId=0,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $ShiftDay=null,
        /** @var string|null */
        public ?string $ShiftWindow=null,
        /** @var DateTime|null */
        public ?DateTime $ShiftStartUtc=null,
        /** @var string|null */
        public ?string $Site=null,
        /** @var string|null */
        public ?string $RoleNeeded=null,
        /** @var string|null */
        public ?string $ExpiryLabel=null,
        /** @var string|null */
        public ?string $PosterName=null,
        /** @var int */
        public int $EligibleCount=0,
        /** @var int */
        public int $IneligibleCount=0,
        /** @var CoverageSelfEligibility|null */
        public ?CoverageSelfEligibility $MyEligibility=null,
        /** @var array<CoverageSelfMatrixRow>|null */
        public ?array $Matrix=null,
        /** @var string|null */
        public ?string $SwapState=null,
        /** @var string|null */
        public ?string $SwapFromName=null,
        /** @var string|null */
        public ?string $SwapTargetName=null,
        /** @var string|null */
        public ?string $OfferShift=null,
        /** @var string|null */
        public ?string $WantShift=null,
        /** @var bool|null */
        public ?bool $ConflictOk=null,
        /** @var string|null */
        public ?string $ConflictLabel=null,
        /** @var bool|null */
        public ?bool $CanRespond=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CoverageGapId'])) $this->CoverageGapId = $o['CoverageGapId'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['ShiftDay'])) $this->ShiftDay = $o['ShiftDay'];
        if (isset($o['ShiftWindow'])) $this->ShiftWindow = $o['ShiftWindow'];
        if (isset($o['ShiftStartUtc'])) $this->ShiftStartUtc = JsonConverters::from('DateTime', $o['ShiftStartUtc']);
        if (isset($o['Site'])) $this->Site = $o['Site'];
        if (isset($o['RoleNeeded'])) $this->RoleNeeded = $o['RoleNeeded'];
        if (isset($o['ExpiryLabel'])) $this->ExpiryLabel = $o['ExpiryLabel'];
        if (isset($o['PosterName'])) $this->PosterName = $o['PosterName'];
        if (isset($o['EligibleCount'])) $this->EligibleCount = $o['EligibleCount'];
        if (isset($o['IneligibleCount'])) $this->IneligibleCount = $o['IneligibleCount'];
        if (isset($o['MyEligibility'])) $this->MyEligibility = JsonConverters::from('CoverageSelfEligibility', $o['MyEligibility']);
        if (isset($o['Matrix'])) $this->Matrix = JsonConverters::fromArray('CoverageSelfMatrixRow', $o['Matrix']);
        if (isset($o['SwapState'])) $this->SwapState = $o['SwapState'];
        if (isset($o['SwapFromName'])) $this->SwapFromName = $o['SwapFromName'];
        if (isset($o['SwapTargetName'])) $this->SwapTargetName = $o['SwapTargetName'];
        if (isset($o['OfferShift'])) $this->OfferShift = $o['OfferShift'];
        if (isset($o['WantShift'])) $this->WantShift = $o['WantShift'];
        if (isset($o['ConflictOk'])) $this->ConflictOk = $o['ConflictOk'];
        if (isset($o['ConflictLabel'])) $this->ConflictLabel = $o['ConflictLabel'];
        if (isset($o['CanRespond'])) $this->CanRespond = $o['CanRespond'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CoverageGapId)) $o['CoverageGapId'] = $this->CoverageGapId;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->ShiftDay)) $o['ShiftDay'] = $this->ShiftDay;
        if (isset($this->ShiftWindow)) $o['ShiftWindow'] = $this->ShiftWindow;
        if (isset($this->ShiftStartUtc)) $o['ShiftStartUtc'] = JsonConverters::to('DateTime', $this->ShiftStartUtc);
        if (isset($this->Site)) $o['Site'] = $this->Site;
        if (isset($this->RoleNeeded)) $o['RoleNeeded'] = $this->RoleNeeded;
        if (isset($this->ExpiryLabel)) $o['ExpiryLabel'] = $this->ExpiryLabel;
        if (isset($this->PosterName)) $o['PosterName'] = $this->PosterName;
        if (isset($this->EligibleCount)) $o['EligibleCount'] = $this->EligibleCount;
        if (isset($this->IneligibleCount)) $o['IneligibleCount'] = $this->IneligibleCount;
        if (isset($this->MyEligibility)) $o['MyEligibility'] = JsonConverters::to('CoverageSelfEligibility', $this->MyEligibility);
        if (isset($this->Matrix)) $o['Matrix'] = JsonConverters::toArray('CoverageSelfMatrixRow', $this->Matrix);
        if (isset($this->SwapState)) $o['SwapState'] = $this->SwapState;
        if (isset($this->SwapFromName)) $o['SwapFromName'] = $this->SwapFromName;
        if (isset($this->SwapTargetName)) $o['SwapTargetName'] = $this->SwapTargetName;
        if (isset($this->OfferShift)) $o['OfferShift'] = $this->OfferShift;
        if (isset($this->WantShift)) $o['WantShift'] = $this->WantShift;
        if (isset($this->ConflictOk)) $o['ConflictOk'] = $this->ConflictOk;
        if (isset($this->ConflictLabel)) $o['ConflictLabel'] = $this->ConflictLabel;
        if (isset($this->CanRespond)) $o['CanRespond'] = $this->CanRespond;
        return empty($o) ? new class(){} : $o;
    }
}

class CoverageSelfCardResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var CoverageSelfCard|null */
        public ?CoverageSelfCard $Card=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['Card'])) $this->Card = JsonConverters::from('CoverageSelfCard', $o['Card']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->Card)) $o['Card'] = JsonConverters::to('CoverageSelfCard', $this->Card);
        return empty($o) ? new class(){} : $o;
    }
}

class CoverageSelfCardRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $CoverageGapId=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CoverageGapId'])) $this->CoverageGapId = $o['CoverageGapId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CoverageGapId)) $o['CoverageGapId'] = $this->CoverageGapId;
        return empty($o) ? new class(){} : $o;
    }
}

PHP CoverageSelfCardRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/coverage/self/card/{CoverageGapId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Card":{"CoverageGapId":0,"Kind":"String","Status":"String","ShiftDay":"String","ShiftWindow":"String","ShiftStartUtc":"0001-01-01T00:00:00.0000000","Site":"String","RoleNeeded":"String","ExpiryLabel":"String","PosterName":"String","EligibleCount":0,"IneligibleCount":0,"MyEligibility":{"Tone":"String","Text":"String","CanClaim":false,"ClaimLabel":"String"},"Matrix":[{"Name":"String","Note":"String","Tone":"String"}],"SwapState":"String","SwapFromName":"String","SwapTargetName":"String","OfferShift":"String","WantShift":"String","ConflictOk":false,"ConflictLabel":"String","CanRespond":false}}