Class: Moip2::BalancesApi
- Inherits:
-
Object
- Object
- Moip2::BalancesApi
- Defined in:
- lib/moip2/balances_api.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #base_path ⇒ Object
-
#initialize(client) ⇒ BalancesApi
constructor
A new instance of BalancesApi.
- #show ⇒ Object
Constructor Details
#initialize(client) ⇒ BalancesApi
5 6 7 8 |
# File 'lib/moip2/balances_api.rb', line 5 def initialize(client) client.opts[:headers]["Accept"] = "application/json;version=2.1" @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/moip2/balances_api.rb', line 3 def client @client end |
Instance Method Details
#base_path ⇒ Object
10 11 12 |
# File 'lib/moip2/balances_api.rb', line 10 def base_path "/v2/balances" end |
#show ⇒ Object
14 15 16 |
# File 'lib/moip2/balances_api.rb', line 14 def show Resource::Balances.new(client, client.get(base_path)) end |