Class: Zavudev::Resources::Balance
- Inherits:
-
Object
- Object
- Zavudev::Resources::Balance
- Defined in:
- lib/zavudev/resources/balance.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Balance
constructor
private
A new instance of Balance.
-
#retrieve(request_options: {}) ⇒ Zavudev::Models::BalanceRetrieveResponse
Get balance for the API key’s team.
Constructor Details
#initialize(client:) ⇒ Balance
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Balance.
28 29 30 |
# File 'lib/zavudev/resources/balance.rb', line 28 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(request_options: {}) ⇒ Zavudev::Models::BalanceRetrieveResponse
Get balance for the API key’s team. If the API key belongs to a sub-account, also includes the sub-account’s total spending and credit limit.
16 17 18 19 20 21 22 23 |
# File 'lib/zavudev/resources/balance.rb', line 16 def retrieve(params = {}) @client.request( method: :get, path: "v1/balance", model: Zavudev::Models::BalanceRetrieveResponse, options: params[:request_options] ) end |