My ServiceStack Backend

<back to all web services

SubsRequest

The following routes are available for this service:
GET/subs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MigrantLeap.PortalBackend.Models;
using MigrantLeap.PortalBackend.Providers.Models;

namespace MigrantLeap.PortalBackend.Models
{
    public partial class SubsRequest
    {
        public virtual string Lang { get; set; }
    }

    public partial class SubsResponse
    {
        public SubsResponse()
        {
            Subscriptions = new List<MSubscription>{};
        }

        public virtual List<MSubscription> Subscriptions { get; set; }
        public virtual int ResponseCode { get; set; }
        public virtual string ResponseMessage { get; set; }
    }

}

namespace MigrantLeap.PortalBackend.Providers.Models
{
    public partial class MBenefit
    {
        public MBenefit()
        {
            SubBenefits = new List<MSubBenefit>{};
        }

        public virtual long Id { get; set; }
        public virtual string Name { get; set; }
        public virtual bool Status { get; set; }
        public virtual int Order { get; set; }
        public virtual string Image { get; set; }
        public virtual List<MSubBenefit> SubBenefits { get; set; }
    }

    public partial class MSubBenefit
    {
        public virtual long Id { get; set; }
        public virtual string Name { get; set; }
        public virtual bool Status { get; set; }
        public virtual int Order { get; set; }
        public virtual bool HasContent { get; set; }
        public virtual string Image { get; set; }
        public virtual string RSSHash { get; set; }
    }

    public partial class MSubscription
    {
        public MSubscription()
        {
            Benefits = new List<MBenefit>{};
        }

        public virtual long Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual bool Status { get; set; }
        public virtual decimal YearlyPrice { get; set; }
        public virtual decimal Price { get; set; }
        public virtual int Order { get; set; }
        public virtual string Icon { get; set; }
        public virtual string PaymentLink { get; set; }
        public virtual string YearlyPaymentLink { get; set; }
        public virtual string Sid { get; set; }
        public virtual string YearlySid { get; set; }
        public virtual decimal Discount { get; set; }
        public virtual List<MBenefit> Benefits { get; set; }
    }

}

C# SubsRequest 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 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>