Commit 93ca4a74 authored by Sergey Gernyak's avatar Sergey Gernyak

FEAT: getAccountFunds request method

parent 2890f77c
......@@ -68,6 +68,7 @@ module BetfairApiNgRails
autoload :LimitOnCloseOrder, 'betfair_api_ng_rails/api/data/limit_on_close_order'
autoload :MarketOnCloseOrder, 'betfair_api_ng_rails/api/data/market_on_close_order'
autoload :AccountDetailsResponse,'betfair_api_ng_rails/api/data/account_details_response'
autoload :AccountFundsResponse, 'betfair_api_ng_rails/api/data/account_funds_response'
module Concerns
autoload :Hashable, 'betfair_api_ng_rails/api/data/concerns/hashable'
......@@ -127,6 +128,7 @@ module BetfairApiNgRails
autoload :ListMarketBook, 'betfair_api_ng_rails/api/parsers/list_market_book'
autoload :PlaceOrders, 'betfair_api_ng_rails/api/parsers/place_orders'
autoload :GetAccountDetails, 'betfair_api_ng_rails/api/parsers/get_account_details'
autoload :GetAccountFunds, 'betfair_api_ng_rails/api/parsers/get_account_funds'
end
module ConnectionExt
......
module BetfairApiNgRails
module Api
module Data
class AccountFundsResponse < Api::Data::Base
include Api::Data::Concerns::Hashable
ACCOUNT_FUNDS_RESPONSE_ATTRS = [
:available_to_bet_balance,
:exposure,
:retained_comission,
:exposure_limit,
:discount_rate,
:points_balance
]
attributes ACCOUNT_FUNDS_RESPONSE_ATTRS
def self.to_hash_attrs
ACCOUNT_FUNDS_RESPONSE_ATTRS
end
end
end
end
end
module BetfairApiNgRails
module Api
module Parsers
class GetAccountFunds < Api::Parsers::SingleBase
private
def data_class
Api::Data::AccountFundsResponse
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment