| GET,OPTIONS | /v1/records/holds |
|---|
<?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 HoldMatchDto implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $RecordKey=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Tag=null,
/** @var bool|null */
public ?bool $Warn=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RecordKey'])) $this->RecordKey = $o['RecordKey'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Tag'])) $this->Tag = $o['Tag'];
if (isset($o['Warn'])) $this->Warn = $o['Warn'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RecordKey)) $o['RecordKey'] = $this->RecordKey;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Tag)) $o['Tag'] = $this->Tag;
if (isset($this->Warn)) $o['Warn'] = $this->Warn;
return empty($o) ? new class(){} : $o;
}
}
class LegalHoldDto implements JsonSerializable
{
public function __construct(
/** @var int */
public int $HoldId=0,
/** @var string|null */
public ?string $HoldKey=null,
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $Matter=null,
/** @var string|null */
public ?string $ScopeDim=null,
/** @var string|null */
public ?string $ScopeVal=null,
/** @var string|null */
public ?string $ScopeLabel=null,
/** @var string|null */
public ?string $ScopeNote=null,
/** @var string|null */
public ?string $PlacedBy=null,
/** @var string|null */
public ?string $PlacedLabel=null,
/** @var bool|null */
public ?bool $Released=null,
/** @var string|null */
public ?string $ReleasedLabel=null,
/** @var string|null */
public ?string $FrozenJson=null,
/** @var string|null */
public ?string $LogJson=null,
/** @var array<HoldMatchDto>|null */
public ?array $Matches=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['HoldId'])) $this->HoldId = $o['HoldId'];
if (isset($o['HoldKey'])) $this->HoldKey = $o['HoldKey'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Matter'])) $this->Matter = $o['Matter'];
if (isset($o['ScopeDim'])) $this->ScopeDim = $o['ScopeDim'];
if (isset($o['ScopeVal'])) $this->ScopeVal = $o['ScopeVal'];
if (isset($o['ScopeLabel'])) $this->ScopeLabel = $o['ScopeLabel'];
if (isset($o['ScopeNote'])) $this->ScopeNote = $o['ScopeNote'];
if (isset($o['PlacedBy'])) $this->PlacedBy = $o['PlacedBy'];
if (isset($o['PlacedLabel'])) $this->PlacedLabel = $o['PlacedLabel'];
if (isset($o['Released'])) $this->Released = $o['Released'];
if (isset($o['ReleasedLabel'])) $this->ReleasedLabel = $o['ReleasedLabel'];
if (isset($o['FrozenJson'])) $this->FrozenJson = $o['FrozenJson'];
if (isset($o['LogJson'])) $this->LogJson = $o['LogJson'];
if (isset($o['Matches'])) $this->Matches = JsonConverters::fromArray('HoldMatchDto', $o['Matches']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->HoldId)) $o['HoldId'] = $this->HoldId;
if (isset($this->HoldKey)) $o['HoldKey'] = $this->HoldKey;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Matter)) $o['Matter'] = $this->Matter;
if (isset($this->ScopeDim)) $o['ScopeDim'] = $this->ScopeDim;
if (isset($this->ScopeVal)) $o['ScopeVal'] = $this->ScopeVal;
if (isset($this->ScopeLabel)) $o['ScopeLabel'] = $this->ScopeLabel;
if (isset($this->ScopeNote)) $o['ScopeNote'] = $this->ScopeNote;
if (isset($this->PlacedBy)) $o['PlacedBy'] = $this->PlacedBy;
if (isset($this->PlacedLabel)) $o['PlacedLabel'] = $this->PlacedLabel;
if (isset($this->Released)) $o['Released'] = $this->Released;
if (isset($this->ReleasedLabel)) $o['ReleasedLabel'] = $this->ReleasedLabel;
if (isset($this->FrozenJson)) $o['FrozenJson'] = $this->FrozenJson;
if (isset($this->LogJson)) $o['LogJson'] = $this->LogJson;
if (isset($this->Matches)) $o['Matches'] = JsonConverters::toArray('HoldMatchDto', $this->Matches);
return empty($o) ? new class(){} : $o;
}
}
class HoldsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<LegalHoldDto>|null */
public ?array $Holds=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['Holds'])) $this->Holds = JsonConverters::fromArray('LegalHoldDto', $o['Holds']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->Holds)) $o['Holds'] = JsonConverters::toArray('LegalHoldDto', $this->Holds);
return empty($o) ? new class(){} : $o;
}
}
class HoldsRequest implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/records/holds 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"}},"Holds":[{"HoldId":0,"HoldKey":"String","Name":"String","Matter":"String","ScopeDim":"String","ScopeVal":"String","ScopeLabel":"String","ScopeNote":"String","PlacedBy":"String","PlacedLabel":"String","Released":false,"ReleasedLabel":"String","FrozenJson":"String","LogJson":"String","Matches":[{"RecordKey":"String","Name":"String","Tag":"String","Warn":false}]}]}