diff --git a/lib/greenhouse_io/api/client.rb b/lib/greenhouse_io/api/client.rb index 453d52d..f65adfa 100644 --- a/lib/greenhouse_io/api/client.rb +++ b/lib/greenhouse_io/api/client.rb @@ -32,6 +32,22 @@ def activity_feed(id, options = {}) get_from_harvest_api "/candidates/#{id}/activity_feed", options end + def create_candidate(hash, on_behalf_of) + post_to_harvest_api( + '/candidates', + hash, + { 'On-Behalf-Of' => on_behalf_of.to_s } + ) + end + + def create_prospect(hash, on_behalf_of) + post_to_harvest_api( + '/prospects', + hash, + { 'On-Behalf-Of' => on_behalf_of.to_s } + ) + end + def create_candidate_note(candidate_id, note_hash, on_behalf_of) post_to_harvest_api( "/candidates/#{candidate_id}/activity_feed/notes", @@ -96,7 +112,7 @@ def permitted_options(options) def get_from_harvest_api(url, options = {}) response = get_response(url, { - :query => permitted_options(options), + :query => permitted_options(options), :basic_auth => basic_auth })