| POST | /consumerinitiation |
|---|
import 'package:servicestack/servicestack.dart';
class ConsumerInitiation implements IPost, IConvertible
{
/**
* First name of the consumer
*/
// @ApiMember(Description="First name of the consumer", IsRequired=true)
String? FirstName;
/**
* Last name of the consumer
*/
// @ApiMember(Description="Last name of the consumer", IsRequired=true)
String? LastName;
/**
* Program name
*/
// @ApiMember(Description="Program name", IsRequired=true)
String? Program;
/**
* Company name
*/
// @ApiMember(Description="Company name", IsRequired=true)
String? CompanyName;
/**
* Mobile phone number
*/
// @ApiMember(Description="Mobile phone number")
String? MobileNumber;
/**
* Preferred email address
*/
// @ApiMember(Description="Preferred email address", IsRequired=true)
String? PreferredEmail;
/**
* Current work location state
*/
// @ApiMember(Description="Current work location state")
String? CurrentWorkState;
/**
* Current work location country
*/
// @ApiMember(Description="Current work location country")
String? CurrentWorkCountry;
/**
* Destination work location state
*/
// @ApiMember(Description="Destination work location state")
String? DestinationWorkState;
/**
* Destination work location country
*/
// @ApiMember(Description="Destination work location country")
String? DestinationWorkCountry;
/**
* Preferred work location state
*/
// @ApiMember(Description="Preferred work location state")
String? PreferredWorkState;
/**
* Preferred work location country
*/
// @ApiMember(Description="Preferred work location country")
String? PreferredWorkCountry;
ConsumerInitiation({this.FirstName,this.LastName,this.Program,this.CompanyName,this.MobileNumber,this.PreferredEmail,this.CurrentWorkState,this.CurrentWorkCountry,this.DestinationWorkState,this.DestinationWorkCountry,this.PreferredWorkState,this.PreferredWorkCountry});
ConsumerInitiation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FirstName = json['FirstName'];
LastName = json['LastName'];
Program = json['Program'];
CompanyName = json['CompanyName'];
MobileNumber = json['MobileNumber'];
PreferredEmail = json['PreferredEmail'];
CurrentWorkState = json['CurrentWorkState'];
CurrentWorkCountry = json['CurrentWorkCountry'];
DestinationWorkState = json['DestinationWorkState'];
DestinationWorkCountry = json['DestinationWorkCountry'];
PreferredWorkState = json['PreferredWorkState'];
PreferredWorkCountry = json['PreferredWorkCountry'];
return this;
}
Map<String, dynamic> toJson() => {
'FirstName': FirstName,
'LastName': LastName,
'Program': Program,
'CompanyName': CompanyName,
'MobileNumber': MobileNumber,
'PreferredEmail': PreferredEmail,
'CurrentWorkState': CurrentWorkState,
'CurrentWorkCountry': CurrentWorkCountry,
'DestinationWorkState': DestinationWorkState,
'DestinationWorkCountry': DestinationWorkCountry,
'PreferredWorkState': PreferredWorkState,
'PreferredWorkCountry': PreferredWorkCountry
};
getTypeName() => "ConsumerInitiation";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'initiation_test.sirva.com', types: <String, TypeInfo> {
'ConsumerInitiation': TypeInfo(TypeOf.Class, create:() => ConsumerInitiation()),
});
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.
POST /consumerinitiation HTTP/1.1
Host: initiation-test.sirva.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ConsumerInitiation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Client_Initiations.ServiceModel">
<CompanyName>String</CompanyName>
<CurrentWorkCountry>String</CurrentWorkCountry>
<CurrentWorkState>String</CurrentWorkState>
<DestinationWorkCountry>String</DestinationWorkCountry>
<DestinationWorkState>String</DestinationWorkState>
<FirstName>String</FirstName>
<LastName>String</LastName>
<MobileNumber>String</MobileNumber>
<PreferredEmail>String</PreferredEmail>
<PreferredWorkCountry>String</PreferredWorkCountry>
<PreferredWorkState>String</PreferredWorkState>
<Program>String</Program>
</ConsumerInitiation>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />