| GET | /productInstances |
|---|
import 'package:servicestack/servicestack.dart';
class FindProductInstances implements IConvertible
{
String? id;
String? qry;
int? currentPage;
int? pageSize;
FindProductInstances({this.id,this.qry,this.currentPage,this.pageSize});
FindProductInstances.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
qry = json['qry'];
currentPage = json['currentPage'];
pageSize = json['pageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'qry': qry,
'currentPage': currentPage,
'pageSize': pageSize
};
getTypeName() => "FindProductInstances";
TypeContext? context = _ctx;
}
class ProductProvider implements IConvertible
{
String? id;
String? name;
ProductProvider({this.id,this.name});
ProductProvider.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name
};
getTypeName() => "ProductProvider";
TypeContext? context = _ctx;
}
class PaginatedResult<T> implements IConvertible
{
List<ProductProvider>? data;
int? currentPage;
int? pageSize;
int? totalItems;
int? totalPages;
PaginatedResult({this.data,this.currentPage,this.pageSize,this.totalItems,this.totalPages});
PaginatedResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'List<ProductProvider>',context!);
currentPage = json['currentPage'];
pageSize = json['pageSize'];
totalItems = json['totalItems'];
totalPages = json['totalPages'];
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'List<ProductProvider>',context!),
'currentPage': currentPage,
'pageSize': pageSize,
'totalItems': totalItems,
'totalPages': totalPages
};
getTypeName() => "PaginatedResult<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'fbihtaapi.bettor.webhop.biz', types: <String, TypeInfo> {
'FindProductInstances': TypeInfo(TypeOf.Class, create:() => FindProductInstances()),
'ProductProvider': TypeInfo(TypeOf.Class, create:() => ProductProvider()),
'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
'List<ProductProvider>': TypeInfo(TypeOf.Class, create:() => <ProductProvider>[]),
});
Dart FindProductInstances DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /productInstances HTTP/1.1 Host: fbihtaapi.bettor.webhop.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PaginatedResultOfProductInstancednWDpBBx xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FBiHBetting.Aggregator.ReadModel">
<CurrentPage>0</CurrentPage>
<Data>
<ProductInstance>
<Id>String</Id>
<Name>String</Name>
<Product>
<Id>String</Id>
<Value>String</Value>
</Product>
</ProductInstance>
</Data>
<PageSize>0</PageSize>
<TotalItems>0</TotalItems>
<TotalPages>0</TotalPages>
</PaginatedResultOfProductInstancednWDpBBx>