GET | /user/{userid}/commoditycode |
---|
import 'package:servicestack/servicestack.dart';
abstract class ResponseBase
{
ResponseStatus? ResponseStatus;
ResponseBase({this.ResponseStatus});
ResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "ResponseBase";
TypeContext? context = _ctx;
}
class CommodityCodeSimple implements IConvertible
{
int? Id;
String? CategoryCode;
String? CategoryName;
String? SubCategoryCode;
String? SubCategoryName;
String? MainCategoryCode;
String? MainCategoryName;
CommodityCodeSimple({this.Id,this.CategoryCode,this.CategoryName,this.SubCategoryCode,this.SubCategoryName,this.MainCategoryCode,this.MainCategoryName});
CommodityCodeSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
CategoryCode = json['CategoryCode'];
CategoryName = json['CategoryName'];
SubCategoryCode = json['SubCategoryCode'];
SubCategoryName = json['SubCategoryName'];
MainCategoryCode = json['MainCategoryCode'];
MainCategoryName = json['MainCategoryName'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'CategoryCode': CategoryCode,
'CategoryName': CategoryName,
'SubCategoryCode': SubCategoryCode,
'SubCategoryName': SubCategoryName,
'MainCategoryCode': MainCategoryCode,
'MainCategoryName': MainCategoryName
};
getTypeName() => "CommodityCodeSimple";
TypeContext? context = _ctx;
}
class ApplicationUserCommodityCodeSimple extends CommodityCodeSimple implements IConvertible
{
int? CommodityCodeId;
int? UserCommodityCodeId;
ApplicationUserCommodityCodeSimple({this.CommodityCodeId,this.UserCommodityCodeId});
ApplicationUserCommodityCodeSimple.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
CommodityCodeId = json['CommodityCodeId'];
UserCommodityCodeId = json['UserCommodityCodeId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'CommodityCodeId': CommodityCodeId,
'UserCommodityCodeId': UserCommodityCodeId
});
getTypeName() => "ApplicationUserCommodityCodeSimple";
TypeContext? context = _ctx;
}
class BrowseAllApplicationUserCommodityCodeResponse extends ResponseBase implements IConvertible
{
List<ApplicationUserCommodityCodeSimple>? CommodityCodes;
BrowseAllApplicationUserCommodityCodeResponse({this.CommodityCodes});
BrowseAllApplicationUserCommodityCodeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
CommodityCodes = JsonConverters.fromJson(json['CommodityCodes'],'List<ApplicationUserCommodityCodeSimple>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'CommodityCodes': JsonConverters.toJson(CommodityCodes,'List<ApplicationUserCommodityCodeSimple>',context!)
});
getTypeName() => "BrowseAllApplicationUserCommodityCodeResponse";
TypeContext? context = _ctx;
}
class BrowseAllApplicationUserCommodityCode implements IGet, IConvertible
{
int? UserId;
BrowseAllApplicationUserCommodityCode({this.UserId});
BrowseAllApplicationUserCommodityCode.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId
};
getTypeName() => "BrowseAllApplicationUserCommodityCode";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
'ResponseBase': TypeInfo(TypeOf.AbstractClass),
'CommodityCodeSimple': TypeInfo(TypeOf.Class, create:() => CommodityCodeSimple()),
'ApplicationUserCommodityCodeSimple': TypeInfo(TypeOf.Class, create:() => ApplicationUserCommodityCodeSimple()),
'BrowseAllApplicationUserCommodityCodeResponse': TypeInfo(TypeOf.Class, create:() => BrowseAllApplicationUserCommodityCodeResponse()),
'List<ApplicationUserCommodityCodeSimple>': TypeInfo(TypeOf.Class, create:() => <ApplicationUserCommodityCodeSimple>[]),
'BrowseAllApplicationUserCommodityCode': TypeInfo(TypeOf.Class, create:() => BrowseAllApplicationUserCommodityCode()),
});
Dart BrowseAllApplicationUserCommodityCode DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /user/{userid}/commoditycode HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"CommodityCodes":[{"CommodityCodeId":0,"UserCommodityCodeId":0,"Id":0,"CategoryCode":"String","CategoryName":"String","SubCategoryCode":"String","SubCategoryName":"String","MainCategoryCode":"String","MainCategoryName":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}