Sha256: 5a7e7e6f1cb0c6e0f60907d12f72484238568397a9d1f4d589dfb694ad82aa19

Contents?: true

Size: 441 Bytes

Versions: 19

Compression:

Stored size: 441 Bytes

Contents

module Checkr
  class APIResource < APIClass
    attribute :id
    attribute :object
    attribute :uri
    attribute :created_at

    api_instance_method :refresh, :get, :constructor => :self

    def path(base=self.class.path)
      unless id
        raise InvalidRequestError.new("Could not determine which URL to request: #{self.class} instance has an invalid ID: #{id.inspect}", 'id')
      end
      "#{base}/#{id}"
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
checkr-official-1.8.0 lib/checkr/api_resource.rb
checkr-official-1.7.1 lib/checkr/api_resource.rb
checkr-official-1.7 lib/checkr/api_resource.rb
checkr-official-1.6 lib/checkr/api_resource.rb
checkr-official-1.5.4 lib/checkr/api_resource.rb
checkr-official-1.5.3 lib/checkr/api_resource.rb
checkr-official-1.5.2 lib/checkr/api_resource.rb
checkr-official-1.5.1 lib/checkr/api_resource.rb
checkr-official-1.5.0 lib/checkr/api_resource.rb
checkr-official-1.4.0 lib/checkr/api_resource.rb
checkr-official-1.3.1 lib/checkr/api_resource.rb
checkr-official-1.2.1 lib/checkr/api_resource.rb
checkr-official-1.2.0 lib/checkr/api_resource.rb
checkr-official-1.1.2 lib/checkr/api_resource.rb
checkr-official-1.1.1 lib/checkr/api_resource.rb
checkr-official-1.1.0 lib/checkr/api_resource.rb
checkr-official-1.0.2 lib/checkr/api_resource.rb
checkr-official-1.0.1 lib/checkr/api_resource.rb
checkr-official-1.0.0 lib/checkr/api_resource.rb