| GET | /warranty/v1/promotertypes/{promoterTypeId*} |
|---|
import 'package:servicestack/servicestack.dart';
class BaseRequest<TResponse> implements IRequest, IConvertible
{
String? sid;
String? app;
String? _os;
String? _appVersion;
String? _searchMethod;
BaseRequest({this.sid,this.app,this._os,this._appVersion,this._searchMethod});
BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
sid = json['sid'];
app = json['app'];
_os = json['_os'];
_appVersion = json['_appVersion'];
_searchMethod = json['_searchMethod'];
return this;
}
Map<String, dynamic> toJson() => {
'sid': sid,
'app': app,
'_os': _os,
'_appVersion': _appVersion,
'_searchMethod': _searchMethod
};
getTypeName() => "BaseRequest<$TResponse>";
TypeContext? context = _ctx;
}
class PromoterType implements IConvertible
{
String? promoterTypeId;
String? description;
PromoterType({this.promoterTypeId,this.description});
PromoterType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
promoterTypeId = json['promoterTypeId'];
description = json['description'];
return this;
}
Map<String, dynamic> toJson() => {
'promoterTypeId': promoterTypeId,
'description': description
};
getTypeName() => "PromoterType";
TypeContext? context = _ctx;
}
class GetPromoterTypesResponse implements IConvertible
{
List<PromoterType>? promoterTypes;
GetPromoterTypesResponse({this.promoterTypes});
GetPromoterTypesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
promoterTypes = JsonConverters.fromJson(json['promoterTypes'],'List<PromoterType>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'promoterTypes': JsonConverters.toJson(promoterTypes,'List<PromoterType>',context!)
};
getTypeName() => "GetPromoterTypesResponse";
TypeContext? context = _ctx;
}
class GetPromoterTypes extends BaseRequest<GetPromoterTypesResponse> implements IConvertible
{
String? promoterTypeId;
GetPromoterTypes({this.promoterTypeId});
GetPromoterTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
promoterTypeId = json['promoterTypeId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'promoterTypeId': promoterTypeId
});
getTypeName() => "GetPromoterTypes";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'qp_microservices_booster.richemont.com', types: <String, TypeInfo> {
'BaseRequest<TResponse>': TypeInfo(TypeOf.Class, create:() => BaseRequest<TResponse>()),
'PromoterType': TypeInfo(TypeOf.Class, create:() => PromoterType()),
'GetPromoterTypesResponse': TypeInfo(TypeOf.Class, create:() => GetPromoterTypesResponse()),
'List<PromoterType>': TypeInfo(TypeOf.Class, create:() => <PromoterType>[]),
'GetPromoterTypes': TypeInfo(TypeOf.Class, create:() => GetPromoterTypes()),
});
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/v1/promotertypes/{promoterTypeId*} HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"promoterTypes":[{"promoterTypeId":"String","description":"String"}]}