All Verbs | /account |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
import 'dart:collection';
class GetUserDetails implements IConvertible
{
GetUserDetails();
GetUserDetails.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetUserDetails";
TypeContext? context = _ctx;
}
class GetUserDetailsResponse implements IConvertible
{
String? provider;
String? userId;
String? userName;
String? fullName;
String? displayName;
String? firstName;
String? lastName;
String? company;
String? email;
String? phoneNumber;
DateTime? birthDate;
String? birthDateRaw;
String? address;
String? address2;
String? city;
String? state;
String? country;
String? culture;
String? gender;
String? language;
String? mailAddress;
String? nickname;
String? postalCode;
String? timeZone;
GetUserDetailsResponse({this.provider,this.userId,this.userName,this.fullName,this.displayName,this.firstName,this.lastName,this.company,this.email,this.phoneNumber,this.birthDate,this.birthDateRaw,this.address,this.address2,this.city,this.state,this.country,this.culture,this.gender,this.language,this.mailAddress,this.nickname,this.postalCode,this.timeZone});
GetUserDetailsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
provider = json['provider'];
userId = json['userId'];
userName = json['userName'];
fullName = json['fullName'];
displayName = json['displayName'];
firstName = json['firstName'];
lastName = json['lastName'];
company = json['company'];
email = json['email'];
phoneNumber = json['phoneNumber'];
birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
birthDateRaw = json['birthDateRaw'];
address = json['address'];
address2 = json['address2'];
city = json['city'];
state = json['state'];
country = json['country'];
culture = json['culture'];
gender = json['gender'];
language = json['language'];
mailAddress = json['mailAddress'];
nickname = json['nickname'];
postalCode = json['postalCode'];
timeZone = json['timeZone'];
return this;
}
Map<String, dynamic> toJson() => {
'provider': provider,
'userId': userId,
'userName': userName,
'fullName': fullName,
'displayName': displayName,
'firstName': firstName,
'lastName': lastName,
'company': company,
'email': email,
'phoneNumber': phoneNumber,
'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
'birthDateRaw': birthDateRaw,
'address': address,
'address2': address2,
'city': city,
'state': state,
'country': country,
'culture': culture,
'gender': gender,
'language': language,
'mailAddress': mailAddress,
'nickname': nickname,
'postalCode': postalCode,
'timeZone': timeZone
};
getTypeName() => "GetUserDetailsResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: <String, TypeInfo> {
'GetUserDetails': TypeInfo(TypeOf.Class, create:() => GetUserDetails()),
'GetUserDetailsResponse': TypeInfo(TypeOf.Class, create:() => GetUserDetailsResponse()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /account HTTP/1.1
Host: test.servicestack.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { provider: String, userId: String, userName: String, fullName: String, displayName: String, firstName: String, lastName: String, company: String, email: String, phoneNumber: String, birthDate: 0001-01-01, birthDateRaw: String, address: String, address2: String, city: String, state: String, country: String, culture: String, gender: String, language: String, mailAddress: String, nickname: String, postalCode: String, timeZone: String }