My ServiceStack Backend

<back to all web services

UserSubRequest

The following routes are available for this service:
GET/subs/user
import Foundation
import ServiceStack

public class UserSubRequest : Codable
{
    required public init(){}
}

public class UserSubResponse : Codable
{
    public var subscription:MSubscription
    public var responseCode:Int
    public var responseMessage:String

    required public init(){}
}

public class MSubscription : Codable
{
    public var id:Int
    public var name:String
    public var Description:String
    public var status:Bool
    public var yearlyPrice:Double
    public var price:Double
    public var order:Int
    public var icon:String
    public var paymentLink:String
    public var yearlyPaymentLink:String
    public var sid:String
    public var yearlySid:String
    public var discount:Double
    public var benefits:[MBenefit] = []

    required public init(){}
}

public class MBenefit : Codable
{
    public var id:Int
    public var name:String
    public var status:Bool
    public var order:Int
    public var image:String
    public var subBenefits:[MSubBenefit] = []

    required public init(){}
}

public class MSubBenefit : Codable
{
    public var id:Int
    public var name:String
    public var status:Bool
    public var order:Int
    public var hasContent:Bool
    public var image:String
    public var rssHash:String

    required public init(){}
}


Swift UserSubRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /subs/user HTTP/1.1 
Host: portal-api.migrantleap.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UserSubResponse 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>
  <Subscription xmlns:d2p1="http://schemas.datacontract.org/2004/07/MigrantLeap.PortalBackend.Providers.Models">
    <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>
  </Subscription>
</UserSubResponse>