| POST,OPTIONS | /v1/platform/requests/{PlatformRequestId}/approve |
|---|
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 ApprovePlatformRequest implements IConvertible
{
int? PlatformRequestId;
String? Status;
DateTime? ExpiresAt;
String? Reason;
ApprovePlatformRequest({this.PlatformRequestId,this.Status,this.ExpiresAt,this.Reason});
ApprovePlatformRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PlatformRequestId = json['PlatformRequestId'];
Status = json['Status'];
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
Reason = json['Reason'];
return this;
}
Map<String, dynamic> toJson() => {
'PlatformRequestId': PlatformRequestId,
'Status': Status,
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
'Reason': Reason
};
getTypeName() => "ApprovePlatformRequest";
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>[]),
'ApprovePlatformRequest': TypeInfo(TypeOf.Class, create:() => ApprovePlatformRequest()),
});
Dart ApprovePlatformRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/platform/requests/{PlatformRequestId}/approve HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"PlatformRequestId":0,"Status":"String","ExpiresAt":"0001-01-01T00:00:00.0000000","Reason":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
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"}}