Trendsic Platform Service

<back to all web services

DispositionBatchesRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/records/disposition/batches
<?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 DispositionBatchDto implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $BatchId=0,
        /** @var string|null */
        public ?string $BatchKey=null,
        /** @var string|null */
        public ?string $Title=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $MethodSummary=null,
        /** @var string|null */
        public ?string $CreatedByLbl=null,
        /** @var string|null */
        public ?string $CreatedLabel=null,
        /** @var string|null */
        public ?string $ItemsJson=null,
        /** @var string|null */
        public ?string $ChainJson=null,
        /** @var string|null */
        public ?string $ReturnReason=null,
        /** @var string|null */
        public ?string $CertJson=null,
        /** @var string|null */
        public ?string $LogJson=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['BatchId'])) $this->BatchId = $o['BatchId'];
        if (isset($o['BatchKey'])) $this->BatchKey = $o['BatchKey'];
        if (isset($o['Title'])) $this->Title = $o['Title'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['MethodSummary'])) $this->MethodSummary = $o['MethodSummary'];
        if (isset($o['CreatedByLbl'])) $this->CreatedByLbl = $o['CreatedByLbl'];
        if (isset($o['CreatedLabel'])) $this->CreatedLabel = $o['CreatedLabel'];
        if (isset($o['ItemsJson'])) $this->ItemsJson = $o['ItemsJson'];
        if (isset($o['ChainJson'])) $this->ChainJson = $o['ChainJson'];
        if (isset($o['ReturnReason'])) $this->ReturnReason = $o['ReturnReason'];
        if (isset($o['CertJson'])) $this->CertJson = $o['CertJson'];
        if (isset($o['LogJson'])) $this->LogJson = $o['LogJson'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->BatchId)) $o['BatchId'] = $this->BatchId;
        if (isset($this->BatchKey)) $o['BatchKey'] = $this->BatchKey;
        if (isset($this->Title)) $o['Title'] = $this->Title;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->MethodSummary)) $o['MethodSummary'] = $this->MethodSummary;
        if (isset($this->CreatedByLbl)) $o['CreatedByLbl'] = $this->CreatedByLbl;
        if (isset($this->CreatedLabel)) $o['CreatedLabel'] = $this->CreatedLabel;
        if (isset($this->ItemsJson)) $o['ItemsJson'] = $this->ItemsJson;
        if (isset($this->ChainJson)) $o['ChainJson'] = $this->ChainJson;
        if (isset($this->ReturnReason)) $o['ReturnReason'] = $this->ReturnReason;
        if (isset($this->CertJson)) $o['CertJson'] = $this->CertJson;
        if (isset($this->LogJson)) $o['LogJson'] = $this->LogJson;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

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

PHP DispositionBatchesRequest 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/records/disposition/batches HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Batches":[{"BatchId":0,"BatchKey":"String","Title":"String","Status":"String","MethodSummary":"String","CreatedByLbl":"String","CreatedLabel":"String","ItemsJson":"String","ChainJson":"String","ReturnReason":"String","CertJson":"String","LogJson":"String"}]}