POST | /update-profile |
---|
import 'package:servicestack/servicestack.dart';
class UpdateProfileResponse implements IConvertible
{
int? responseCode;
String? responseMessage;
UpdateProfileResponse({this.responseCode,this.responseMessage});
UpdateProfileResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseCode = json['responseCode'];
responseMessage = json['responseMessage'];
return this;
}
Map<String, dynamic> toJson() => {
'responseCode': responseCode,
'responseMessage': responseMessage
};
getTypeName() => "UpdateProfileResponse";
TypeContext? context = _ctx;
}
class UpdateProfileRequest implements IConvertible
{
String? firstName;
String? lastName;
String? country;
String? language;
String? birthDate;
String? address;
String? address2;
String? city;
String? state;
String? zipCode;
String? phoneNumber;
UpdateProfileRequest({this.firstName,this.lastName,this.country,this.language,this.birthDate,this.address,this.address2,this.city,this.state,this.zipCode,this.phoneNumber});
UpdateProfileRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
firstName = json['firstName'];
lastName = json['lastName'];
country = json['country'];
language = json['language'];
birthDate = json['birthDate'];
address = json['address'];
address2 = json['address2'];
city = json['city'];
state = json['state'];
zipCode = json['zipCode'];
phoneNumber = json['phoneNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'firstName': firstName,
'lastName': lastName,
'country': country,
'language': language,
'birthDate': birthDate,
'address': address,
'address2': address2,
'city': city,
'state': state,
'zipCode': zipCode,
'phoneNumber': phoneNumber
};
getTypeName() => "UpdateProfileRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'portal_api.migrantleap.com', types: <String, TypeInfo> {
'UpdateProfileResponse': TypeInfo(TypeOf.Class, create:() => UpdateProfileResponse()),
'UpdateProfileRequest': TypeInfo(TypeOf.Class, create:() => UpdateProfileRequest()),
});
Dart UpdateProfileRequest DTOs
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.
POST /update-profile HTTP/1.1
Host: portal-api.migrantleap.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"firstName":"String","lastName":"String","country":"String","language":"String","birthDate":"String","address":"String","address2":"String","city":"String","state":"String","zipCode":"String","phoneNumber":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"responseCode":0,"responseMessage":"String"}