Skip to content

Conversation

@rtymchyk
Copy link
Contributor

@rtymchyk rtymchyk commented Jun 21, 2019

Addresses issue #13

Follows the documentation on:
https://docs.checkr.com/#tag/Adverse-Actions
https://docs.checkr.com/#tag/Adverse-Items

I was not able to implement https://docs.checkr.com/#operation/listOfAdverseActions.
A GET /v1/adverse_actions return Checkr::InvalidRequestError: Resource not found

Attributing that to outdated API documentation.

@rtymchyk
Copy link
Contributor Author

@capripot

@nothingisfunny
Copy link
Contributor

Hey @rtymchyk!
Thanks so much for your contribution. I tested your pr locally and found out that the association between Report and AdverseItem doesn't currently work. (I got adverse_items: null for a report that had an adverse item, correct me if you had different results when testing it)
I left some comments with changes that made it work for me. And was able to fetch adverse_items belonging to report by calling Checkr::AdverseItem.all(report_id: report.id)
Let us know if you could incorporate those in your pr.
Thanks a lot,
Lucya

@rtymchyk
Copy link
Contributor Author

rtymchyk commented Jul 2, 2019

@nothingisfunny Thanks. I was indeed fetching adverse items via Checkr::AdverseItem.all(report_id: x), not through the report resource, so I did not notice it was broken.

Will address the comments hopefully this week.

@nothingisfunny
Copy link
Contributor

nothingisfunny commented Jul 2, 2019

@rtymchyk Cool, sounds good. Thanks!

@rtymchyk
Copy link
Contributor Author

rtymchyk commented Jul 9, 2019

@nothingisfunny I've updated the PR with your suggestion.

I can now retrieve Adverse Items in 2 ways:

Checkr::Report.retrieve('x').adverse_items.all

and

Checkr::AdverseItem.all(report_id: 'x')

@rtymchyk
Copy link
Contributor Author

rtymchyk commented Jul 9, 2019

There's a failure on Travis which looks related to the environment:

Could not download 'https://github.com/rvm/rvm/archive/.tar.gz'.
  curl returned status '22'.
Downloading https://bitbucket.org/mpapis/rvm/get/.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Could not download 'https://bitbucket.org/mpapis/rvm/get/.tar.gz'.
  curl returned status '22'.
Could not update RVM, please report to https://github.com/rvm/rvm/issues
The command "rvm get stable" failed and exited with 22 during .

Copy link
Contributor

@nothingisfunny nothingisfunny left a comment

Choose a reason for hiding this comment

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

@rtymchyk A rerun on travis CI solved it, probably something was down at the time you ran it. Thank you again for contributing and making the requested changes! 🙌🏻

@nothingisfunny nothingisfunny merged commit 50a46d8 into checkr:master Jul 16, 2019
@rtymchyk
Copy link
Contributor Author

Thanks for the quick release.

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