Skip to content

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
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