Sha256: e06e86173e12cee3b6a14281edbafe5c3d3cef7b9085ab59079f271f85373f16

Contents?: true

Size: 552 Bytes

Versions: 19

Compression:

Stored size: 552 Bytes

Contents

module Checkr
  class ReportList < APIList

    attr_accessor :parent

    api_instance_method :create, :post, :constructor => :Report, :default_params => :create_defaults, :arguments => [:package]

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

    def path
      "/v1/reports"
    end

    def create_defaults
      {
        :candidate_id => parent.id
      }
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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