Sha256: d5b07dd2cfd8cd1f9ac8131ed719d76f338b9ddb5ea46a0162173ca073abd40b

Contents?: true

Size: 534 Bytes

Versions: 19

Compression:

Stored size: 534 Bytes

Contents

module Checkr
  class DocumentList < APIList

    attribute :next_href
    attribute :previous_href
    attribute :count
    attr_accessor :parent

    api_instance_method :all, :get
    api_instance_method :create, :post, :constructor => :Document

    def self.construct(json, parent=nil)
      lambda = constructor(:Document)
      instance = lambda.call(json)
      instance.parent = parent if parent
      instance.clear_changed_attributes
      instance
    end

    def path
      parent.path + "/documents"
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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