Class: Cb::Clients::EmployeeTypes

Inherits:
Base
  • Object
show all
Defined in:
lib/cb/clients/employee_types.rb

Class Method Summary collapse

Methods inherited from Base

cb_client, headers

Class Method Details

.endpoint ⇒ Object



27
28
29
# File 'lib/cb/clients/employee_types.rb', line 27

def self.endpoint
  Cb.configuration.uri_employee_types
end

.new_response_object(json_response) ⇒ Object



31
32
33
# File 'lib/cb/clients/employee_types.rb', line 31

def self.new_response_object(json_response)
  Responses::EmployeeTypes::Search.new(json_response)
end

.search ⇒ Object



15
16
17
18
# File 'lib/cb/clients/employee_types.rb', line 15

def self.search
  json = cb_client.cb_get(endpoint)
  new_response_object(json)
end

.search_by_hostsite(host_site) ⇒ Object



20
21
22
23
# File 'lib/cb/clients/employee_types.rb', line 20

def self.search_by_hostsite(host_site)
  json = cb_client.cb_get(endpoint, query: { CountryCode: host_site })
  new_response_object(json)
end