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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"PlatformRequestId":0,"Reason":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Requests":[{"PlatformRequestId":0,"TenantId":"00000000000000000000000000000000","TenantName":"String","Slug":"String","Kind":"String","Key":"String","Message":"String","ContactName":"String","ContactEmail":"String","RequestedBy":"String","RequestedAt":"0001-01-01T00:00:00.0000000","Status":"String","ClosedBy":"String","ClosedAt":"0001-01-01T00:00:00.0000000","CloseNote":"String"}],"Closed":{"PlatformRequestId":0,"TenantId":"00000000000000000000000000000000","TenantName":"String","Slug":"String","Kind":"String","Key":"String","Message":"String","ContactName":"String","ContactEmail":"String","RequestedBy":"String","RequestedAt":"0001-01-01T00:00:00.0000000","Status":"String","ClosedBy":"String","ClosedAt":"0001-01-01T00:00:00.0000000","CloseNote":"String"}}