public static TransactionDetail Load(dynamic dyn) { Func <dynamic, TransactionDetail> func = (d) => { var result = new TransactionDetail { AccountId = d.account_id, AccountName = d.account_name, Amount = d.amount, Approved = d.approved, CategoryId = d.category_id, CategoryName = d.category_name, Cleared = d.cleared, Date = d.date, Deleted = d.deleted, FlagColor = d.flag_color, ImportId = d.import_id, Memo = d.memo, PayeeId = d.payee_id, PayeeName = d.payee_name, TransactionId = d.id, TransferAccountId = d.transfer_account_id, TransferTransactionId = d.transfer_transaction_id, }; foreach (var s in d.subtransactions) { result.SubTransactions.Add(SubTransaction.Load(s)); } return(result); }; return(YnabApi.ProcessApiResult(dyn, func)); }
public static TransactionWrapper Load(dynamic dyn) { Func <dynamic, TransactionWrapper> func = (d) => { return(new TransactionWrapper { Transaction = TransactionDetail.Load(d.transaction) }); }; return(YnabApi.ProcessApiResult(dyn, func)); }
public static TransactionsWrapper Load(dynamic dyn) { Func <dynamic, TransactionsWrapper> func = (d) => { var result = new TransactionsWrapper { ServerKnowledge = d.server_knowledge }; foreach (var t in d.transactions) { result.Transactions.Add(TransactionDetail.Load(t)); } return(result); }; return(YnabApi.ProcessApiResult(dyn, func)); }