POST | /upgrade-lead |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class LeadUpgrade implements IPost
{
public BigDecimal beeNumber = null;
public String emailAddress = null;
public BigDecimal mentorBeeNumber = null;
public String language = null;
public Date birthDate = null;
public NAVPhoneUpdate primaryPhone = null;
public NAVPhoneUpdate additionalPhone = null;
public NAVAddressUpdate billingAddress = null;
public NAVAddressUpdate shippingAddress = null;
public String governmentId = null;
public NAVTermsUpdate termsAgreement = null;
public NAVTermsUpdate electronicAgreement = null;
public String agentId = null;
public String kitNumber = null;
public BigDecimal kitPrice = null;
public String paymentMethod = null;
public BigDecimal taxAmount = null;
public BigDecimal donationAmount = null;
public String publicityTag = null;
public String eStoreUrl = null;
public String apptYYYYCC = null;
public String apptHHMMSS = null;
public String apptYYYYMMDD = null;
public NAVTermsUpdate privacyPolicyAgreement = null;
public NAVTermsUpdate websiteTermsOfUseAgreement = null;
public NAVTermsUpdate ageVerificationAgreement = null;
public NAVCASLTermsUpdate caslStatementAgreement = null;
public BigDecimal getBeeNumber() { return beeNumber; }
public LeadUpgrade setBeeNumber(BigDecimal value) { this.beeNumber = value; return this; }
public String getEmailAddress() { return emailAddress; }
public LeadUpgrade setEmailAddress(String value) { this.emailAddress = value; return this; }
public BigDecimal getMentorBeeNumber() { return mentorBeeNumber; }
public LeadUpgrade setMentorBeeNumber(BigDecimal value) { this.mentorBeeNumber = value; return this; }
public String getLanguage() { return language; }
public LeadUpgrade setLanguage(String value) { this.language = value; return this; }
public Date getBirthDate() { return birthDate; }
public LeadUpgrade setBirthDate(Date value) { this.birthDate = value; return this; }
public NAVPhoneUpdate getPrimaryPhone() { return primaryPhone; }
public LeadUpgrade setPrimaryPhone(NAVPhoneUpdate value) { this.primaryPhone = value; return this; }
public NAVPhoneUpdate getAdditionalPhone() { return additionalPhone; }
public LeadUpgrade setAdditionalPhone(NAVPhoneUpdate value) { this.additionalPhone = value; return this; }
public NAVAddressUpdate getBillingAddress() { return billingAddress; }
public LeadUpgrade setBillingAddress(NAVAddressUpdate value) { this.billingAddress = value; return this; }
public NAVAddressUpdate getShippingAddress() { return shippingAddress; }
public LeadUpgrade setShippingAddress(NAVAddressUpdate value) { this.shippingAddress = value; return this; }
public String getGovernmentId() { return governmentId; }
public LeadUpgrade setGovernmentId(String value) { this.governmentId = value; return this; }
public NAVTermsUpdate getTermsAgreement() { return termsAgreement; }
public LeadUpgrade setTermsAgreement(NAVTermsUpdate value) { this.termsAgreement = value; return this; }
public NAVTermsUpdate getElectronicAgreement() { return electronicAgreement; }
public LeadUpgrade setElectronicAgreement(NAVTermsUpdate value) { this.electronicAgreement = value; return this; }
public String getAgentId() { return agentId; }
public LeadUpgrade setAgentId(String value) { this.agentId = value; return this; }
public String getKitNumber() { return kitNumber; }
public LeadUpgrade setKitNumber(String value) { this.kitNumber = value; return this; }
public BigDecimal getKitPrice() { return kitPrice; }
public LeadUpgrade setKitPrice(BigDecimal value) { this.kitPrice = value; return this; }
public String getPaymentMethod() { return paymentMethod; }
public LeadUpgrade setPaymentMethod(String value) { this.paymentMethod = value; return this; }
public BigDecimal getTaxAmount() { return taxAmount; }
public LeadUpgrade setTaxAmount(BigDecimal value) { this.taxAmount = value; return this; }
public BigDecimal getDonationAmount() { return donationAmount; }
public LeadUpgrade setDonationAmount(BigDecimal value) { this.donationAmount = value; return this; }
public String getPublicityTag() { return publicityTag; }
public LeadUpgrade setPublicityTag(String value) { this.publicityTag = value; return this; }
public String getEStoreUrl() { return eStoreUrl; }
public LeadUpgrade setEStoreUrl(String value) { this.eStoreUrl = value; return this; }
public String getApptYYYYCC() { return apptYYYYCC; }
public LeadUpgrade setApptYYYYCC(String value) { this.apptYYYYCC = value; return this; }
public String getApptHHMMSS() { return apptHHMMSS; }
public LeadUpgrade setApptHHMMSS(String value) { this.apptHHMMSS = value; return this; }
public String getApptYYYYMMDD() { return apptYYYYMMDD; }
public LeadUpgrade setApptYYYYMMDD(String value) { this.apptYYYYMMDD = value; return this; }
public NAVTermsUpdate getPrivacyPolicyAgreement() { return privacyPolicyAgreement; }
public LeadUpgrade setPrivacyPolicyAgreement(NAVTermsUpdate value) { this.privacyPolicyAgreement = value; return this; }
public NAVTermsUpdate getWebsiteTermsOfUseAgreement() { return websiteTermsOfUseAgreement; }
public LeadUpgrade setWebsiteTermsOfUseAgreement(NAVTermsUpdate value) { this.websiteTermsOfUseAgreement = value; return this; }
public NAVTermsUpdate getAgeVerificationAgreement() { return ageVerificationAgreement; }
public LeadUpgrade setAgeVerificationAgreement(NAVTermsUpdate value) { this.ageVerificationAgreement = value; return this; }
public NAVCASLTermsUpdate getCaslStatementAgreement() { return caslStatementAgreement; }
public LeadUpgrade setCaslStatementAgreement(NAVCASLTermsUpdate value) { this.caslStatementAgreement = value; return this; }
}
public static class NAVPhoneUpdate
{
public String number = null;
public String extension = null;
public String codeIdPhoneType = null;
public String countryCode = null;
public String getNumber() { return number; }
public NAVPhoneUpdate setNumber(String value) { this.number = value; return this; }
public String getExtension() { return extension; }
public NAVPhoneUpdate setExtension(String value) { this.extension = value; return this; }
public String getCodeIdPhoneType() { return codeIdPhoneType; }
public NAVPhoneUpdate setCodeIdPhoneType(String value) { this.codeIdPhoneType = value; return this; }
public String getCountryCode() { return countryCode; }
public NAVPhoneUpdate setCountryCode(String value) { this.countryCode = value; return this; }
}
public static class NAVAddressUpdate
{
public String firstName = null;
public String lastName = null;
public String addressLine1 = null;
public String addressLine2 = null;
public String addressLine3 = null;
public String addressLine4 = null;
public String addressLine5 = null;
public String city = null;
public String stateCode = null;
public String postalCode = null;
public String countryCode = null;
public String getFirstName() { return firstName; }
public NAVAddressUpdate setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public NAVAddressUpdate setLastName(String value) { this.lastName = value; return this; }
public String getAddressLine1() { return addressLine1; }
public NAVAddressUpdate setAddressLine1(String value) { this.addressLine1 = value; return this; }
public String getAddressLine2() { return addressLine2; }
public NAVAddressUpdate setAddressLine2(String value) { this.addressLine2 = value; return this; }
public String getAddressLine3() { return addressLine3; }
public NAVAddressUpdate setAddressLine3(String value) { this.addressLine3 = value; return this; }
public String getAddressLine4() { return addressLine4; }
public NAVAddressUpdate setAddressLine4(String value) { this.addressLine4 = value; return this; }
public String getAddressLine5() { return addressLine5; }
public NAVAddressUpdate setAddressLine5(String value) { this.addressLine5 = value; return this; }
public String getCity() { return city; }
public NAVAddressUpdate setCity(String value) { this.city = value; return this; }
public String getStateCode() { return stateCode; }
public NAVAddressUpdate setStateCode(String value) { this.stateCode = value; return this; }
public String getPostalCode() { return postalCode; }
public NAVAddressUpdate setPostalCode(String value) { this.postalCode = value; return this; }
public String getCountryCode() { return countryCode; }
public NAVAddressUpdate setCountryCode(String value) { this.countryCode = value; return this; }
}
public static class NAVTermsUpdate
{
public String version = null;
public Date date = null;
public String getVersion() { return version; }
public NAVTermsUpdate setVersion(String value) { this.version = value; return this; }
public Date getDate() { return date; }
public NAVTermsUpdate setDate(Date value) { this.date = value; return this; }
}
public static class NAVCASLTermsUpdate
{
public String agree = null;
public Date date = null;
public String getAgree() { return agree; }
public NAVCASLTermsUpdate setAgree(String value) { this.agree = value; return this; }
public Date getDate() { return date; }
public NAVCASLTermsUpdate setDate(Date value) { this.date = value; return this; }
}
public static class LeadUpgradeResponse
{
public ResponseStatus responseStatus = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public LeadUpgradeResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
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 /upgrade-lead HTTP/1.1
Host: extensions.avon.ca
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<LeadUpgrade xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel">
<AdditionalPhone>
<CodeIdPhoneType>String</CodeIdPhoneType>
<CountryCode>String</CountryCode>
<Extension>String</Extension>
<Number>String</Number>
</AdditionalPhone>
<AgeVerificationAgreement>
<Date>0001-01-01T00:00:00</Date>
<Version>String</Version>
</AgeVerificationAgreement>
<AgentId>String</AgentId>
<ApptHHMMSS>String</ApptHHMMSS>
<ApptYYYYCC>String</ApptYYYYCC>
<ApptYYYYMMDD>String</ApptYYYYMMDD>
<BeeNumber>0</BeeNumber>
<BillingAddress>
<AddressLine1>String</AddressLine1>
<AddressLine2>String</AddressLine2>
<AddressLine3>String</AddressLine3>
<AddressLine4>String</AddressLine4>
<AddressLine5>String</AddressLine5>
<City>String</City>
<CountryCode>String</CountryCode>
<FirstName>String</FirstName>
<LastName>String</LastName>
<PostalCode>String</PostalCode>
<StateCode>String</StateCode>
</BillingAddress>
<BirthDate>0001-01-01T00:00:00</BirthDate>
<CASLStatementAgreement>
<Agree>String</Agree>
<Date>0001-01-01T00:00:00</Date>
</CASLStatementAgreement>
<DonationAmount>0</DonationAmount>
<EStoreUrl>String</EStoreUrl>
<ElectronicAgreement>
<Date>0001-01-01T00:00:00</Date>
<Version>String</Version>
</ElectronicAgreement>
<EmailAddress>String</EmailAddress>
<GovernmentId>String</GovernmentId>
<KitNumber>String</KitNumber>
<KitPrice>0</KitPrice>
<Language>String</Language>
<MentorBeeNumber>0</MentorBeeNumber>
<PaymentMethod>String</PaymentMethod>
<PrimaryPhone>
<CodeIdPhoneType>String</CodeIdPhoneType>
<CountryCode>String</CountryCode>
<Extension>String</Extension>
<Number>String</Number>
</PrimaryPhone>
<PrivacyPolicyAgreement>
<Date>0001-01-01T00:00:00</Date>
<Version>String</Version>
</PrivacyPolicyAgreement>
<PublicityTag>String</PublicityTag>
<ShippingAddress>
<AddressLine1>String</AddressLine1>
<AddressLine2>String</AddressLine2>
<AddressLine3>String</AddressLine3>
<AddressLine4>String</AddressLine4>
<AddressLine5>String</AddressLine5>
<City>String</City>
<CountryCode>String</CountryCode>
<FirstName>String</FirstName>
<LastName>String</LastName>
<PostalCode>String</PostalCode>
<StateCode>String</StateCode>
</ShippingAddress>
<TaxAmount>0</TaxAmount>
<TermsAgreement>
<Date>0001-01-01T00:00:00</Date>
<Version>String</Version>
</TermsAgreement>
<WebsiteTermsOfUseAgreement>
<Date>0001-01-01T00:00:00</Date>
<Version>String</Version>
</WebsiteTermsOfUseAgreement>
</LeadUpgrade>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <LeadUpgradeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> </LeadUpgradeResponse>