sfgboxapi

<back to all web services

ProductsRecipesEdit

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

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

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

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

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

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

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

    ProductsRecipesEditResponse({this.id,this.tenantsId,this.zonesId,this.productsId,this.recipeUrl,this.responseStatus});
    ProductsRecipesEditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'id': id,
        'tenantsId': tenantsId,
        'zonesId': zonesId,
        'productsId': productsId,
        'recipeUrl': recipeUrl,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

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

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

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

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

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

    ProductsRecipesEdit({this.id,this.tenantsId,this.zonesId,this.productsId,this.recipeUrl});
    ProductsRecipesEdit.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        tenantsId = json['tenantsId'];
        zonesId = json['zonesId'];
        productsId = json['productsId'];
        recipeUrl = json['recipeUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'tenantsId': tenantsId,
        'zonesId': zonesId,
        'productsId': productsId,
        'recipeUrl': recipeUrl
    };

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

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

Dart ProductsRecipesEdit 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.

PUT /products_recipes/{Id} HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"tenantsId":0,"zonesId":0,"productsId":0,"recipeUrl":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":0,"tenantsId":0,"zonesId":0,"productsId":0,"recipeUrl":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}