Trendsic Platform Service

<back to all web services

RecordsRequestsRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/records/requests
<?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 RecordsRequestDto implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $RequestId=0,
        /** @var string|null */
        public ?string $RequestKey=null,
        /** @var string|null */
        public ?string $Subject=null,
        /** @var string|null */
        public ?string $Body=null,
        /** @var string|null */
        public ?string $RequesterName=null,
        /** @var string|null */
        public ?string $RequesterContact=null,
        /** @var string|null */
        public ?string $Channel=null,
        /** @var string|null */
        public ?string $ReceivedLabel=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var int */
        public int $ExtendedDays=0,
        /** @var string|null */
        public ?string $ItemsJson=null,
        /** @var string|null */
        public ?string $LogJson=null,
        /** @var string|null */
        public ?string $DueDate=null,
        /** @var int */
        public int $DueDays=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RequestId'])) $this->RequestId = $o['RequestId'];
        if (isset($o['RequestKey'])) $this->RequestKey = $o['RequestKey'];
        if (isset($o['Subject'])) $this->Subject = $o['Subject'];
        if (isset($o['Body'])) $this->Body = $o['Body'];
        if (isset($o['RequesterName'])) $this->RequesterName = $o['RequesterName'];
        if (isset($o['RequesterContact'])) $this->RequesterContact = $o['RequesterContact'];
        if (isset($o['Channel'])) $this->Channel = $o['Channel'];
        if (isset($o['ReceivedLabel'])) $this->ReceivedLabel = $o['ReceivedLabel'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['ExtendedDays'])) $this->ExtendedDays = $o['ExtendedDays'];
        if (isset($o['ItemsJson'])) $this->ItemsJson = $o['ItemsJson'];
        if (isset($o['LogJson'])) $this->LogJson = $o['LogJson'];
        if (isset($o['DueDate'])) $this->DueDate = $o['DueDate'];
        if (isset($o['DueDays'])) $this->DueDays = $o['DueDays'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RequestId)) $o['RequestId'] = $this->RequestId;
        if (isset($this->RequestKey)) $o['RequestKey'] = $this->RequestKey;
        if (isset($this->Subject)) $o['Subject'] = $this->Subject;
        if (isset($this->Body)) $o['Body'] = $this->Body;
        if (isset($this->RequesterName)) $o['RequesterName'] = $this->RequesterName;
        if (isset($this->RequesterContact)) $o['RequesterContact'] = $this->RequesterContact;
        if (isset($this->Channel)) $o['Channel'] = $this->Channel;
        if (isset($this->ReceivedLabel)) $o['ReceivedLabel'] = $this->ReceivedLabel;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->ExtendedDays)) $o['ExtendedDays'] = $this->ExtendedDays;
        if (isset($this->ItemsJson)) $o['ItemsJson'] = $this->ItemsJson;
        if (isset($this->LogJson)) $o['LogJson'] = $this->LogJson;
        if (isset($this->DueDate)) $o['DueDate'] = $this->DueDate;
        if (isset($this->DueDays)) $o['DueDays'] = $this->DueDays;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

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

PHP RecordsRequestsRequest 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/requests 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"}},"Requests":[{"RequestId":0,"RequestKey":"String","Subject":"String","Body":"String","RequesterName":"String","RequesterContact":"String","Channel":"String","ReceivedLabel":"String","Status":"String","ExtendedDays":0,"ItemsJson":"String","LogJson":"String","DueDate":"String","DueDays":0}]}