Sha256: 56e31f0d2911d3bcd3691904702a21938b43515bd994944253f05f82009c892d

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 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)
        super unless SUBRESOURCES.include? method
        self.class.new "#{@path}/#{twilify(method)}", @client
      end
    end

    class Record < InstanceResource; end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twilio-ruby-3.10.1 lib/twilio-ruby/rest/usage/records.rb
twilio-ruby-3.10.0 lib/twilio-ruby/rest/usage/records.rb