sfgboxapi

<back to all web services

TenantsAdd

Requires Authentication
The following routes are available for this service:
POST/tenants
import 'package:servicestack/servicestack.dart';

class TenantsAddResponse implements IConvertible
{
    // @DataMember(Order=2)
    int? mainZonesId;

    // @DataMember(Order=4)
    ResponseStatus? responseStatus;

    TenantsAddResponse({this.mainZonesId,this.responseStatus});
    TenantsAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'mainZonesId': mainZonesId,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

// @DataContract
class TenantsAdd implements IConvertible
{
    // @DataMember(Order=2)
    // @Validate(Validator="NotNull")
    int? mainZonesId;

    TenantsAdd({this.mainZonesId});
    TenantsAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        mainZonesId = json['mainZonesId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'mainZonesId': mainZonesId
    };

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

TypeContext _ctx = TypeContext(library: 'sfgboxapi.dev.scadsoftware.com', types: <String, TypeInfo> {
    'TenantsAddResponse': TypeInfo(TypeOf.Class, create:() => TenantsAddResponse()),
    'TenantsAdd': TypeInfo(TypeOf.Class, create:() => TenantsAdd()),
});

Dart TenantsAdd 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 /tenants HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"mainZonesId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"mainZonesId":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}