Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: candidate_id should be a string #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions lib/checkr/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class Report < APIResource
attribute :turnaround_time
attribute :package
attribute :values
attribute :candidate_id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the key line.

attribute :candidate, :Candidate
attribute_writer_alias :candidate_id, :candidate

attribute :adverse_items, :AdverseItemList, :nested => true, :default => {}
attribute :adverse_items, :AdverseItemList, nested: true, default: {}
attribute_writer_alias :adverse_item_ids, :adverse_items

attribute :ssn_trace, :SSNTrace
Expand Down Expand Up @@ -47,10 +47,10 @@ class Report < APIResource
attribute :documents, APIList.constructor(:Document)
attribute_writer_alias :document_ids, :documents

attribute :geos, APIList.constructor(:Geo), :default => {}
attribute :geos, APIList.constructor(:Geo), default: {}
attribute_writer_alias :geo_ids, :geos

attribute :verifications, :VerificationList, :nested => true, :default => {}
attribute :verifications, :VerificationList, nested: true, default: {}
attribute_writer_alias :verification_ids, :verifications

attribute :education_verification, :EducationVerification
Expand All @@ -59,15 +59,16 @@ class Report < APIResource
attribute :employment_verification, :EmploymentVerification
attribute_writer_alias :employment_verification_id, :employment_verification

api_class_method :retrieve, :get, ":path/:id", :arguments => [:id]
api_class_method :retrieve, :get, ':path/:id', arguments: [:id]
api_class_method :create, :post

api_instance_method :save, :post, :default_params => :changed_attributes
api_instance_method :save, :post, default_params: :changed_attributes

def self.path
"/v1/reports"
'/v1/reports'
end

APIClass.register_subclass(self, "report")
APIClass.register_subclass(self, 'report')

end
end