init push - laying out the project

This commit is contained in:
Mike Sutton
2022-11-12 02:27:46 +01:00
commit 14e163a1a5
183 changed files with 20069 additions and 0 deletions

View File

@ -0,0 +1,16 @@
module Integrations
module Betfair
class AccountManager < Base
def refresh_account_balance
# go check the account balance and update the ExchangeAccount for this account
res = self.class.post("#{API_ACCOUNT_ENDPOINT}/getAccountFunds/", { headers: @connection.api_headers, data: {} })
if res['availableToBetBalance']
acc_bal = res['availableToBetBalance']
@account.update(account_balance: acc_bal, account_balance_last_checked: Time.now)
end
@account.account_balance
end
end
end
end