POST | /api/MobileRegistration |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
/**
* MobileRegistrationRequires active-e AIMMobile
*/
@DataContract
public static class MobileRegistrationRequest extends BaseRequest
{
@DataMember
public String Name = null;
@DataMember
public String Phone = null;
@DataMember
public String Company = null;
@DataMember
public String Address1 = null;
@DataMember
public String Address2 = null;
@DataMember
public String City = null;
@DataMember
public String State = null;
@DataMember
public String Email = null;
@DataMember
public String Zip = null;
@DataMember
public String Password = null;
/**
* Should be Register or Confirm
*/
@DataMember
@ApiMember(DataType="string", Description="Should be Register or Confirm", IsRequired=true, Name="Action", ParameterType="query")
public String Action = null;
@DataMember
public String PasswordToken = null;
@DataMember
public Boolean OptIn1 = null;
@DataMember
public Boolean OptIn2 = null;
@DataMember
public Boolean OptIn3 = null;
public String getName() { return Name; }
public MobileRegistrationRequest setName(String value) { this.Name = value; return this; }
public String getPhone() { return Phone; }
public MobileRegistrationRequest setPhone(String value) { this.Phone = value; return this; }
public String getCompany() { return Company; }
public MobileRegistrationRequest setCompany(String value) { this.Company = value; return this; }
public String getAddress1() { return Address1; }
public MobileRegistrationRequest setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public MobileRegistrationRequest setAddress2(String value) { this.Address2 = value; return this; }
public String getCity() { return City; }
public MobileRegistrationRequest setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public MobileRegistrationRequest setState(String value) { this.State = value; return this; }
public String getEmail() { return Email; }
public MobileRegistrationRequest setEmail(String value) { this.Email = value; return this; }
public String getZip() { return Zip; }
public MobileRegistrationRequest setZip(String value) { this.Zip = value; return this; }
public String getPassword() { return Password; }
public MobileRegistrationRequest setPassword(String value) { this.Password = value; return this; }
public String getAction() { return Action; }
public MobileRegistrationRequest setAction(String value) { this.Action = value; return this; }
public String getPasswordToken() { return PasswordToken; }
public MobileRegistrationRequest setPasswordToken(String value) { this.PasswordToken = value; return this; }
public Boolean isOptIn1() { return OptIn1; }
public MobileRegistrationRequest setOptIn1(Boolean value) { this.OptIn1 = value; return this; }
public Boolean isOptIn2() { return OptIn2; }
public MobileRegistrationRequest setOptIn2(Boolean value) { this.OptIn2 = value; return this; }
public Boolean isOptIn3() { return OptIn3; }
public MobileRegistrationRequest setOptIn3(Boolean value) { this.OptIn3 = value; return this; }
}
@DataContract
public static class BaseRequest
{
/**
* This is your AIM API Key provided by Tri-Tech
*/
@DataMember
@ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
public String ApiKey = null;
@DataMember
@ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
public String OAuthToken = null;
public String getApiKey() { return ApiKey; }
public BaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
public String getOAuthToken() { return OAuthToken; }
public BaseRequest setOAuthToken(String value) { this.OAuthToken = value; return this; }
}
@DataContract
public static class MobileRegistrationResponse extends BaseResponse
{
}
@DataContract
public static class BaseResponse
{
/**
*
*/
@DataMember
@ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
public BaseResponseResult Status = null;
public BaseResponseResult getStatus() { return Status; }
public BaseResponse setStatus(BaseResponseResult value) { this.Status = value; return this; }
}
@DataContract
public static class BaseResponseResult
{
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
public String StatusCode = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
public String Login = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
public String ErrorCode = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
public String ErrorDisplayText = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
public String ErrorMessage = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
public String DomainName = null;
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
public String IpAddress = null;
public String getStatusCode() { return StatusCode; }
public BaseResponseResult setStatusCode(String value) { this.StatusCode = value; return this; }
public String getLogin() { return Login; }
public BaseResponseResult setLogin(String value) { this.Login = value; return this; }
public String getErrorCode() { return ErrorCode; }
public BaseResponseResult setErrorCode(String value) { this.ErrorCode = value; return this; }
public String getErrorDisplayText() { return ErrorDisplayText; }
public BaseResponseResult setErrorDisplayText(String value) { this.ErrorDisplayText = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public BaseResponseResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getDomainName() { return DomainName; }
public BaseResponseResult setDomainName(String value) { this.DomainName = value; return this; }
public String getIpAddress() { return IpAddress; }
public BaseResponseResult setIpAddress(String value) { this.IpAddress = value; return this; }
}
}
Java MobileRegistrationRequest DTOs
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 /api/MobileRegistration HTTP/1.1
Host: active-ewebservice.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<MobileRegistrationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<ApiKey>String</ApiKey>
<OAuthToken>String</OAuthToken>
<Action>String</Action>
<Address1>String</Address1>
<Address2>String</Address2>
<City>String</City>
<Company>String</Company>
<Email>String</Email>
<Name>String</Name>
<OptIn1>false</OptIn1>
<OptIn2>false</OptIn2>
<OptIn3>false</OptIn3>
<Password>String</Password>
<PasswordToken>String</PasswordToken>
<Phone>String</Phone>
<State>String</State>
<Zip>String</Zip>
</MobileRegistrationRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <MobileRegistrationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService"> <Status> <DomainName>String</DomainName> <ErrorCode>String</ErrorCode> <ErrorDisplayText>String</ErrorDisplayText> <ErrorMessage>String</ErrorMessage> <IpAddress>String</IpAddress> <Login>String</Login> <StatusCode>String</StatusCode> </Status> </MobileRegistrationResponse>