GET | /personalTitles | Get Personal Titles |
---|
import 'package:servicestack/servicestack.dart';
class PersonalTitle implements IConvertible
{
/**
* Title
*/
// @ApiMember(Description="Title", IsRequired=true)
String? title;
/**
* Gender description(s)
*/
// @ApiMember(Description="Gender description(s)", IsRequired=true)
List<String>? gender;
/**
* Title translation
*/
// @ApiMember(Description="Title translation", IsRequired=true)
String? translation;
PersonalTitle({this.title,this.gender,this.translation});
PersonalTitle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
gender = JsonConverters.fromJson(json['gender'],'List<String>',context!);
translation = json['translation'];
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'gender': JsonConverters.toJson(gender,'List<String>',context!),
'translation': translation
};
getTypeName() => "PersonalTitle";
TypeContext? context = _ctx;
}
class GetPersonalTitlesResponse extends ListBase<PersonalTitle> implements IConvertible
{
final List<PersonalTitle> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
PersonalTitle operator [](int index) => l[index];
void operator []=(int index, PersonalTitle value) { l[index] = value; }
GetPersonalTitlesResponse();
GetPersonalTitlesResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetPersonalTitlesResponse";
TypeContext? context = _ctx;
}
class GetPersonalTitles implements IConvertible
{
/**
* Country Id
*/
// @ApiMember(Description="Country Id", IsRequired=true)
String? countryId;
GetPersonalTitles({this.countryId});
GetPersonalTitles.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
countryId = json['countryId'];
return this;
}
Map<String, dynamic> toJson() => {
'countryId': countryId
};
getTypeName() => "GetPersonalTitles";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'PersonalTitle': TypeInfo(TypeOf.Class, create:() => PersonalTitle()),
'GetPersonalTitlesResponse': TypeInfo(TypeOf.Class, create:() => GetPersonalTitlesResponse()),
'GetPersonalTitles': TypeInfo(TypeOf.Class, create:() => GetPersonalTitles()),
});
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 /personalTitles HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ArrayOfPersonalTitle xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel" />