module DebounceIo::Balance
Constants
- BALANCE_PARAMS
- BALANCE_PROPERTIES
Public Instance Methods
call()
click to toggle source
# File lib/debounce_io/balance.rb, line 12 def call Client.get(params: BALANCE_PARAMS) .then { |balance_hash| sanitize_balance_params(balance_hash) } .then { |sanitized_params| OpenStruct.new(sanitized_params) } end
Private Instance Methods
sanitize_balance_params(balance_hash)
click to toggle source
# File lib/debounce_io/balance.rb, line 20 def sanitize_balance_params(balance_hash) balance_hash.slice(*BALANCE_PROPERTIES) end