Sha256: eb157ec60c8f6e5337914926ee4acea55b0a56d5ba8b7830c8b1e3fbfcdf67e5

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

module Restcomm
  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}/#{restify(method)}", @client
      end
    end

    class Record < InstanceResource; end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restcomm-ruby-1.2.1 lib/restcomm-ruby/rest/usage/records.rb
restcomm-ruby-1.2.0 lib/restcomm-ruby/rest/usage/records.rb