Class: Cb::Clients::TalentNetwork
- Inherits:
-
Object
- Object
- Cb::Clients::TalentNetwork
- Defined in:
- lib/cb/clients/talent_network.rb
Class Method Summary collapse
- .join_form_branding(tndid) ⇒ Object
- .join_form_geography(tnlanguage = 'USEnglish') ⇒ Object
- .join_form_questions(tndid) ⇒ Object
- .member_create(args = {}) ⇒ Object
- .tn_job_information(job_did, join_form_intercept = 'true') ⇒ Object
Class Method Details
.join_form_branding(tndid) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cb/clients/talent_network.rb', line 21 def self.join_form_branding(tndid) my_api = Cb::Utils::Api.instance json_hash = my_api.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 my_api.append_api_responses(tn_join_form_branding, json_hash) end |
.join_form_geography(tnlanguage = 'USEnglish') ⇒ Object
32 33 34 35 36 37 |
# File 'lib/cb/clients/talent_network.rb', line 32 def self.join_form_geography(tnlanguage = 'USEnglish') my_api = Cb::Utils::Api.instance json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_join_form_geo}", query: { TNLanguage: "#{tnlanguage}" }) geo_dropdown = Models::TalentNetwork::JoinFormGeo.new(json_hash) my_api.append_api_responses(geo_dropdown, json_hash) end |
.join_form_questions(tndid) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/cb/clients/talent_network.rb', line 14 def self.join_form_questions(tndid) my_api = Cb::Utils::Api.instance json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_join_questions}/#{tndid}/json") tn_questions_collection = Models::TalentNetwork.new(json_hash) my_api.append_api_responses(tn_questions_collection, json_hash) end |
.member_create(args = {}) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/cb/clients/talent_network.rb', line 39 def self.member_create(args = {}) my_api = Cb::Utils::Api.instance tn_member = Models::TalentNetwork::Member.new(args) json_hash = my_api.cb_post("#{Cb.configuration.uri_tn_member_create}/json", body: tn_member.to_xml) my_api.append_api_responses(json_hash, json_hash) end |
.tn_job_information(job_did, join_form_intercept = 'true') ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cb/clients/talent_network.rb', line 46 def self.tn_job_information(job_did, join_form_intercept = 'true') my_api = Cb::Utils::Api.instance json_hash = my_api.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 my_api.append_api_responses(tn_job_info, json_hash) end |