mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 22:45:20 +02:00
Pass transactions cursor when fetching plaid transactions
This commit is contained in:
parent
6935ffa3d1
commit
aecb5aafd8
6 changed files with 67 additions and 20 deletions
|
@ -20,6 +20,11 @@ class PlaidItem::AccountsSnapshot
|
|||
)
|
||||
end
|
||||
|
||||
def transactions_cursor
|
||||
return nil unless transactions_data
|
||||
transactions_data.cursor
|
||||
end
|
||||
|
||||
private
|
||||
attr_reader :plaid_item, :plaid_provider
|
||||
|
||||
|
@ -68,7 +73,11 @@ class PlaidItem::AccountsSnapshot
|
|||
|
||||
def transactions_data
|
||||
return nil unless can_fetch_transactions?
|
||||
@transactions_data ||= plaid_provider.get_transactions(plaid_item.access_token)
|
||||
|
||||
@transactions_data ||= plaid_provider.get_transactions(
|
||||
plaid_item.access_token,
|
||||
next_cursor: plaid_item.next_cursor
|
||||
)
|
||||
end
|
||||
|
||||
def can_fetch_investments?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue