﻿using Newtonsoft.Json;
using Zencoder.Converters;

namespace Zencoder.Accounts
{
    /// <summary>
    ///     Represents an zencocer account when getting reating or detailing accounts.
    /// </summary>
    [JsonObject(MemberSerialization = MemberSerialization.OptIn)]

    public class Account
    {
        /// <summary>
        ///     Gets or sets the account's new API key.
        /// </summary>
        [JsonProperty("api_key")]
        public string ApiKey { get; set; }

        /// <summary>
        ///     Gets or sets the account's password.
        /// </summary>
        [JsonProperty("password")]
        public string Password { get; set; }

        /// <summary>
        ///     Gets or sets the account's current state.
        ///     Sorry about the string, kids. Could't find an exhaustive list of states.
        /// </summary>
        [JsonProperty("account_state")]
        public string AccountState { get; set; }

        /// <summary>
        ///     Gets or sets the account's current billing state.
        ///     Sorry about the string, kids. Could't find an exhaustive list of states.
        /// </summary>
        [JsonProperty("billing_state")]
        public string BillingState { get; set; }

        /// <summary>
        ///     Gets or sets a value indicating whether the account is in integration mode.
        /// </summary>
        [JsonProperty("integration_mode")]
        [JsonConverter(typeof(BooleanConverter))]
        public bool IntegrationMode { get; set; }

        /// <summary>
        ///     Gets or sets the number of minutes included in the account's plan.
        /// </summary>
        [JsonProperty("minutes_included")]
        public int MinutesIncluded { get; set; }

        /// <summary>
        ///     Gets or sets the number of minutes used by the account.
        /// </summary>
        [JsonProperty("minutes_used")]
        public int MinutesUsed { get; set; }

        /// <summary>
        ///     Gets or sets the account's plan.
        /// </summary>
        [JsonProperty("plan")]
        public string Plan { get; set; }

    }
}