| POST | /warranty/v1/ValidatePhoneNumber |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ValidatePhoneNumber extends BaseRequest<ValidatePhoneNumberResponse>
{
public String phoneNumber = null;
public String countryId = null;
public String getPhoneNumber() { return phoneNumber; }
public ValidatePhoneNumber setPhoneNumber(String value) { this.phoneNumber = value; return this; }
public String getCountryId() { return countryId; }
public ValidatePhoneNumber setCountryId(String value) { this.countryId = 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 ValidatePhoneNumberResponse extends BaseResponse
{
public ResponseStatus ResponseStatus = null;
public Boolean isValid = null;
public String countryId = null;
public String nationalNumber = null;
public String nationalFormat = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ValidatePhoneNumberResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public Boolean getIsValid() { return isValid; }
public ValidatePhoneNumberResponse setIsValid(Boolean value) { this.isValid = value; return this; }
public String getCountryId() { return countryId; }
public ValidatePhoneNumberResponse setCountryId(String value) { this.countryId = value; return this; }
public String getNationalNumber() { return nationalNumber; }
public ValidatePhoneNumberResponse setNationalNumber(String value) { this.nationalNumber = value; return this; }
public String getNationalFormat() { return nationalFormat; }
public ValidatePhoneNumberResponse setNationalFormat(String value) { this.nationalFormat = 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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /warranty/v1/ValidatePhoneNumber HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"phoneNumber":"String","countryId":"String","sid":"String","app":"String","_os":"String","_appVersion":"String","_searchMethod":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"isValid":false,"countryId":"String","nationalNumber":"String","nationalFormat":"String","_xmlns":"String","_type":"String","_source":"String","_tstamp":"String","_user":"String","_env":"String","_uri":"String","_query":"String"}