| GET | /warranty/promotertype | Get a list of Promoter Types |
|---|
import 'package:servicestack/servicestack.dart';
class PromoterTypeItem implements IConvertible
{
/**
* Code of Promoter Type
*/
// @ApiMember(Description="Code of Promoter Type", IsRequired=true)
String? code;
/**
* Description of Promoter Type
*/
// @ApiMember(Description="Description of Promoter Type", IsRequired=true)
String? description;
PromoterTypeItem({this.code,this.description});
PromoterTypeItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
description = json['description'];
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'description': description
};
getTypeName() => "PromoterTypeItem";
TypeContext? context = _ctx;
}
class GetPromoterTypeResponse extends ListBase<PromoterTypeItem> implements IConvertible
{
final List<PromoterTypeItem> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
PromoterTypeItem operator [](int index) => l[index];
void operator []=(int index, PromoterTypeItem value) { l[index] = value; }
GetPromoterTypeResponse();
GetPromoterTypeResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetPromoterTypeResponse";
TypeContext? context = _ctx;
}
class GetPromoterType implements IConvertible
{
GetPromoterType();
GetPromoterType.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetPromoterType";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'PromoterTypeItem': TypeInfo(TypeOf.Class, create:() => PromoterTypeItem()),
'GetPromoterTypeResponse': TypeInfo(TypeOf.Class, create:() => GetPromoterTypeResponse()),
'GetPromoterType': TypeInfo(TypeOf.Class, create:() => GetPromoterType()),
});
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 /warranty/promotertype HTTP/1.1 Host: dev-api-booster.richemont.com Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length []