lib/twilio-ruby/rest/api/v2010/account.rb in twilio-ruby-5.15.1 vs lib/twilio-ruby/rest/api/v2010/account.rb in twilio-ruby-5.15.2

- old
+ new

@@ -195,10 +195,11 @@ # Dependents @addresses = nil @applications = nil @authorized_connect_apps = nil @available_phone_numbers = nil + @balance = nil @calls = nil @conferences = nil @connect_apps = nil @incoming_phone_numbers = nil @keys = nil @@ -327,10 +328,22 @@ @available_phone_numbers end ## + # Access the balance + # @return [BalanceList] + # @return [BalanceContext] + def balance + unless @balance + @balance = BalanceList.new(@version, account_sid: @solution[:sid], ) + end + + @balance + end + + ## # Access the calls # @return [CallList] # @return [CallContext] if sid was passed. def calls(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? @@ -786,9 +799,16 @@ ## # Access the available_phone_numbers # @return [available_phone_numbers] available_phone_numbers def available_phone_numbers context.available_phone_numbers + end + + ## + # Access the balance + # @return [balance] balance + def balance + context.balance end ## # Access the calls # @return [calls] calls \ No newline at end of file