| POST | /products_recipes |
|---|
import 'package:servicestack/servicestack.dart';
class ProductsRecipesAddResponse implements IConvertible
{
// @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;
ProductsRecipesAddResponse({this.tenantsId,this.zonesId,this.productsId,this.recipeUrl,this.responseStatus});
ProductsRecipesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
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() => {
'tenantsId': tenantsId,
'zonesId': zonesId,
'productsId': productsId,
'recipeUrl': recipeUrl,
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "ProductsRecipesAddResponse";
TypeContext? context = _ctx;
}
// @DataContract
class ProductsRecipesAdd implements IConvertible
{
// @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;
ProductsRecipesAdd({this.tenantsId,this.zonesId,this.productsId,this.recipeUrl});
ProductsRecipesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
tenantsId = json['tenantsId'];
zonesId = json['zonesId'];
productsId = json['productsId'];
recipeUrl = json['recipeUrl'];
return this;
}
Map<String, dynamic> toJson() => {
'tenantsId': tenantsId,
'zonesId': zonesId,
'productsId': productsId,
'recipeUrl': recipeUrl
};
getTypeName() => "ProductsRecipesAdd";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'sfgboxapi.dev.scadsoftware.com', types: <String, TypeInfo> {
'ProductsRecipesAddResponse': TypeInfo(TypeOf.Class, create:() => ProductsRecipesAddResponse()),
'ProductsRecipesAdd': TypeInfo(TypeOf.Class, create:() => ProductsRecipesAdd()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /products_recipes HTTP/1.1
Host: sfgboxapi.dev.scadsoftware.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"tenantsId":0,"zonesId":0,"productsId":0,"recipeUrl":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"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"}}}