| GET | /bettors |
|---|
import 'package:servicestack/servicestack.dart';
class FindBettors implements IConvertible
{
String? id;
String? qry;
int? currentPage;
int? pageSize;
FindBettors({this.id,this.qry,this.currentPage,this.pageSize});
FindBettors.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() => "FindBettors";
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> {
'FindBettors': TypeInfo(TypeOf.Class, create:() => FindBettors()),
'ProductProvider': TypeInfo(TypeOf.Class, create:() => ProductProvider()),
'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
'List<ProductProvider>': TypeInfo(TypeOf.Class, create:() => <ProductProvider>[]),
});
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 /bettors HTTP/1.1 Host: fbihtaapi.bettor.webhop.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PaginatedResultOfBettordnWDpBBx xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FBiHBetting.Aggregator.ReadModel">
<CurrentPage>0</CurrentPage>
<Data>
<Bettor>
<ActivationDate>0001-01-01T00:00:00</ActivationDate>
<BankTransactionAccountNumber>String</BankTransactionAccountNumber>
<BettorAddress>
<City>
<Id>String</Id>
<Value>String</Value>
</City>
<PostalCode>String</PostalCode>
<Street>String</Street>
</BettorAddress>
<BettorType>Internet</BettorType>
<DateOfBirth>0001-01-01T00:00:00</DateOfBirth>
<Email>String</Email>
<FullName>String</FullName>
<Id>String</Id>
<JMBG>String</JMBG>
<OrganizationTaxAuthorityId>String</OrganizationTaxAuthorityId>
<PhoneNumber>String</PhoneNumber>
<Username>String</Username>
</Bettor>
</Data>
<PageSize>0</PageSize>
<TotalItems>0</TotalItems>
<TotalPages>0</TotalPages>
</PaginatedResultOfBettordnWDpBBx>