| POST | /warranty/v1/editCustomer |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class EditCustomerRequest extends BaseRequest<EditCustomerResponse>
{
public UUID customerId = null;
public UUID personId = null;
public UUID addressId = null;
public UUID phoneId = null;
public UUID emailId = null;
public String cardId = null;
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 Date weddingDate = 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 UUID birthDayEventId = null;
public String salePersonId = null;
public Boolean allowStoreDataAbroad = 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 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 UUID getCustomerId() { return customerId; }
public EditCustomerRequest setCustomerId(UUID value) { this.customerId = value; return this; }
public UUID getPersonId() { return personId; }
public EditCustomerRequest setPersonId(UUID value) { this.personId = value; return this; }
public UUID getAddressId() { return addressId; }
public EditCustomerRequest setAddressId(UUID value) { this.addressId = value; return this; }
public UUID getPhoneId() { return phoneId; }
public EditCustomerRequest setPhoneId(UUID value) { this.phoneId = value; return this; }
public UUID getEmailId() { return emailId; }
public EditCustomerRequest setEmailId(UUID value) { this.emailId = value; return this; }
public String getCardId() { return cardId; }
public EditCustomerRequest setCardId(String value) { this.cardId = value; return this; }
public String getCustomerRef() { return customerRef; }
public EditCustomerRequest setCustomerRef(String value) { this.customerRef = value; return this; }
public Integer getTitle() { return title; }
public EditCustomerRequest setTitle(Integer value) { this.title = value; return this; }
public String getFirstName() { return firstName; }
public EditCustomerRequest setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public EditCustomerRequest setLastName(String value) { this.lastName = value; return this; }
public String getFirstNameNotLatin() { return firstNameNotLatin; }
public EditCustomerRequest setFirstNameNotLatin(String value) { this.firstNameNotLatin = value; return this; }
public String getLastNameNotLatin() { return lastNameNotLatin; }
public EditCustomerRequest setLastNameNotLatin(String value) { this.lastNameNotLatin = value; return this; }
public Date getBirthday() { return birthday; }
public EditCustomerRequest setBirthday(Date value) { this.birthday = value; return this; }
public Date getWeddingDate() { return weddingDate; }
public EditCustomerRequest setWeddingDate(Date value) { this.weddingDate = value; return this; }
public String getEmail() { return email; }
public EditCustomerRequest setEmail(String value) { this.email = value; return this; }
public Boolean isCanBeContacted() { return canBeContacted; }
public EditCustomerRequest setCanBeContacted(Boolean value) { this.canBeContacted = value; return this; }
public String getLanguage() { return language; }
public EditCustomerRequest setLanguage(String value) { this.language = value; return this; }
public String getNameSuffix() { return nameSuffix; }
public EditCustomerRequest setNameSuffix(String value) { this.nameSuffix = value; return this; }
public String getGender() { return gender; }
public EditCustomerRequest setGender(String value) { this.gender = value; return this; }
public String getMiddleName() { return middleName; }
public EditCustomerRequest setMiddleName(String value) { this.middleName = value; return this; }
public String getCountryId() { return countryId; }
public EditCustomerRequest setCountryId(String value) { this.countryId = value; return this; }
public String getPhoneCountryId() { return phoneCountryId; }
public EditCustomerRequest setPhoneCountryId(String value) { this.phoneCountryId = value; return this; }
public String getPrefixCountryId() { return prefixCountryId; }
public EditCustomerRequest setPrefixCountryId(String value) { this.prefixCountryId = value; return this; }
public String getPhone() { return phone; }
public EditCustomerRequest setPhone(String value) { this.phone = value; return this; }
public Integer getPosId() { return posId; }
public EditCustomerRequest setPosId(Integer value) { this.posId = value; return this; }
public UUID getBirthDayEventId() { return birthDayEventId; }
public EditCustomerRequest setBirthDayEventId(UUID value) { this.birthDayEventId = value; return this; }
public String getSalePersonId() { return salePersonId; }
public EditCustomerRequest setSalePersonId(String value) { this.salePersonId = value; return this; }
public Boolean isAllowStoreDataAbroad() { return allowStoreDataAbroad; }
public EditCustomerRequest setAllowStoreDataAbroad(Boolean value) { this.allowStoreDataAbroad = value; return this; }
public Boolean isTvAllowStoreDataAbroad() { return tvAllowStoreDataAbroad; }
public EditCustomerRequest setTvAllowStoreDataAbroad(Boolean value) { this.tvAllowStoreDataAbroad = value; return this; }
public Boolean isContactByMail() { return contactByMail; }
public EditCustomerRequest setContactByMail(Boolean value) { this.contactByMail = value; return this; }
public Boolean isContactByEmail() { return contactByEmail; }
public EditCustomerRequest setContactByEmail(Boolean value) { this.contactByEmail = value; return this; }
public Boolean isContactByPhone() { return contactByPhone; }
public EditCustomerRequest setContactByPhone(Boolean value) { this.contactByPhone = value; return this; }
public Boolean isContactBySMS() { return contactBySMS; }
public EditCustomerRequest setContactBySMS(Boolean value) { this.contactBySMS = value; return this; }
public Boolean isContactBySocialMedia() { return contactBySocialMedia; }
public EditCustomerRequest setContactBySocialMedia(Boolean value) { this.contactBySocialMedia = value; return this; }
public String getStreet() { return street; }
public EditCustomerRequest setStreet(String value) { this.street = value; return this; }
public String getHouseNumber() { return houseNumber; }
public EditCustomerRequest setHouseNumber(String value) { this.houseNumber = value; return this; }
public String getCity() { return city; }
public EditCustomerRequest setCity(String value) { this.city = value; return this; }
public String getPostalCode() { return postalCode; }
public EditCustomerRequest setPostalCode(String value) { this.postalCode = value; return this; }
public String getRegion() { return region; }
public EditCustomerRequest setRegion(String value) { this.region = value; return this; }
public String getStreet2() { return street2; }
public EditCustomerRequest setStreet2(String value) { this.street2 = value; return this; }
public String getStreet3() { return street3; }
public EditCustomerRequest setStreet3(String value) { this.street3 = value; return this; }
public String getStreet4() { return street4; }
public EditCustomerRequest setStreet4(String value) { this.street4 = value; return this; }
public String getStreet5() { return street5; }
public EditCustomerRequest setStreet5(String value) { this.street5 = 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 EditCustomerResponse extends BaseResponse
{
}
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; }
}
}
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/editCustomer HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<EditCustomerRequest 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>
<addressId>00000000-0000-0000-0000-000000000000</addressId>
<allowStoreDataAbroad>false</allowStoreDataAbroad>
<birthDayEventId>00000000-0000-0000-0000-000000000000</birthDayEventId>
<birthday>0001-01-01T00:00:00</birthday>
<canBeContacted>false</canBeContacted>
<cardId>String</cardId>
<city>String</city>
<contactByEmail>false</contactByEmail>
<contactByMail>false</contactByMail>
<contactByPhone>false</contactByPhone>
<contactBySMS>false</contactBySMS>
<contactBySocialMedia>false</contactBySocialMedia>
<countryId>String</countryId>
<customerId>00000000-0000-0000-0000-000000000000</customerId>
<customerRef>String</customerRef>
<email>String</email>
<emailId>00000000-0000-0000-0000-000000000000</emailId>
<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>
<personId>00000000-0000-0000-0000-000000000000</personId>
<phone>String</phone>
<phoneCountryId>String</phoneCountryId>
<phoneId>00000000-0000-0000-0000-000000000000</phoneId>
<posId>0</posId>
<postalCode>String</postalCode>
<prefixCountryId>String</prefixCountryId>
<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>
<weddingDate>0001-01-01T00:00:00</weddingDate>
</EditCustomerRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <EditCustomerResponse 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> </EditCustomerResponse>