| Requires any of the roles: | Client, Admin, Partner |
| POST | /status_types |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:collection';
class StatusTypesAddResponse implements IConvertible
{
// @DataMember(Order=2)
int? TenantsId;
// @DataMember(Order=3)
String? Description;
// @DataMember(Order=5)
ResponseStatus? ResponseStatus;
StatusTypesAddResponse({this.TenantsId,this.Description,this.ResponseStatus});
StatusTypesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TenantsId = json['TenantsId'];
Description = json['Description'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TenantsId': TenantsId,
'Description': Description,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "StatusTypesAddResponse";
TypeContext? context = _ctx;
}
// @DataContract
class StatusTypesAdd implements IConvertible
{
// @DataMember(Order=2)
int? TenantsId;
// @DataMember(Order=3)
// @Validate(Validator="NotNull")
String? Description;
StatusTypesAdd({this.TenantsId,this.Description});
StatusTypesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TenantsId = json['TenantsId'];
Description = json['Description'];
return this;
}
Map<String, dynamic> toJson() => {
'TenantsId': TenantsId,
'Description': Description
};
getTypeName() => "StatusTypesAdd";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'StatusTypesAddResponse': TypeInfo(TypeOf.Class, create:() => StatusTypesAddResponse()),
'StatusTypesAdd': TypeInfo(TypeOf.Class, create:() => StatusTypesAdd()),
});
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 /status_types HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"TenantsId":0,"Description":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"TenantsId":0,"Description":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}