My ServiceStack Backend

<back to all web services

UserSubRequest

The following routes are available for this service:
GET/subs/user
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 UserSubRequest
    {
    }

    public partial class UserSubResponse
    {
        public virtual MSubscription Subscription { 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# UserSubRequest DTOs

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

HTTP + OTHER

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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}