digitaluapi

<back to all web services

StatusCodesAdd

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
POST/status_codes
import 'package:servicestack/servicestack.dart';
import 'dart:collection';

class StatusCodesAddResponse implements IConvertible
{
    // @DataMember(Order=2)
    int? TenantsId;

    // @DataMember(Order=3)
    int? StatusTypesId;

    // @DataMember(Order=4)
    String? Code;

    // @DataMember(Order=5)
    String? Description;

    // @DataMember(Order=7)
    ResponseStatus? ResponseStatus;

    StatusCodesAddResponse({this.TenantsId,this.StatusTypesId,this.Code,this.Description,this.ResponseStatus});
    StatusCodesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TenantsId = json['TenantsId'];
        StatusTypesId = json['StatusTypesId'];
        Code = json['Code'];
        Description = json['Description'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TenantsId': TenantsId,
        'StatusTypesId': StatusTypesId,
        'Code': Code,
        'Description': Description,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

// @DataContract
class StatusCodesAdd implements IConvertible
{
    // @DataMember(Order=2)
    int? TenantsId;

    // @DataMember(Order=3)
    // @Validate(Validator="NotNull")
    int? StatusTypesId;

    // @DataMember(Order=4)
    // @Validate(Validator="NotNull")
    String? Code;

    // @DataMember(Order=5)
    // @Validate(Validator="NotNull")
    String? Description;

    StatusCodesAdd({this.TenantsId,this.StatusTypesId,this.Code,this.Description});
    StatusCodesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TenantsId = json['TenantsId'];
        StatusTypesId = json['StatusTypesId'];
        Code = json['Code'];
        Description = json['Description'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TenantsId': TenantsId,
        'StatusTypesId': StatusTypesId,
        'Code': Code,
        'Description': Description
    };

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

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'StatusCodesAddResponse': TypeInfo(TypeOf.Class, create:() => StatusCodesAddResponse()),
    'StatusCodesAdd': TypeInfo(TypeOf.Class, create:() => StatusCodesAdd()),
});

Dart StatusCodesAdd DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /status_codes HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"TenantsId":0,"StatusTypesId":0,"Code":"String","Description":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"TenantsId":0,"StatusTypesId":0,"Code":"String","Description":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}