Trendsic Platform Service

<back to all web services

GetMyTerminologyRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/me/terminology
<?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 GetMyTerminologyRequest implements IGet, JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

class TenantPlanModule implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var DateTime|null */
        public ?DateTime $ExpiresAt=null,
        /** @var string|null */
        public ?string $MeterKey=null,
        /** @var int|null */
        public ?int $Used=null,
        /** @var int|null */
        public ?int $Allowance=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['ExpiresAt'])) $this->ExpiresAt = JsonConverters::from('DateTime', $o['ExpiresAt']);
        if (isset($o['MeterKey'])) $this->MeterKey = $o['MeterKey'];
        if (isset($o['Used'])) $this->Used = $o['Used'];
        if (isset($o['Allowance'])) $this->Allowance = $o['Allowance'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->ExpiresAt)) $o['ExpiresAt'] = JsonConverters::to('DateTime', $this->ExpiresAt);
        if (isset($this->MeterKey)) $o['MeterKey'] = $this->MeterKey;
        if (isset($this->Used)) $o['Used'] = $this->Used;
        if (isset($this->Allowance)) $o['Allowance'] = $this->Allowance;
        return empty($o) ? new class(){} : $o;
    }
}

class GetMyTerminologyResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $PackCode=null,
        /** @var array<string,string>|null */
        public ?array $Terms=null,
        /** @var array<string,bool>|null */
        public ?array $Features=null,
        /** @var array<string>|null */
        public ?array $OutOfPack=null,
        /** @var bool|null */
        public ?bool $WorkspaceSetupCompleted=null,
        /** @var bool|null */
        public ?bool $Sandbox=null,
        /** @var array<string,bool>|null */
        public ?array $Entitled=null,
        /** @var array<string,string>|null */
        public ?array $Reasons=null,
        /** @var array<string,bool>|null */
        public ?array $Chosen=null,
        /** @var array<string,string>|null */
        public ?array $FeatureModules=null,
        /** @var array<string,TenantPlanModule>|null */
        public ?array $Modules=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PackCode'])) $this->PackCode = $o['PackCode'];
        if (isset($o['Terms'])) $this->Terms = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Terms']);
        if (isset($o['Features'])) $this->Features = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Features']);
        if (isset($o['OutOfPack'])) $this->OutOfPack = JsonConverters::fromArray('string', $o['OutOfPack']);
        if (isset($o['WorkspaceSetupCompleted'])) $this->WorkspaceSetupCompleted = $o['WorkspaceSetupCompleted'];
        if (isset($o['Sandbox'])) $this->Sandbox = $o['Sandbox'];
        if (isset($o['Entitled'])) $this->Entitled = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Entitled']);
        if (isset($o['Reasons'])) $this->Reasons = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Reasons']);
        if (isset($o['Chosen'])) $this->Chosen = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $o['Chosen']);
        if (isset($o['FeatureModules'])) $this->FeatureModules = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['FeatureModules']);
        if (isset($o['Modules'])) $this->Modules = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','TenantPlanModule']), $o['Modules']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PackCode)) $o['PackCode'] = $this->PackCode;
        if (isset($this->Terms)) $o['Terms'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Terms);
        if (isset($this->Features)) $o['Features'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Features);
        if (isset($this->OutOfPack)) $o['OutOfPack'] = JsonConverters::toArray('string', $this->OutOfPack);
        if (isset($this->WorkspaceSetupCompleted)) $o['WorkspaceSetupCompleted'] = $this->WorkspaceSetupCompleted;
        if (isset($this->Sandbox)) $o['Sandbox'] = $this->Sandbox;
        if (isset($this->Entitled)) $o['Entitled'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Entitled);
        if (isset($this->Reasons)) $o['Reasons'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Reasons);
        if (isset($this->Chosen)) $o['Chosen'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','bool']), $this->Chosen);
        if (isset($this->FeatureModules)) $o['FeatureModules'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->FeatureModules);
        if (isset($this->Modules)) $o['Modules'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','TenantPlanModule']), $this->Modules);
        return empty($o) ? new class(){} : $o;
    }
}

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

<GetMyTerminologyResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Chosen xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringboolean>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>false</d2p1:Value>
    </d2p1:KeyValueOfstringboolean>
  </Chosen>
  <Entitled xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringboolean>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>false</d2p1:Value>
    </d2p1:KeyValueOfstringboolean>
  </Entitled>
  <FeatureModules xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </FeatureModules>
  <Features xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringboolean>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>false</d2p1:Value>
    </d2p1:KeyValueOfstringboolean>
  </Features>
  <Modules xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringTenantPlanModulezI6_P42Kz>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>
        <Allowance>0</Allowance>
        <ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
        <MeterKey>String</MeterKey>
        <Name>String</Name>
        <Status>String</Status>
        <Used>0</Used>
      </d2p1:Value>
    </d2p1:KeyValueOfstringTenantPlanModulezI6_P42Kz>
  </Modules>
  <OutOfPack xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </OutOfPack>
  <PackCode>String</PackCode>
  <Reasons xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Reasons>
  <Sandbox>false</Sandbox>
  <Terms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Terms>
  <WorkspaceSetupCompleted>false</WorkspaceSetupCompleted>
</GetMyTerminologyResponse>