digitaluapi

<back to all web services

StatusTypesAdd

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
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()),
});

Dart StatusTypesAdd 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 /status_types HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"TenantsId":0,"Description":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}