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

Conversation

xiaoronglv
Copy link
Contributor

@xiaoronglv xiaoronglv commented Aug 1, 2022

Problem:

Based on the documentation, the candidate_id attribute of the report model should be a string. This gem using alias method to delegate candidate_id to the candidate object, which is a json object.

it caused errors.

# How to reproduce it?
response = Checkr::Report.retrieve(report_id)
response.candidate_id

image

Changes

explicitly define the method to access the candidate_id

reference

https://docs.checkr.com/#operation/getReport

Problem:

when retrieving the report, the candidate is a json object. alias method
can't delegate `candidate_id` to the candidate object.

What's the change?

explicitly define the method to access the candidate_id
@@ -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.

@xiaoronglv
Copy link
Contributor Author

Hi @akshay-8d66 , could you please help to review my code when you get the time?

@akshay-8d66
Copy link
Collaborator

This makes sense to me. Could you look into the failing tests. Happy to help if it's unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants