using System.Runtime.Serialization;
using Newtonsoft.Json.Converters;
namespace AMWD.Net.Api.Cloudflare
{
///
/// A Cloudflare subscription.
/// Source
///
public class Subscription
{
///
/// Subscription identifier tag.
///
[JsonProperty("id")]
public string? Id { get; set; }
///
/// The monetary unit in which pricing information is displayed.
///
[JsonProperty("currency")]
public string? Currency { get; set; }
///
/// The end of the current period and also when the next billing is due.
///
[JsonProperty("current_period_end")]
public DateTime? CurrentPeriodEnd { get; set; }
///
/// When the current billing period started.
///
[JsonProperty("current_period_start")]
public DateTime? CurrentPeriodStart { get; set; }
///
/// How often the subscription is renewed automatically.
///
[JsonProperty("frequency")]
public Frequency? Frequency { get; set; }
///
/// The price of the subscription that will be billed, in US dollars.
///
[JsonProperty("price")]
public decimal? Price { get; set; }
///
/// The rate plan applied to the subscription.
///
[JsonProperty("rate_plan")]
public RatePlan? RatePlan { get; set; }
///
/// The state that the subscription is in.
///
[JsonProperty("state")]
public SubscriptionState? State { get; set; }
}
///
/// The state that the subscription is in.
/// Source
///
[JsonConverter(typeof(StringEnumConverter))]
public enum SubscriptionState
{
///
/// The subscription is in the trial period.
///
[EnumMember(Value = "Trial")]
Trial = 1,
///
/// The subscription is provisioned.
///
[EnumMember(Value = "Provisioned")]
Provisioned = 2,
///
/// The subscription is paid.
///
[EnumMember(Value = "Paid")]
Paid = 3,
///
/// The subscription is awaiting payment.
///
[EnumMember(Value = "AwaitingPayment")]
AwaitingPayment = 4,
///
/// The subscription is cancelled.
///
[EnumMember(Value = "Cancelled")]
Cancelled = 5,
///
/// The subscription has failed.
///
[EnumMember(Value = "Failed")]
Failed = 6,
///
/// The subscription has expired.
///
[EnumMember(Value = "Expired")]
Expired = 7
}
}