Class: Twilio::REST::Api::V2010::AccountContext::BalanceInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/balance.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil) ⇒ BalanceInstance

Initialize the BalanceInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil)

    The unique SID identifier of the Account.


80
81
82
83
84
85
86
87
88
89
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 80

def initialize(version, payload, account_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'account_sid' => payload['account_sid'],
      'balance' => payload['balance'],
      'currency' => payload['currency'],
  }
end

Instance Method Details

#account_sidString

Returns Account Sid.

Returns:

  • (String)

    Account Sid.


93
94
95
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 93

def 
  @properties['account_sid']
end

#balanceString

Returns Account balance.

Returns:

  • (String)

    Account balance


99
100
101
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 99

def balance
  @properties['balance']
end

#currencyString

Returns Currency units.

Returns:

  • (String)

    Currency units


105
106
107
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 105

def currency
  @properties['currency']
end

#inspectObject

Provide a detailed, user friendly representation


117
118
119
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 117

def inspect
  "<Twilio.Api.V2010.BalanceInstance>"
end

#to_sObject

Provide a user friendly representation


111
112
113
# File 'lib/twilio-ruby/rest/api/v2010/account/balance.rb', line 111

def to_s
  "<Twilio.Api.V2010.BalanceInstance>"
end