Trendsic Platform Service

<back to all web services

IntegrationsProvidersRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/integrations/providers
<?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 ProviderView implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Key=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Category=null,
        /** @var string|null */
        public ?string $Blurb=null,
        /** @var string|null */
        public ?string $Mono=null,
        /** @var string|null */
        public ?string $AuthMode=null,
        /** @var bool|null */
        public ?bool $Available=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var string|null */
        public ?string $Health=null,
        /** @var string|null */
        public ?string $StatusDetail=null,
        /** @var string|null */
        public ?string $AccountLabel=null,
        /** @var string|null */
        public ?string $Environment=null,
        /** @var DateTime|null */
        public ?DateTime $LastActivityAt=null,
        /** @var string|null */
        public ?string $ManageRoute=null,
        /** @var array<string>|null */
        public ?array $Actions=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Key'])) $this->Key = $o['Key'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Category'])) $this->Category = $o['Category'];
        if (isset($o['Blurb'])) $this->Blurb = $o['Blurb'];
        if (isset($o['Mono'])) $this->Mono = $o['Mono'];
        if (isset($o['AuthMode'])) $this->AuthMode = $o['AuthMode'];
        if (isset($o['Available'])) $this->Available = $o['Available'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Health'])) $this->Health = $o['Health'];
        if (isset($o['StatusDetail'])) $this->StatusDetail = $o['StatusDetail'];
        if (isset($o['AccountLabel'])) $this->AccountLabel = $o['AccountLabel'];
        if (isset($o['Environment'])) $this->Environment = $o['Environment'];
        if (isset($o['LastActivityAt'])) $this->LastActivityAt = JsonConverters::from('DateTime', $o['LastActivityAt']);
        if (isset($o['ManageRoute'])) $this->ManageRoute = $o['ManageRoute'];
        if (isset($o['Actions'])) $this->Actions = JsonConverters::fromArray('string', $o['Actions']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Key)) $o['Key'] = $this->Key;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Category)) $o['Category'] = $this->Category;
        if (isset($this->Blurb)) $o['Blurb'] = $this->Blurb;
        if (isset($this->Mono)) $o['Mono'] = $this->Mono;
        if (isset($this->AuthMode)) $o['AuthMode'] = $this->AuthMode;
        if (isset($this->Available)) $o['Available'] = $this->Available;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Health)) $o['Health'] = $this->Health;
        if (isset($this->StatusDetail)) $o['StatusDetail'] = $this->StatusDetail;
        if (isset($this->AccountLabel)) $o['AccountLabel'] = $this->AccountLabel;
        if (isset($this->Environment)) $o['Environment'] = $this->Environment;
        if (isset($this->LastActivityAt)) $o['LastActivityAt'] = JsonConverters::to('DateTime', $this->LastActivityAt);
        if (isset($this->ManageRoute)) $o['ManageRoute'] = $this->ManageRoute;
        if (isset($this->Actions)) $o['Actions'] = JsonConverters::toArray('string', $this->Actions);
        return empty($o) ? new class(){} : $o;
    }
}

class IntegrationsProvidersResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<ProviderView>|null */
        public ?array $Providers=null,
        /** @var int */
        public int $ConnectedCount=0,
        /** @var int */
        public int $NeedsAttentionCount=0,
        /** @var int */
        public int $AvailableCount=0,
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null
    ) {
    }

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

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

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

<IntegrationsProvidersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AvailableCount>0</AvailableCount>
  <ConnectedCount>0</ConnectedCount>
  <NeedsAttentionCount>0</NeedsAttentionCount>
  <Providers>
    <IntegrationsHubService.ProviderView>
      <AccountLabel>String</AccountLabel>
      <Actions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Actions>
      <AuthMode>String</AuthMode>
      <Available>false</Available>
      <Blurb>String</Blurb>
      <Category>String</Category>
      <Environment>String</Environment>
      <Health>String</Health>
      <Key>String</Key>
      <LastActivityAt>0001-01-01T00:00:00</LastActivityAt>
      <ManageRoute>String</ManageRoute>
      <Mono>String</Mono>
      <Name>String</Name>
      <Status>String</Status>
      <StatusDetail>String</StatusDetail>
    </IntegrationsHubService.ProviderView>
  </Providers>
  <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>
</IntegrationsProvidersResponse>