public static List <Invoice> GetInvoiceHistory(int itemLimit, DateTime startDate, DateTime endDate, string accountId = null)
        {
            var invoices = new List <Invoice>();

            #region (Plan A) Check Redis Cache First

            #endregion

            #region (Plan B) Call Stripe API, Transform Data & Store in Redis Cache

            var stripeManager = new StripeManager();

            string stripeCustomerId = null;

            bool addAccountDetails = false;

            if (!String.IsNullOrEmpty(accountId))
            {
                stripeCustomerId = AccountManager.GetAccount(accountId, true, AccountManager.AccountIdentificationType.AccountID).StripeCustomerID;
            }
            else
            {
                addAccountDetails = true;
            }


            var stripeInvoices = stripeManager.GetInvoices(itemLimit, startDate, endDate, stripeCustomerId);

            if (stripeInvoices != null)
            {
                foreach (var stripeInvoice in stripeInvoices)
                {
                    invoices.Add(Transformations.TransformStripeInvoiceToInvoice(stripeInvoice, addAccountDetails));
                }
            }


            #endregion

            return(invoices);
        }