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

<DispositionBatchesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Batches>
    <DispositionBatchDto>
      <BatchId>0</BatchId>
      <BatchKey>String</BatchKey>
      <CertJson>String</CertJson>
      <ChainJson>String</ChainJson>
      <CreatedByLbl>String</CreatedByLbl>
      <CreatedLabel>String</CreatedLabel>
      <ItemsJson>String</ItemsJson>
      <LogJson>String</LogJson>
      <MethodSummary>String</MethodSummary>
      <ReturnReason>String</ReturnReason>
      <Status>String</Status>
      <Title>String</Title>
    </DispositionBatchDto>
  </Batches>
  <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>
</DispositionBatchesResponse>