My ServiceStack Backend

<back to all web services

UpdateProfileRequest

The following routes are available for this service:
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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateProfileRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MigrantLeap.PortalBackend.Models">
  <Address>String</Address>
  <Address2>String</Address2>
  <BirthDate>String</BirthDate>
  <City>String</City>
  <Country>String</Country>
  <FirstName>String</FirstName>
  <Language>String</Language>
  <LastName>String</LastName>
  <PhoneNumber>String</PhoneNumber>
  <State>String</State>
  <ZipCode>String</ZipCode>
</UpdateProfileRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UpdateProfileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MigrantLeap.PortalBackend.Models">
  <ResponseCode>0</ResponseCode>
  <ResponseMessage>String</ResponseMessage>
</UpdateProfileResponse>