Class: Cb::Clients::TalentNetwork

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

Class Method Summary collapse

Methods inherited from Base

cb_client, headers

Class Method Details

.join_form_branding(tndid) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/cb/clients/talent_network.rb', line 21

def self.join_form_branding(tndid)
  json_hash = cb_client.cb_get("#{Cb.configuration.uri_tn_join_form_branding}/#{tndid}/json")

  if json_hash.key? 'Branding'
    tn_join_form_branding = Models::TalentNetwork::JoinFormBranding.new(json_hash['Branding'])
  end

  cb_client.append_api_responses(tn_join_form_branding, json_hash)
end

.join_form_geography(tnlanguage = 'USEnglish') ⇒ Object



31
32
33
34
35
# File 'lib/cb/clients/talent_network.rb', line 31

def self.join_form_geography(tnlanguage = 'USEnglish')
  json_hash = cb_client.cb_get("#{Cb.configuration.uri_tn_join_form_geo}", query: { TNLanguage: "#{tnlanguage}" })
  geo_dropdown = Models::TalentNetwork::JoinFormGeo.new(json_hash)
  cb_client.append_api_responses(geo_dropdown, json_hash)
end

.join_form_questions(tndid) ⇒ Object



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

def self.join_form_questions(tndid)
  json_hash = cb_client.cb_get("#{Cb.configuration.uri_tn_join_questions}/#{tndid}/json")
  tn_questions_collection = Models::TalentNetwork.new(json_hash)
  cb_client.append_api_responses(tn_questions_collection, json_hash)
end

.member_create(args = {}) ⇒ Object



37
38
39
40
41
# File 'lib/cb/clients/talent_network.rb', line 37

def self.member_create(args = {})
  tn_member = Models::TalentNetwork::Member.new(args)
  json_hash = cb_client.cb_post("#{Cb.configuration.uri_tn_member_create}/json", body: tn_member.to_xml)
  cb_client.append_api_responses(json_hash, json_hash)
end

.tn_job_information(job_did, join_form_intercept = 'true') ⇒ Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/cb/clients/talent_network.rb', line 43

def self.tn_job_information(job_did, join_form_intercept = 'true')
  json_hash = cb_client.cb_get("#{Cb.configuration.uri_tn_job_info}/#{job_did}/json",
                            query: {RequestJoinFormIntercept: join_form_intercept } )

  if json_hash.key? 'Response'
    tn_job_info = Models::TalentNetwork::JobInfo.new(json_hash['Response'])
  end

  cb_client.append_api_responses(tn_job_info, json_hash)
end