public static List <Transfer> GetTransferHistory_ByDateRange_Last(int itemLimit, string endingBeforeTransferId, DateTime startDate, DateTime endDate, string accountId = null) { var transfers = new List <Transfer>(); #region (Plan A) Check Redis Cache First #endregion #region (Plan B) Call Stripe API, Transform Data & Store in Redis Cache var stripeManager = new StripeManager(); var stripeTransfers = stripeManager.GetTransfers_ByDateRange_Last(itemLimit, endingBeforeTransferId, startDate, endDate); if (stripeTransfers != null) { foreach (var stripeTransfer in stripeTransfers) { transfers.Add(Transformations.TransformStripeTransferToTransfer(stripeTransfer)); } } #endregion return(transfers); }