| POST | /warranty/v1/site/{siteId}/card |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateWarrantyCardRequest extends BaseRequest<CreateWarrantyCardResponse>
{
public Integer siteId = null;
public Boolean force = null;
public String ref = null;
public String serial = null;
public String invoiceNumber = null;
public Date activationDate = null;
public String note = null;
public String promoterTypeId = null;
public String issuedBy = null;
public String nfcCardUID = null;
public String appVersion = null;
public String searchMethod = null;
public String deviceOS = null;
public Integer getSiteId() { return siteId; }
public CreateWarrantyCardRequest setSiteId(Integer value) { this.siteId = value; return this; }
public Boolean isForce() { return force; }
public CreateWarrantyCardRequest setForce(Boolean value) { this.force = value; return this; }
public String getRef() { return ref; }
public CreateWarrantyCardRequest setRef(String value) { this.ref = value; return this; }
public String getSerial() { return serial; }
public CreateWarrantyCardRequest setSerial(String value) { this.serial = value; return this; }
public String getInvoiceNumber() { return invoiceNumber; }
public CreateWarrantyCardRequest setInvoiceNumber(String value) { this.invoiceNumber = value; return this; }
public Date getActivationDate() { return activationDate; }
public CreateWarrantyCardRequest setActivationDate(Date value) { this.activationDate = value; return this; }
public String getNote() { return note; }
public CreateWarrantyCardRequest setNote(String value) { this.note = value; return this; }
public String getPromoterTypeId() { return promoterTypeId; }
public CreateWarrantyCardRequest setPromoterTypeId(String value) { this.promoterTypeId = value; return this; }
public String getIssuedBy() { return issuedBy; }
public CreateWarrantyCardRequest setIssuedBy(String value) { this.issuedBy = value; return this; }
public String getNfcCardUID() { return nfcCardUID; }
public CreateWarrantyCardRequest setNfcCardUID(String value) { this.nfcCardUID = value; return this; }
public String getAppVersion() { return appVersion; }
public CreateWarrantyCardRequest setAppVersion(String value) { this.appVersion = value; return this; }
public String getSearchMethod() { return searchMethod; }
public CreateWarrantyCardRequest setSearchMethod(String value) { this.searchMethod = value; return this; }
public String getDeviceOS() { return deviceOS; }
public CreateWarrantyCardRequest setDeviceOS(String value) { this.deviceOS = 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 CreateWarrantyCardResponse 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; }
}
}
Java CreateWarrantyCardRequest 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/site/{siteId}/card HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateWarrantyCardRequest 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>
<activationDate>0001-01-01T00:00:00</activationDate>
<appVersion>String</appVersion>
<deviceOS>String</deviceOS>
<force>false</force>
<invoiceNumber>String</invoiceNumber>
<issuedBy>String</issuedBy>
<nfcCardUID>String</nfcCardUID>
<note>String</note>
<promoterTypeId>String</promoterTypeId>
<ref>String</ref>
<searchMethod>String</searchMethod>
<serial>String</serial>
<siteId>0</siteId>
</CreateWarrantyCardRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateWarrantyCardResponse 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> </CreateWarrantyCardResponse>