| GET | /hobbies/{brand}/{posCode} | Get customer hobbies |
|---|
import 'package:servicestack/servicestack.dart';
class Hobby implements IConvertible
{
/**
* Hobby description
*/
// @ApiMember(Description="Hobby description", IsRequired=true)
String? hobby;
/**
* SAP Hobby ID, e.g. 'ART'
*/
// @ApiMember(Description="SAP Hobby ID, e.g. 'ART'", IsRequired=true)
String? sapHobbyId;
/**
* Hobby description translation
*/
// @ApiMember(Description="Hobby description translation")
String? translation;
Hobby({this.hobby,this.sapHobbyId,this.translation});
Hobby.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
hobby = json['hobby'];
sapHobbyId = json['sapHobbyId'];
translation = json['translation'];
return this;
}
Map<String, dynamic> toJson() => {
'hobby': hobby,
'sapHobbyId': sapHobbyId,
'translation': translation
};
getTypeName() => "Hobby";
TypeContext? context = _ctx;
}
class GetHobbiesResponse extends ListBase<Hobby> implements IConvertible
{
final List<Hobby> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
Hobby operator [](int index) => l[index];
void operator []=(int index, Hobby value) { l[index] = value; }
GetHobbiesResponse();
GetHobbiesResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetHobbiesResponse";
TypeContext? context = _ctx;
}
class GetHobbies implements IConvertible
{
/**
* Brand
*/
// @ApiMember(Description="Brand", IsRequired=true)
String? brand;
/**
* POS Legacy
*/
// @ApiMember(Description="POS Legacy", IsRequired=true)
String? posCode;
GetHobbies({this.brand,this.posCode});
GetHobbies.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
posCode = json['posCode'];
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCode': posCode
};
getTypeName() => "GetHobbies";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'Hobby': TypeInfo(TypeOf.Class, create:() => Hobby()),
'GetHobbiesResponse': TypeInfo(TypeOf.Class, create:() => GetHobbiesResponse()),
'GetHobbies': TypeInfo(TypeOf.Class, create:() => GetHobbies()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /hobbies/{brand}/{posCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length []