sfgboxapi

<back to all web services

GrowplansVarietiesAdd

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

class GrowplansVarietiesAddResponse implements IConvertible
{
    // @DataMember(Order=2)
    int? growplansBoxesId;

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

    // @DataMember(Order=4)
    int? varietiesId;

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

    GrowplansVarietiesAddResponse({this.growplansBoxesId,this.cropsId,this.varietiesId,this.responseStatus});
    GrowplansVarietiesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

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

    // @DataMember(Order=4)
    // @Validate(Validator="NotNull")
    int? varietiesId;

    GrowplansVarietiesAdd({this.growplansBoxesId,this.cropsId,this.varietiesId});
    GrowplansVarietiesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'growplansBoxesId': growplansBoxesId,
        'cropsId': cropsId,
        'varietiesId': varietiesId
    };

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

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

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

{"growplansBoxesId":0,"cropsId":0,"varietiesId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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