| GET | /api/v1/utils/countries |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetCountries implements IGet
{
}
public static class GetCountriesResponse extends BaseResponse
{
public ArrayList<Country> countries = null;
public ArrayList<Country> getCountries() { return countries; }
public GetCountriesResponse setCountries(ArrayList<Country> value) { this.countries = value; return this; }
}
public static class BaseResponse
{
public Status status = null;
public Status getStatus() { return status; }
public BaseResponse setStatus(Status value) { this.status = value; return this; }
}
public static class Status
{
public String message = null;
public Integer statusCode = null;
public String getMessage() { return message; }
public Status setMessage(String value) { this.message = value; return this; }
public Integer getStatusCode() { return statusCode; }
public Status setStatusCode(Integer value) { this.statusCode = value; return this; }
}
public static class Country
{
public Integer id = null;
@Required()
@StringLength(2)
public String code = null;
@Required()
@StringLength(3)
public String phoneCode = null;
@Required()
@StringLength(200)
public String name = null;
@Required()
@StringLength(5)
public String currencySymbol = null;
@Required()
@StringLength(200)
public String currencyName = null;
@Required()
public Integer order = null;
public Integer getId() { return id; }
public Country setId(Integer value) { this.id = value; return this; }
public String getCode() { return code; }
public Country setCode(String value) { this.code = value; return this; }
public String getPhoneCode() { return phoneCode; }
public Country setPhoneCode(String value) { this.phoneCode = value; return this; }
public String getName() { return name; }
public Country setName(String value) { this.name = value; return this; }
public String getCurrencySymbol() { return currencySymbol; }
public Country setCurrencySymbol(String value) { this.currencySymbol = value; return this; }
public String getCurrencyName() { return currencyName; }
public Country setCurrencyName(String value) { this.currencyName = value; return this; }
public Integer getOrder() { return order; }
public Country setOrder(Integer value) { this.order = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/utils/countries HTTP/1.1 Host: pecuario-backend.develsystems.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
countries:
[
{
id: 0,
code: String,
phoneCode: String,
name: String,
currencySymbol: String,
currencyName: String,
order: 0
}
]
}