Пример #1
0
            //When the XHR hook catches the transactions REST call

            private Xact ToXact(ScrapedXact sx)
            {
                return(new Xact()
                {
                    Amount = sx.debitCardType == "Credit" ? sx.transactionTotalAmount : -sx.transactionTotalAmount,
                    Desc = sx.statementDescription.Trim(),
                    When = DateTime.ParseExact(sx.transactionOverview.transactionDate.Split('T')[0], "yyyy-MM-dd", CultureInfo.InvariantCulture),
                    Balance = sx.transactionOverview.accountBalance,
                    IsPending = sx.transactionStatus == "pending",
                    IsProjected = false,
                    IsRecurring = false,
                    RecurrenceID = 0
                });
            }
Пример #2
0
 private Xact ToXact(ScrapedXact sx)
 {
     return(new Xact()
     {
         Amount = decimal.Parse(sx.Amount.Replace("$", "").Replace(",", "")),
         Desc = sx.Desc.Trim(),
         When = sx.When == string.Empty ? DateTime.Today : DateTime.ParseExact(sx.When, "MM/dd/yyyy", CultureInfo.InvariantCulture),
         Balance = decimal.Parse(sx.Balance.Replace("$", "").Replace(",", "")),
         IsPending = sx.When == string.Empty,
         IsProjected = false,
         IsRecurring = false,
         RecurrenceID = 0
     });
 }