Trendsic Platform Service

<back to all web services

DeclinePlatformRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/platform/requests/{PlatformRequestId}/decline
import 'package:servicestack/servicestack.dart';

class PlatformRequestRow implements IConvertible
{
    int? PlatformRequestId;
    String? TenantId;
    String? TenantName;
    String? Slug;
    String? Kind;
    String? Key;
    String? Message;
    String? ContactName;
    String? ContactEmail;
    String? RequestedBy;
    DateTime? RequestedAt;
    String? Status;
    String? ClosedBy;
    DateTime? ClosedAt;
    String? CloseNote;

    PlatformRequestRow({this.PlatformRequestId,this.TenantId,this.TenantName,this.Slug,this.Kind,this.Key,this.Message,this.ContactName,this.ContactEmail,this.RequestedBy,this.RequestedAt,this.Status,this.ClosedBy,this.ClosedAt,this.CloseNote});
    PlatformRequestRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PlatformRequestId = json['PlatformRequestId'];
        TenantId = json['TenantId'];
        TenantName = json['TenantName'];
        Slug = json['Slug'];
        Kind = json['Kind'];
        Key = json['Key'];
        Message = json['Message'];
        ContactName = json['ContactName'];
        ContactEmail = json['ContactEmail'];
        RequestedBy = json['RequestedBy'];
        RequestedAt = JsonConverters.fromJson(json['RequestedAt'],'DateTime',context!);
        Status = json['Status'];
        ClosedBy = json['ClosedBy'];
        ClosedAt = JsonConverters.fromJson(json['ClosedAt'],'DateTime',context!);
        CloseNote = json['CloseNote'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PlatformRequestId': PlatformRequestId,
        'TenantId': TenantId,
        'TenantName': TenantName,
        'Slug': Slug,
        'Kind': Kind,
        'Key': Key,
        'Message': Message,
        'ContactName': ContactName,
        'ContactEmail': ContactEmail,
        'RequestedBy': RequestedBy,
        'RequestedAt': JsonConverters.toJson(RequestedAt,'DateTime',context!),
        'Status': Status,
        'ClosedBy': ClosedBy,
        'ClosedAt': JsonConverters.toJson(ClosedAt,'DateTime',context!),
        'CloseNote': CloseNote
    };

    getTypeName() => "PlatformRequestRow";
    TypeContext? context = _ctx;
}

class PlatformRequestsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<PlatformRequestRow>? Requests = [];
    PlatformRequestRow? Closed;

    PlatformRequestsResponse({this.ResponseStatus,this.Requests,this.Closed});
    PlatformRequestsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Requests = JsonConverters.fromJson(json['Requests'],'List<PlatformRequestRow>',context!);
        Closed = JsonConverters.fromJson(json['Closed'],'PlatformRequestRow',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Requests': JsonConverters.toJson(Requests,'List<PlatformRequestRow>',context!),
        'Closed': JsonConverters.toJson(Closed,'PlatformRequestRow',context!)
    };

    getTypeName() => "PlatformRequestsResponse";
    TypeContext? context = _ctx;
}

class DeclinePlatformRequest implements IConvertible
{
    int? PlatformRequestId;
    String? Reason;

    DeclinePlatformRequest({this.PlatformRequestId,this.Reason});
    DeclinePlatformRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        PlatformRequestId = json['PlatformRequestId'];
        Reason = json['Reason'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'PlatformRequestId': PlatformRequestId,
        'Reason': Reason
    };

    getTypeName() => "DeclinePlatformRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PlatformRequestRow': TypeInfo(TypeOf.Class, create:() => PlatformRequestRow()),
    'PlatformRequestsResponse': TypeInfo(TypeOf.Class, create:() => PlatformRequestsResponse()),
    'List<PlatformRequestRow>': TypeInfo(TypeOf.Class, create:() => <PlatformRequestRow>[]),
    'DeclinePlatformRequest': TypeInfo(TypeOf.Class, create:() => DeclinePlatformRequest()),
});

Dart DeclinePlatformRequest 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.

POST /v1/platform/requests/{PlatformRequestId}/decline HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DeclinePlatformRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <PlatformRequestId>0</PlatformRequestId>
  <Reason>String</Reason>
</DeclinePlatformRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PlatformRequestsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Closed>
    <CloseNote>String</CloseNote>
    <ClosedAt>0001-01-01T00:00:00</ClosedAt>
    <ClosedBy>String</ClosedBy>
    <ContactEmail>String</ContactEmail>
    <ContactName>String</ContactName>
    <Key>String</Key>
    <Kind>String</Kind>
    <Message>String</Message>
    <PlatformRequestId>0</PlatformRequestId>
    <RequestedAt>0001-01-01T00:00:00</RequestedAt>
    <RequestedBy>String</RequestedBy>
    <Slug>String</Slug>
    <Status>String</Status>
    <TenantId>00000000-0000-0000-0000-000000000000</TenantId>
    <TenantName>String</TenantName>
  </Closed>
  <Requests>
    <PlatformRequestRow>
      <CloseNote>String</CloseNote>
      <ClosedAt>0001-01-01T00:00:00</ClosedAt>
      <ClosedBy>String</ClosedBy>
      <ContactEmail>String</ContactEmail>
      <ContactName>String</ContactName>
      <Key>String</Key>
      <Kind>String</Kind>
      <Message>String</Message>
      <PlatformRequestId>0</PlatformRequestId>
      <RequestedAt>0001-01-01T00:00:00</RequestedAt>
      <RequestedBy>String</RequestedBy>
      <Slug>String</Slug>
      <Status>String</Status>
      <TenantId>00000000-0000-0000-0000-000000000000</TenantId>
      <TenantName>String</TenantName>
    </PlatformRequestRow>
  </Requests>
  <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>
</PlatformRequestsResponse>