Skip to content

Commit

Permalink
feat: fetch movements up to 3 months in the past
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardosimonpicon committed Aug 8, 2023
1 parent 7a99008 commit 48ee35b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/open_banking_connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def fetch_movements(external_account_id:)
raise StandardError.new({message: "balances object was empty", params: main_balance}) if main_balance.nil?

seconds_in_day = 60 * 60 * 24
previous_month = Time.now - (seconds_in_day * 30)
previous_month = Time.now - (seconds_in_day * 30 * 3)
get_transactions_response = account.get_transactions(
date_from: previous_month.strftime("%F"),
date_to: Time.now.strftime("%F")
Expand Down

0 comments on commit 48ee35b

Please sign in to comment.