Class: Telnyx::Resources::Balance

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/balance.rb,
sig/telnyx/resources/balance.rbs

Overview

Billing operations

Instance Method Summary collapse

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.

Parameters:



29
30
31
# File 'lib/telnyx/resources/balance.rb', line 29

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(request_options: {}) ⇒ Telnyx::Models::BalanceRetrieveResponse

Retrieve the current balance, available credit, and credit limit for your account.

Parameters:

Returns:

See Also:



17
18
19
20
21
22
23
24
# File 'lib/telnyx/resources/balance.rb', line 17

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "balance",
    model: Telnyx::Models::BalanceRetrieveResponse,
    options: params[:request_options]
  )
end