Skip to content

Commit 9b03787

Browse files
committed
add future start-date to balance queries
1 parent 6119fbb commit 9b03787

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/lib/simplefin_client.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ def initialize(username, password)
1414

1515
# Method to fetch all accounts, balances only
1616
def get_accounts
17-
query_params = { "balances-only" => 1 }
17+
query_params = {
18+
"balances-only" => 1,
19+
"start-date" => (Time.now + (24 * 60 * 60)).to_i #future date to avoid grabbing any transactions
20+
}
1821
invoke_request("/accounts", query_params)
1922
end
2023

2124
# Method to fetch single account, balances only
2225
def get_account(account_id)
2326
query_params = {
2427
"balances-only" => 1,
28+
"start-date" => (Time.now + (24 * 60 * 60)).to_i, #future date to avoid grabbing any transactions
2529
"account" => URI.encode_www_form_component(account_id)
2630
}
2731
invoke_request("/accounts", query_params)

0 commit comments

Comments
 (0)