Class: GreenhouseApi::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/greenhouse_api/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Client

Returns a new instance of Client.



11
12
13
# File 'lib/greenhouse_api/client.rb', line 11

def initialize(api_key)
  @api_key = api_key
end

Instance Method Details

#create_user(first_name:, last_name:, email:, on_behalf_of_id:, **additional_args) ⇒ Object



31
32
33
# File 'lib/greenhouse_api/client.rb', line 31

def create_user(first_name:, last_name:, email:, on_behalf_of_id:, **additional_args)
  users_client.create_user(first_name: first_name, last_name: last_name, email: email, on_behalf_of_id: on_behalf_of_id, **additional_args)
end

#disable_user(user, on_behalf_of_id) ⇒ Object



35
36
37
# File 'lib/greenhouse_api/client.rb', line 35

def disable_user(user, on_behalf_of_id)
  users_client.disable_user(user, on_behalf_of_id)
end

#enable_user(user, on_behalf_of_id) ⇒ Object



39
40
41
# File 'lib/greenhouse_api/client.rb', line 39

def enable_user(user, on_behalf_of_id)
  users_client.enable_user(user, on_behalf_of_id)
end

#get_current_offer_for_application(application_id) ⇒ Object



27
28
29
# File 'lib/greenhouse_api/client.rb', line 27

def get_current_offer_for_application(application_id)
  offers_client.get_current_offer_for_application(application_id)
end

#get_one(resource, id) ⇒ Object



15
16
17
# File 'lib/greenhouse_api/client.rb', line 15

def get_one(resource, id)
  base_client.get_one(resource, id)
end

#list_candidates(params = {}) ⇒ Object



23
24
25
# File 'lib/greenhouse_api/client.rb', line 23

def list_candidates(params = {})
  candidates_client.list_all(params)
end

#list_many(resource, params = {}) ⇒ Object



19
20
21
# File 'lib/greenhouse_api/client.rb', line 19

def list_many(resource, params = {})
  base_client.list_many(resource, params)
end