Trendsic Platform Service

<back to all web services

BurdenRatesRequest

Requires Authentication
The following routes are available for this service:
GET/v1/workforce/burden
<?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 BurdenRate implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $BurdenRateID=0,
        /** @var string|null */
        public ?string $BranchId=null,
        /** @var string|null */
        public ?string $ClassCode=null,
        /** @var float */
        public float $Fica=0.0,
        /** @var float */
        public float $FutaSuta=0.0,
        /** @var float */
        public float $Wc=0.0,
        /** @var float */
        public float $Gl=0.0,
        /** @var DateTime|null */
        public ?DateTime $EffectiveFrom=null,
        /** @var float */
        public float $BurdenPct=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BurdenRateID'])) $this->BurdenRateID = $o['BurdenRateID'];
        if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
        if (isset($o['ClassCode'])) $this->ClassCode = $o['ClassCode'];
        if (isset($o['Fica'])) $this->Fica = $o['Fica'];
        if (isset($o['FutaSuta'])) $this->FutaSuta = $o['FutaSuta'];
        if (isset($o['Wc'])) $this->Wc = $o['Wc'];
        if (isset($o['Gl'])) $this->Gl = $o['Gl'];
        if (isset($o['EffectiveFrom'])) $this->EffectiveFrom = JsonConverters::from('DateTime', $o['EffectiveFrom']);
        if (isset($o['BurdenPct'])) $this->BurdenPct = $o['BurdenPct'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BurdenRateID)) $o['BurdenRateID'] = $this->BurdenRateID;
        if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
        if (isset($this->ClassCode)) $o['ClassCode'] = $this->ClassCode;
        if (isset($this->Fica)) $o['Fica'] = $this->Fica;
        if (isset($this->FutaSuta)) $o['FutaSuta'] = $this->FutaSuta;
        if (isset($this->Wc)) $o['Wc'] = $this->Wc;
        if (isset($this->Gl)) $o['Gl'] = $this->Gl;
        if (isset($this->EffectiveFrom)) $o['EffectiveFrom'] = JsonConverters::to('DateTime', $this->EffectiveFrom);
        if (isset($this->BurdenPct)) $o['BurdenPct'] = $this->BurdenPct;
        return empty($o) ? new class(){} : $o;
    }
}

class BurdenRatesResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<BurdenRate>|null */
        public ?array $Burden=null,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

class BurdenRatesRequest implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP BurdenRatesRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /v1/workforce/burden HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Burden":[{"BurdenRateID":0,"BranchId":"00000000000000000000000000000000","ClassCode":"String","Fica":0,"FutaSuta":0,"Wc":0,"Gl":0,"EffectiveFrom":"0001-01-01T00:00:00.0000000","BurdenPct":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}