| 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(){}
}
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 /subs/user HTTP/1.1 Host: portal-api.migrantleap.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
subscription:
{
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
}