cb-api 10.0.0 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,42 +14,6 @@ module Cb
14
14
  end
15
15
  my_api.append_api_responses(subscription, json_hash)
16
16
  end
17
-
18
- def self.modify_subscription ext_id, host_site, career_resources, product_sponsor_info, applicant_survey_invites, job_recs, unsubscribe_all
19
- if unsubscribe_all && unsubscribe_all != 'false'
20
- career_resources = product_sponsor_info = applicant_survey_invites = job_recs = false.to_s
21
- end
22
-
23
- career_resources = career_resources.nil? ? 'false' : career_resources
24
- product_sponsor_info = product_sponsor_info.nil? ? 'false' : product_sponsor_info
25
- applicant_survey_invites = applicant_survey_invites.nil? ? 'false' : applicant_survey_invites
26
- job_recs = job_recs.nil? ? 'false' : job_recs
27
- unsubscribe_all = unsubscribe_all.nil? ? 'false' : unsubscribe_all
28
-
29
- my_api = Cb::Utils::Api.instance
30
-
31
- xml_body = "<Request>"
32
- xml_body += "<DeveloperKey>" + Cb.configuration.dev_key.to_s + "</DeveloperKey>"
33
- xml_body += "<ExternalID>" + ext_id.to_s + "</ExternalID>"
34
- xml_body += "<Hostsite>" + host_site.to_s + "</Hostsite>"
35
- xml_body += "<CareerResources>" + career_resources.to_s + "</CareerResources>"
36
- xml_body += "<ProductSponsorInfo>" + product_sponsor_info.to_s + "</ProductSponsorInfo>"
37
- xml_body += "<ApplicantSurveyInvites>" + applicant_survey_invites.to_s + "</ApplicantSurveyInvites>"
38
- xml_body += "<JobRecs>" + job_recs.to_s + "</JobRecs>"
39
- xml_body += "<UnsubscribeAll>" + unsubscribe_all.to_s + "</UnsubscribeAll>"
40
- xml_body += "</Request>"
41
-
42
-
43
- json_hash = my_api.cb_post(Cb.configuration.uri_subscription_modify,
44
- :body => xml_body)
45
-
46
- if json_hash.has_key?('SubscriptionValues') && !json_hash['SubscriptionValues'].nil?
47
- subscription = Models::EmailSubscription.new(json_hash['SubscriptionValues'])
48
- my_api.append_api_responses(subscription, json_hash['SubscriptionValues'])
49
- end
50
- my_api.append_api_responses(subscription, json_hash)
51
- end
52
-
53
17
  end
54
18
  end
55
19
  end
@@ -60,7 +60,7 @@ module Cb
60
60
  @uri_tn_join_form_branding ||= '/talentnetwork/config/layout/branding'
61
61
  @uri_tn_member_create ||= '/talentnetwork/member/create'
62
62
  @uri_subscription_retrieve ||= '/v1/user/subscription/retrieve'
63
- @uri_subscription_modify ||= '/v1/user/subscription'
63
+ @uri_subscription_modify ||= '/v1/user/subscription?version=v2'
64
64
  @uri_saved_job_search_create ||= '/v2/savedsearch/create'
65
65
  @uri_spot_retrieve ||= '/v2/spot/load'
66
66
  end
@@ -2,7 +2,7 @@ module Cb
2
2
  module Models
3
3
  class EmailSubscription
4
4
  attr_accessor :career_resources, :product_sponsor_info, :applicant_survey_invites,
5
- :job_recs, :unsubscribe_all, :djr
5
+ :job_recs, :unsubscribe_all, :djr, :resume_viewed, :application_viewed
6
6
 
7
7
  def initialize(args = {})
8
8
  return if args.nil?
@@ -12,6 +12,8 @@ module Cb
12
12
  @applicant_survey_invites = args['ApplicantSurveyInvites'].to_s || ''
13
13
  @job_recs = args['JobRecs'].to_s || ''
14
14
  @djr = args['DJR'].to_s || ''
15
+ @resume_viewed = args['ResumeViewed'].to_s || ''
16
+ @application_viewed = args['ApplicationViewed'].to_s || ''
15
17
  end
16
18
  end
17
19
  end
@@ -24,6 +24,8 @@ module Cb
24
24
  <ApplicantSurveyInvites>#{validate args[:applicant_survey_invites]}</ApplicantSurveyInvites>
25
25
  <JobRecs>#{validate args[:job_recs]}</JobRecs>
26
26
  <DJR>#{validate args[:djr]}</DJR>
27
+ <ResumeViewed>#{validate args[:resume_viewed]}</ResumeViewed>
28
+ <ApplicationViewed>#{validate args[:application_viewed]}</ApplicationViewed>
27
29
  <UnsubscribeAll>#{args[:unsubscribe_all]}</UnsubscribeAll>
28
30
  </Request>
29
31
  eos
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '10.0.0'
2
+ VERSION = '11.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 11.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-16 00:00:00.000000000 Z
12
+ date: 2014-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty