Class: Twilio::REST::Records
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Records
- Defined in:
- lib/twilio-ruby/rest/usage/records.rb
Constant Summary collapse
- SUBRESOURCES =
[:daily, :monthly, :yearly, :all_time, :today, :yesterday, :this_month, :last_month]
Instance Method Summary collapse
-
#initialize(path, client) ⇒ Records
constructor
A new instance of Records.
- #method_missing(method, *args) ⇒ Object
Methods inherited from ListResource
#create, #get, #inspect, #list
Methods included from Utils
Constructor Details
#initialize(path, client) ⇒ Records
Returns a new instance of Records.
8 9 10 11 |
# File 'lib/twilio-ruby/rest/usage/records.rb', line 8 def initialize(path, client) super @list_key = 'usage_records' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
13 14 15 16 |
# File 'lib/twilio-ruby/rest/usage/records.rb', line 13 def method_missing(method, *args) return super unless SUBRESOURCES.include? method self.class.new "#{@path}/#{twilify(method)}", @client end |