sfgboxapi

<back to all web services

GrowplansResultsEdit

Requires Authentication
The following routes are available for this service:
PUT/growplans_results/{Id}
import 'package:servicestack/servicestack.dart';

class GrowplansResultsEditResponse implements IConvertible
{
    // @DataMember(Order=1)
    int? id;

    // @DataMember(Order=2)
    int? growplansBoxesId;

    // @DataMember(Order=3)
    DateTime? plantDate;

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

    // @DataMember(Order=5)
    double? height;

    // @DataMember(Order=6)
    double? plantPerSquare;

    // @DataMember(Order=7)
    int? cropsCylindersId;

    // @DataMember(Order=8)
    int? age;

    // @DataMember(Order=9)
    int? maxAge;

    // @DataMember(Order=10)
    int? growplansVarietiesId;

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

    GrowplansResultsEditResponse({this.id,this.growplansBoxesId,this.plantDate,this.grid,this.height,this.plantPerSquare,this.cropsCylindersId,this.age,this.maxAge,this.growplansVarietiesId,this.responseStatus});
    GrowplansResultsEditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        growplansBoxesId = json['growplansBoxesId'];
        plantDate = JsonConverters.fromJson(json['plantDate'],'DateTime',context!);
        grid = json['grid'];
        height = JsonConverters.toDouble(json['height']);
        plantPerSquare = JsonConverters.toDouble(json['plantPerSquare']);
        cropsCylindersId = json['cropsCylindersId'];
        age = json['age'];
        maxAge = json['maxAge'];
        growplansVarietiesId = json['growplansVarietiesId'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'growplansBoxesId': growplansBoxesId,
        'plantDate': JsonConverters.toJson(plantDate,'DateTime',context!),
        'grid': grid,
        'height': height,
        'plantPerSquare': plantPerSquare,
        'cropsCylindersId': cropsCylindersId,
        'age': age,
        'maxAge': maxAge,
        'growplansVarietiesId': growplansVarietiesId,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

// @DataContract
class GrowplansResultsEdit implements IConvertible
{
    // @DataMember(Order=1)
    // @Validate(Validator="NotNull")
    int? id;

    // @DataMember(Order=2)
    // @Validate(Validator="NotNull")
    int? growplansBoxesId;

    // @DataMember(Order=3)
    DateTime? plantDate;

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

    // @DataMember(Order=5)
    double? height;

    // @DataMember(Order=6)
    double? plantPerSquare;

    // @DataMember(Order=7)
    // @Validate(Validator="NotNull")
    int? cropsCylindersId;

    // @DataMember(Order=8)
    int? age;

    // @DataMember(Order=9)
    int? maxAge;

    // @DataMember(Order=10)
    int? growplansVarietiesId;

    GrowplansResultsEdit({this.id,this.growplansBoxesId,this.plantDate,this.grid,this.height,this.plantPerSquare,this.cropsCylindersId,this.age,this.maxAge,this.growplansVarietiesId});
    GrowplansResultsEdit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        growplansBoxesId = json['growplansBoxesId'];
        plantDate = JsonConverters.fromJson(json['plantDate'],'DateTime',context!);
        grid = json['grid'];
        height = JsonConverters.toDouble(json['height']);
        plantPerSquare = JsonConverters.toDouble(json['plantPerSquare']);
        cropsCylindersId = json['cropsCylindersId'];
        age = json['age'];
        maxAge = json['maxAge'];
        growplansVarietiesId = json['growplansVarietiesId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'growplansBoxesId': growplansBoxesId,
        'plantDate': JsonConverters.toJson(plantDate,'DateTime',context!),
        'grid': grid,
        'height': height,
        'plantPerSquare': plantPerSquare,
        'cropsCylindersId': cropsCylindersId,
        'age': age,
        'maxAge': maxAge,
        'growplansVarietiesId': growplansVarietiesId
    };

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

TypeContext _ctx = TypeContext(library: 'api.sfgtec.com', types: <String, TypeInfo> {
    'GrowplansResultsEditResponse': TypeInfo(TypeOf.Class, create:() => GrowplansResultsEditResponse()),
    'GrowplansResultsEdit': TypeInfo(TypeOf.Class, create:() => GrowplansResultsEdit()),
});

Dart GrowplansResultsEdit DTOs

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

HTTP + JSON

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

PUT /growplans_results/{Id} HTTP/1.1 
Host: api.sfgtec.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0,"growplansBoxesId":0,"plantDate":"\/Date(-62135596800000-0000)\/","grid":"String","height":0,"plantPerSquare":0,"cropsCylindersId":0,"age":0,"maxAge":0,"growplansVarietiesId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"growplansBoxesId":0,"plantDate":"\/Date(-62135596800000-0000)\/","grid":"String","height":0,"plantPerSquare":0,"cropsCylindersId":0,"age":0,"maxAge":0,"growplansVarietiesId":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}