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.13.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.12.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.11.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.11.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.10.0.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.10.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.9.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.9.1.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.9.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.9.0.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.8.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.7.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.8.3.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.8.2.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.8.1.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.8.0.edge lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.6.2 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.6.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.6.0 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-4.7.0.edge lib/twilio-ruby/rest/usage/records.rb