Skip to content

Commit

Permalink
Updated plan and quota to new API.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed Dec 6, 2015
1 parent 690621b commit ae969df
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion Vpdb/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace VpdbAgent.Vpdb.Models
{
Expand All @@ -24,13 +27,14 @@ public class UserCounter

public class UserFull : User
{
public string Plan { get; set; }
public PlanDetails Plan { get; set; }
public string Provider { get; set; }
public string Email { get; set; }
public string CreatedAt { get; set; }
public bool IsActive { get; set; }
public List<string> Roles { get; set; }
public Permission Permissions { get; set; }
public QuotaDetails Quota { get; set; }

public class Permission
{
Expand All @@ -48,5 +52,26 @@ public class Permission
public List<string> User { get; set; }
public List<string> Messages { get; set; }
}

public class PlanDetails
{
public string Id { get; set; }
public bool AppTokensEnabled { get; set; }
public bool PushNotificationsEnabled { get; set; }
}

public class QuotaDetails
{
public int Limit { get; set; }
public Period Period { get; set; }
public int Remaining { get; set; }
public long Reset { get; set; }
public bool Unlimited { get; set; }
}

public enum Period
{
Minute, Hour, Day, Week, Never
}
}
}

0 comments on commit ae969df

Please sign in to comment.