class Twilio::REST::Api::V2010::AccountContext::UsageList

Public Class Methods

new(version, account_sid: nil) click to toggle source

Initialize the UsageList @param [Version] version Version that contains the resource @param [String] account_sid A 34 character string that uniquely identifies this

resource.

@return [UsageList] UsageList

Calls superclass method Twilio::REST::ListResource::new
   # File lib/twilio-ruby/rest/api/v2010/account/usage.rb
21 def initialize(version, account_sid: nil)
22   super(version)
23 
24   # Path Solution
25   @solution = {account_sid: account_sid}
26 
27   # Components
28   @records = nil
29   @triggers = nil
30 end

Public Instance Methods

records() click to toggle source

Access the records @return [RecordList] @return [RecordContext]

   # File lib/twilio-ruby/rest/api/v2010/account/usage.rb
36 def records
37   @records ||= RecordList.new(@version, account_sid: @solution[:account_sid], )
38 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/api/v2010/account/usage.rb
58 def to_s
59   '#<Twilio.Api.V2010.UsageList>'
60 end
triggers(sid=:unset) click to toggle source

Access the triggers @param [String] sid The Twilio-provided string that uniquely identifies the

UsageTrigger resource to fetch.

@return [TriggerList] @return [TriggerContext] if sid was passed.

   # File lib/twilio-ruby/rest/api/v2010/account/usage.rb
46 def triggers(sid=:unset)
47   raise ArgumentError, 'sid cannot be nil' if sid.nil?
48 
49   if sid != :unset
50     return TriggerContext.new(@version, @solution[:account_sid], sid, )
51   end
52 
53     @triggers ||= TriggerList.new(@version, account_sid: @solution[:account_sid], )
54 end