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 .xml suffix or ?format=xml
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/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SubsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MigrantLeap.PortalBackend.Models"> <ResponseCode>0</ResponseCode> <ResponseMessage>String</ResponseMessage> <Subscriptions xmlns:d2p1="http://schemas.datacontract.org/2004/07/MigrantLeap.PortalBackend.Providers.Models"> <d2p1:MSubscription> <d2p1:Benefits> <d2p1:MBenefit> <d2p1:Id>0</d2p1:Id> <d2p1:Image>String</d2p1:Image> <d2p1:Name>String</d2p1:Name> <d2p1:Order>0</d2p1:Order> <d2p1:Status>false</d2p1:Status> <d2p1:SubBenefits> <d2p1:MSubBenefit> <d2p1:HasContent>false</d2p1:HasContent> <d2p1:Id>0</d2p1:Id> <d2p1:Image>String</d2p1:Image> <d2p1:Name>String</d2p1:Name> <d2p1:Order>0</d2p1:Order> <d2p1:RSSHash>String</d2p1:RSSHash> <d2p1:Status>false</d2p1:Status> </d2p1:MSubBenefit> </d2p1:SubBenefits> </d2p1:MBenefit> </d2p1:Benefits> <d2p1:Description>String</d2p1:Description> <d2p1:Discount>0</d2p1:Discount> <d2p1:Icon>String</d2p1:Icon> <d2p1:Id>0</d2p1:Id> <d2p1:Name>String</d2p1:Name> <d2p1:Order>0</d2p1:Order> <d2p1:PaymentLink>String</d2p1:PaymentLink> <d2p1:Price>0</d2p1:Price> <d2p1:Sid>String</d2p1:Sid> <d2p1:Status>false</d2p1:Status> <d2p1:YearlyPaymentLink>String</d2p1:YearlyPaymentLink> <d2p1:YearlyPrice>0</d2p1:YearlyPrice> <d2p1:YearlySid>String</d2p1:YearlySid> </d2p1:MSubscription> </Subscriptions> </SubsResponse>