GET | /subs |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SubsRequest
{
public String lang = null;
public String getLang() { return lang; }
public SubsRequest setLang(String value) { this.lang = value; return this; }
}
public static class SubsResponse
{
public ArrayList<MSubscription> subscriptions = null;
public Integer responseCode = null;
public String responseMessage = null;
public ArrayList<MSubscription> getSubscriptions() { return subscriptions; }
public SubsResponse setSubscriptions(ArrayList<MSubscription> value) { this.subscriptions = value; return this; }
public Integer getResponseCode() { return responseCode; }
public SubsResponse setResponseCode(Integer value) { this.responseCode = value; return this; }
public String getResponseMessage() { return responseMessage; }
public SubsResponse setResponseMessage(String value) { this.responseMessage = value; return this; }
}
public static class MSubscription
{
public Long id = null;
public String name = null;
public String description = null;
public Boolean status = null;
public BigDecimal yearlyPrice = null;
public BigDecimal price = null;
public Integer order = null;
public String icon = null;
public String paymentLink = null;
public String yearlyPaymentLink = null;
public String sid = null;
public String yearlySid = null;
public BigDecimal discount = null;
public ArrayList<MBenefit> benefits = null;
public Long getId() { return id; }
public MSubscription setId(Long value) { this.id = value; return this; }
public String getName() { return name; }
public MSubscription setName(String value) { this.name = value; return this; }
public String getDescription() { return description; }
public MSubscription setDescription(String value) { this.description = value; return this; }
public Boolean isStatus() { return status; }
public MSubscription setStatus(Boolean value) { this.status = value; return this; }
public BigDecimal getYearlyPrice() { return yearlyPrice; }
public MSubscription setYearlyPrice(BigDecimal value) { this.yearlyPrice = value; return this; }
public BigDecimal getPrice() { return price; }
public MSubscription setPrice(BigDecimal value) { this.price = value; return this; }
public Integer getOrder() { return order; }
public MSubscription setOrder(Integer value) { this.order = value; return this; }
public String getIcon() { return icon; }
public MSubscription setIcon(String value) { this.icon = value; return this; }
public String getPaymentLink() { return paymentLink; }
public MSubscription setPaymentLink(String value) { this.paymentLink = value; return this; }
public String getYearlyPaymentLink() { return yearlyPaymentLink; }
public MSubscription setYearlyPaymentLink(String value) { this.yearlyPaymentLink = value; return this; }
public String getSid() { return sid; }
public MSubscription setSid(String value) { this.sid = value; return this; }
public String getYearlySid() { return yearlySid; }
public MSubscription setYearlySid(String value) { this.yearlySid = value; return this; }
public BigDecimal getDiscount() { return discount; }
public MSubscription setDiscount(BigDecimal value) { this.discount = value; return this; }
public ArrayList<MBenefit> getBenefits() { return benefits; }
public MSubscription setBenefits(ArrayList<MBenefit> value) { this.benefits = value; return this; }
}
public static class MBenefit
{
public Long id = null;
public String name = null;
public Boolean status = null;
public Integer order = null;
public String image = null;
public ArrayList<MSubBenefit> subBenefits = null;
public Long getId() { return id; }
public MBenefit setId(Long value) { this.id = value; return this; }
public String getName() { return name; }
public MBenefit setName(String value) { this.name = value; return this; }
public Boolean isStatus() { return status; }
public MBenefit setStatus(Boolean value) { this.status = value; return this; }
public Integer getOrder() { return order; }
public MBenefit setOrder(Integer value) { this.order = value; return this; }
public String getImage() { return image; }
public MBenefit setImage(String value) { this.image = value; return this; }
public ArrayList<MSubBenefit> getSubBenefits() { return subBenefits; }
public MBenefit setSubBenefits(ArrayList<MSubBenefit> value) { this.subBenefits = value; return this; }
}
public static class MSubBenefit
{
public Long id = null;
public String name = null;
public Boolean status = null;
public Integer order = null;
public Boolean hasContent = null;
public String image = null;
public String rssHash = null;
public Long getId() { return id; }
public MSubBenefit setId(Long value) { this.id = value; return this; }
public String getName() { return name; }
public MSubBenefit setName(String value) { this.name = value; return this; }
public Boolean isStatus() { return status; }
public MSubBenefit setStatus(Boolean value) { this.status = value; return this; }
public Integer getOrder() { return order; }
public MSubBenefit setOrder(Integer value) { this.order = value; return this; }
public Boolean isHasContent() { return hasContent; }
public MSubBenefit setHasContent(Boolean value) { this.hasContent = value; return this; }
public String getImage() { return image; }
public MSubBenefit setImage(String value) { this.image = value; return this; }
public String getRssHash() { return rssHash; }
public MSubBenefit setRssHash(String value) { this.rssHash = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /subs HTTP/1.1 Host: portal-api.migrantleap.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"subscriptions":[{"id":0,"name":"String","description":"String","status":false,"yearlyPrice":0,"price":0,"order":0,"icon":"String","paymentLink":"String","yearlyPaymentLink":"String","sid":"String","yearlySid":"String","discount":0,"benefits":[{"id":0,"name":"String","status":false,"order":0,"image":"String","subBenefits":[{"id":0,"name":"String","status":false,"order":0,"hasContent":false,"image":"String","rssHash":"String"}]}]}],"responseCode":0,"responseMessage":"String"}