| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"FirstName":"String","LastName":"String","Program":"String","CompanyName":"String","MobileNumber":"String","PreferredEmail":"String","CurrentWorkState":"String","CurrentWorkCountry":"String","DestinationWorkState":"String","DestinationWorkCountry":"String","PreferredWorkState":"String","PreferredWorkCountry":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}