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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ComplianceOperationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Operations>
    <CheckoutDaysOver>0</CheckoutDaysOver>
    <CheckoutRef>String</CheckoutRef>
    <CheckoutSince>String</CheckoutSince>
    <CheckoutWho>String</CheckoutWho>
    <Delivered90>0</Delivered90>
    <Evidence>
      <ComplianceEvidenceDto>
        <Certs>0</Certs>
        <Holds>0</Holds>
        <Months>String</Months>
        <Period>String</Period>
        <Requests>0</Requests>
        <Sessions>0</Sessions>
        <TrailRows>0</TrailRows>
      </ComplianceEvidenceDto>
    </Evidence>
    <OnTime90>0</OnTime90>
    <OverdueCheckouts>0</OverdueCheckouts>
    <OverdueRequests>0</OverdueRequests>
    <QaBatch>String</QaBatch>
    <QaLands>0</QaLands>
    <QaOpen>0</QaOpen>
    <RequestDaysOver>0</RequestDaysOver>
    <RequestRef>String</RequestRef>
    <RequestWhat>String</RequestWhat>
  </Operations>
  <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>
</ComplianceOperationsResponse>