Trendsic Platform Service

<back to all web services

ComplianceOperationsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/records/compliance/operations
<?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 ComplianceEvidenceDto implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Period=null,
        /** @var string|null */
        public ?string $Months=null,
        /** @var int */
        public int $Certs=0,
        /** @var int */
        public int $Sessions=0,
        /** @var int */
        public int $Requests=0,
        /** @var int */
        public int $Holds=0,
        /** @var int */
        public int $TrailRows=0
    ) {
    }

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

class ComplianceOperationsDto implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $OverdueCheckouts=0,
        /** @var string|null */
        public ?string $CheckoutRef=null,
        /** @var string|null */
        public ?string $CheckoutWho=null,
        /** @var string|null */
        public ?string $CheckoutSince=null,
        /** @var int */
        public int $CheckoutDaysOver=0,
        /** @var int */
        public int $OverdueRequests=0,
        /** @var string|null */
        public ?string $RequestRef=null,
        /** @var string|null */
        public ?string $RequestWhat=null,
        /** @var int */
        public int $RequestDaysOver=0,
        /** @var int */
        public int $QaOpen=0,
        /** @var string|null */
        public ?string $QaBatch=null,
        /** @var int */
        public int $QaLands=0,
        /** @var int */
        public int $Delivered90=0,
        /** @var int */
        public int $OnTime90=0,
        /** @var array<ComplianceEvidenceDto>|null */
        public ?array $Evidence=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['OverdueCheckouts'])) $this->OverdueCheckouts = $o['OverdueCheckouts'];
        if (isset($o['CheckoutRef'])) $this->CheckoutRef = $o['CheckoutRef'];
        if (isset($o['CheckoutWho'])) $this->CheckoutWho = $o['CheckoutWho'];
        if (isset($o['CheckoutSince'])) $this->CheckoutSince = $o['CheckoutSince'];
        if (isset($o['CheckoutDaysOver'])) $this->CheckoutDaysOver = $o['CheckoutDaysOver'];
        if (isset($o['OverdueRequests'])) $this->OverdueRequests = $o['OverdueRequests'];
        if (isset($o['RequestRef'])) $this->RequestRef = $o['RequestRef'];
        if (isset($o['RequestWhat'])) $this->RequestWhat = $o['RequestWhat'];
        if (isset($o['RequestDaysOver'])) $this->RequestDaysOver = $o['RequestDaysOver'];
        if (isset($o['QaOpen'])) $this->QaOpen = $o['QaOpen'];
        if (isset($o['QaBatch'])) $this->QaBatch = $o['QaBatch'];
        if (isset($o['QaLands'])) $this->QaLands = $o['QaLands'];
        if (isset($o['Delivered90'])) $this->Delivered90 = $o['Delivered90'];
        if (isset($o['OnTime90'])) $this->OnTime90 = $o['OnTime90'];
        if (isset($o['Evidence'])) $this->Evidence = JsonConverters::fromArray('ComplianceEvidenceDto', $o['Evidence']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->OverdueCheckouts)) $o['OverdueCheckouts'] = $this->OverdueCheckouts;
        if (isset($this->CheckoutRef)) $o['CheckoutRef'] = $this->CheckoutRef;
        if (isset($this->CheckoutWho)) $o['CheckoutWho'] = $this->CheckoutWho;
        if (isset($this->CheckoutSince)) $o['CheckoutSince'] = $this->CheckoutSince;
        if (isset($this->CheckoutDaysOver)) $o['CheckoutDaysOver'] = $this->CheckoutDaysOver;
        if (isset($this->OverdueRequests)) $o['OverdueRequests'] = $this->OverdueRequests;
        if (isset($this->RequestRef)) $o['RequestRef'] = $this->RequestRef;
        if (isset($this->RequestWhat)) $o['RequestWhat'] = $this->RequestWhat;
        if (isset($this->RequestDaysOver)) $o['RequestDaysOver'] = $this->RequestDaysOver;
        if (isset($this->QaOpen)) $o['QaOpen'] = $this->QaOpen;
        if (isset($this->QaBatch)) $o['QaBatch'] = $this->QaBatch;
        if (isset($this->QaLands)) $o['QaLands'] = $this->QaLands;
        if (isset($this->Delivered90)) $o['Delivered90'] = $this->Delivered90;
        if (isset($this->OnTime90)) $o['OnTime90'] = $this->OnTime90;
        if (isset($this->Evidence)) $o['Evidence'] = JsonConverters::toArray('ComplianceEvidenceDto', $this->Evidence);
        return empty($o) ? new class(){} : $o;
    }
}

class ComplianceOperationsResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var ComplianceOperationsDto|null */
        public ?ComplianceOperationsDto $Operations=null
    ) {
    }

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

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

PHP ComplianceOperationsRequest DTOs

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

HTTP + OTHER

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

GET /v1/records/compliance/operations HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Operations":{"OverdueCheckouts":0,"CheckoutRef":"String","CheckoutWho":"String","CheckoutSince":"String","CheckoutDaysOver":0,"OverdueRequests":0,"RequestRef":"String","RequestWhat":"String","RequestDaysOver":0,"QaOpen":0,"QaBatch":"String","QaLands":0,"Delivered90":0,"OnTime90":0,"Evidence":[{"Period":"String","Months":"String","Certs":0,"Sessions":0,"Requests":0,"Holds":0,"TrailRows":0}]}}