| POST | /warranty/v1/createCustomer |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateCustomerRequest extends BaseRequest<CreateCustomerResponse>
{
public String customerRef = null;
public Integer title = null;
public String firstName = null;
public String lastName = null;
public String firstNameNotLatin = null;
public String lastNameNotLatin = null;
public Date birthday = null;
public String email = null;
public Boolean canBeContacted = null;
public String language = null;
public String nameSuffix = null;
public String gender = null;
public String middleName = null;
public String countryId = null;
public String phoneCountryId = null;
public String prefixCountryId = null;
public String phone = null;
public Integer posId = null;
public String brandTrigram = null;
public Date weddingDate = null;
public String street = null;
public String houseNumber = null;
public String city = null;
public String postalCode = null;
public String region = null;
public String street2 = null;
public String street3 = null;
public String street4 = null;
public String street5 = null;
public String salePersonId = null;
public Boolean privacyPolicyAcceptanceStorage = null;
public Boolean allowStoreDataAbroad = null;
public Boolean tvPrivacyPolicyAcceptanceStorage = null;
public Boolean tvAllowStoreDataAbroad = null;
public Boolean contactByMail = null;
public Boolean contactByEmail = null;
public Boolean contactByPhone = null;
public Boolean contactBySMS = null;
public Boolean contactBySocialMedia = null;
public String getCustomerRef() { return customerRef; }
public CreateCustomerRequest setCustomerRef(String value) { this.customerRef = value; return this; }
public Integer getTitle() { return title; }
public CreateCustomerRequest setTitle(Integer value) { this.title = value; return this; }
public String getFirstName() { return firstName; }
public CreateCustomerRequest setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public CreateCustomerRequest setLastName(String value) { this.lastName = value; return this; }
public String getFirstNameNotLatin() { return firstNameNotLatin; }
public CreateCustomerRequest setFirstNameNotLatin(String value) { this.firstNameNotLatin = value; return this; }
public String getLastNameNotLatin() { return lastNameNotLatin; }
public CreateCustomerRequest setLastNameNotLatin(String value) { this.lastNameNotLatin = value; return this; }
public Date getBirthday() { return birthday; }
public CreateCustomerRequest setBirthday(Date value) { this.birthday = value; return this; }
public String getEmail() { return email; }
public CreateCustomerRequest setEmail(String value) { this.email = value; return this; }
public Boolean isCanBeContacted() { return canBeContacted; }
public CreateCustomerRequest setCanBeContacted(Boolean value) { this.canBeContacted = value; return this; }
public String getLanguage() { return language; }
public CreateCustomerRequest setLanguage(String value) { this.language = value; return this; }
public String getNameSuffix() { return nameSuffix; }
public CreateCustomerRequest setNameSuffix(String value) { this.nameSuffix = value; return this; }
public String getGender() { return gender; }
public CreateCustomerRequest setGender(String value) { this.gender = value; return this; }
public String getMiddleName() { return middleName; }
public CreateCustomerRequest setMiddleName(String value) { this.middleName = value; return this; }
public String getCountryId() { return countryId; }
public CreateCustomerRequest setCountryId(String value) { this.countryId = value; return this; }
public String getPhoneCountryId() { return phoneCountryId; }
public CreateCustomerRequest setPhoneCountryId(String value) { this.phoneCountryId = value; return this; }
public String getPrefixCountryId() { return prefixCountryId; }
public CreateCustomerRequest setPrefixCountryId(String value) { this.prefixCountryId = value; return this; }
public String getPhone() { return phone; }
public CreateCustomerRequest setPhone(String value) { this.phone = value; return this; }
public Integer getPosId() { return posId; }
public CreateCustomerRequest setPosId(Integer value) { this.posId = value; return this; }
public String getBrandTrigram() { return brandTrigram; }
public CreateCustomerRequest setBrandTrigram(String value) { this.brandTrigram = value; return this; }
public Date getWeddingDate() { return weddingDate; }
public CreateCustomerRequest setWeddingDate(Date value) { this.weddingDate = value; return this; }
public String getStreet() { return street; }
public CreateCustomerRequest setStreet(String value) { this.street = value; return this; }
public String getHouseNumber() { return houseNumber; }
public CreateCustomerRequest setHouseNumber(String value) { this.houseNumber = value; return this; }
public String getCity() { return city; }
public CreateCustomerRequest setCity(String value) { this.city = value; return this; }
public String getPostalCode() { return postalCode; }
public CreateCustomerRequest setPostalCode(String value) { this.postalCode = value; return this; }
public String getRegion() { return region; }
public CreateCustomerRequest setRegion(String value) { this.region = value; return this; }
public String getStreet2() { return street2; }
public CreateCustomerRequest setStreet2(String value) { this.street2 = value; return this; }
public String getStreet3() { return street3; }
public CreateCustomerRequest setStreet3(String value) { this.street3 = value; return this; }
public String getStreet4() { return street4; }
public CreateCustomerRequest setStreet4(String value) { this.street4 = value; return this; }
public String getStreet5() { return street5; }
public CreateCustomerRequest setStreet5(String value) { this.street5 = value; return this; }
public String getSalePersonId() { return salePersonId; }
public CreateCustomerRequest setSalePersonId(String value) { this.salePersonId = value; return this; }
public Boolean isPrivacyPolicyAcceptanceStorage() { return privacyPolicyAcceptanceStorage; }
public CreateCustomerRequest setPrivacyPolicyAcceptanceStorage(Boolean value) { this.privacyPolicyAcceptanceStorage = value; return this; }
public Boolean isAllowStoreDataAbroad() { return allowStoreDataAbroad; }
public CreateCustomerRequest setAllowStoreDataAbroad(Boolean value) { this.allowStoreDataAbroad = value; return this; }
public Boolean isTvPrivacyPolicyAcceptanceStorage() { return tvPrivacyPolicyAcceptanceStorage; }
public CreateCustomerRequest setTvPrivacyPolicyAcceptanceStorage(Boolean value) { this.tvPrivacyPolicyAcceptanceStorage = value; return this; }
public Boolean isTvAllowStoreDataAbroad() { return tvAllowStoreDataAbroad; }
public CreateCustomerRequest setTvAllowStoreDataAbroad(Boolean value) { this.tvAllowStoreDataAbroad = value; return this; }
public Boolean isContactByMail() { return contactByMail; }
public CreateCustomerRequest setContactByMail(Boolean value) { this.contactByMail = value; return this; }
public Boolean isContactByEmail() { return contactByEmail; }
public CreateCustomerRequest setContactByEmail(Boolean value) { this.contactByEmail = value; return this; }
public Boolean isContactByPhone() { return contactByPhone; }
public CreateCustomerRequest setContactByPhone(Boolean value) { this.contactByPhone = value; return this; }
public Boolean isContactBySMS() { return contactBySMS; }
public CreateCustomerRequest setContactBySMS(Boolean value) { this.contactBySMS = value; return this; }
public Boolean isContactBySocialMedia() { return contactBySocialMedia; }
public CreateCustomerRequest setContactBySocialMedia(Boolean value) { this.contactBySocialMedia = value; return this; }
}
public static class BaseRequest<TResponse> implements IRequest
{
public String sid = null;
public String app = null;
public String _os = null;
public String _appVersion = null;
public String _searchMethod = null;
public String getSid() { return sid; }
public BaseRequest<TResponse> setSid(String value) { this.sid = value; return this; }
public String getApp() { return app; }
public BaseRequest<TResponse> setApp(String value) { this.app = value; return this; }
public String getOs() { return _os; }
public BaseRequest<TResponse> setOs(String value) { this._os = value; return this; }
public String getAppVersion() { return _appVersion; }
public BaseRequest<TResponse> setAppVersion(String value) { this._appVersion = value; return this; }
public String getSearchMethod() { return _searchMethod; }
public BaseRequest<TResponse> setSearchMethod(String value) { this._searchMethod = value; return this; }
}
public static class CreateCustomerResponse extends BaseResponse
{
public UUID customerId = null;
public Integer boosterCustomerId = null;
public UUID getCustomerId() { return customerId; }
public CreateCustomerResponse setCustomerId(UUID value) { this.customerId = value; return this; }
public Integer getBoosterCustomerId() { return boosterCustomerId; }
public CreateCustomerResponse setBoosterCustomerId(Integer value) { this.boosterCustomerId = value; return this; }
}
public static class BaseResponse implements IRespose
{
public String _xmlns = null;
public String _type = null;
public String _source = null;
public String _tstamp = null;
public String _user = null;
public String _env = null;
public String _uri = null;
public String _query = null;
public String getXmlns() { return _xmlns; }
public BaseResponse setXmlns(String value) { this._xmlns = value; return this; }
public String getType() { return _type; }
public BaseResponse setType(String value) { this._type = value; return this; }
public String getSource() { return _source; }
public BaseResponse setSource(String value) { this._source = value; return this; }
public String getTstamp() { return _tstamp; }
public BaseResponse setTstamp(String value) { this._tstamp = value; return this; }
public String getUser() { return _user; }
public BaseResponse setUser(String value) { this._user = value; return this; }
public String getEnv() { return _env; }
public BaseResponse setEnv(String value) { this._env = value; return this; }
public String getUri() { return _uri; }
public BaseResponse setUri(String value) { this._uri = value; return this; }
public String getQuery() { return _query; }
public BaseResponse setQuery(String value) { this._query = value; return this; }
}
}
Java CreateCustomerRequest 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 /warranty/v1/createCustomer HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateCustomerRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Sale">
<_appVersion xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_appVersion>
<_os xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_os>
<_searchMethod xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_searchMethod>
<app xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</app>
<sid xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</sid>
<allowStoreDataAbroad>false</allowStoreDataAbroad>
<birthday>0001-01-01T00:00:00</birthday>
<brandTrigram>String</brandTrigram>
<canBeContacted>false</canBeContacted>
<city>String</city>
<contactByEmail>false</contactByEmail>
<contactByMail>false</contactByMail>
<contactByPhone>false</contactByPhone>
<contactBySMS>false</contactBySMS>
<contactBySocialMedia>false</contactBySocialMedia>
<countryId>String</countryId>
<customerRef>String</customerRef>
<email>String</email>
<firstName>String</firstName>
<firstNameNotLatin>String</firstNameNotLatin>
<gender>String</gender>
<houseNumber>String</houseNumber>
<language>String</language>
<lastName>String</lastName>
<lastNameNotLatin>String</lastNameNotLatin>
<middleName>String</middleName>
<nameSuffix>String</nameSuffix>
<phone>String</phone>
<phoneCountryId>String</phoneCountryId>
<posId>0</posId>
<postalCode>String</postalCode>
<prefixCountryId>String</prefixCountryId>
<privacyPolicyAcceptanceStorage>false</privacyPolicyAcceptanceStorage>
<region>String</region>
<salePersonId>String</salePersonId>
<street>String</street>
<street2>String</street2>
<street3>String</street3>
<street4>String</street4>
<street5>String</street5>
<title>0</title>
<tvAllowStoreDataAbroad>false</tvAllowStoreDataAbroad>
<tvPrivacyPolicyAcceptanceStorage>false</tvPrivacyPolicyAcceptanceStorage>
<weddingDate>0001-01-01T00:00:00</weddingDate>
</CreateCustomerRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateCustomerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Sale"> <_env xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_env> <_query xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_query> <_source xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_source> <_tstamp xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_tstamp> <_type xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_type> <_uri xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_uri> <_user xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_user> <_xmlns xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_xmlns> <boosterCustomerId>0</boosterCustomerId> <customerId>00000000-0000-0000-0000-000000000000</customerId> </CreateCustomerResponse>