Sha256: 9bbc9dc4e385125b19c89beed5a78999c775201d3bde314253d6c6b8454c061f

Contents?: true

Size: 516 Bytes

Versions: 45

Compression:

Stored size: 516 Bytes

Contents

module Twilio
  module REST
    class Records < ListResource

      SUBRESOURCES = [:daily, :monthly, :yearly, :all_time, :today,
                      :yesterday, :this_month, :last_month]

      def initialize(path, client)
        super
        @list_key = 'usage_records'
      end

      def method_missing(method, *args)
        return super unless SUBRESOURCES.include? method
        self.class.new "#{@path}/#{twilify(method)}", @client
      end
    end

    class Record < InstanceResource; end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
twilio-ruby-4.6.0.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.5.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.4.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.3.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.2.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.2.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.1.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.0.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.0.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.16.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.16.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.15.2 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.15.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.15.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.5 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.4 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.3 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.2 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.14.0 lib/twilio-ruby/rest/usage/records.rb