cb-api 14.2.0 → 14.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
+ * 14.3.0 Added country codes api call
5
6
  * 14.2.0 Added resume language codes api call
6
7
  * 14.1.2 Added count limit to resume recommendations call
7
8
  * 14.1.1 Added case for Job model "pay" when setting model properties
@@ -87,7 +87,7 @@ module Cb
87
87
  @uri_resume_delete ||= '/cbapi/resumes/:resume_hash'
88
88
  @uri_resume_list ||= '/v3/resume/list'
89
89
  @uri_resume_language_codes ||= '/v1/languagecodes'
90
-
90
+ @uri_country_codes ||= '/v1/countrycodes'
91
91
  end
92
92
 
93
93
  def set_attr_accessors
@@ -0,0 +1,15 @@
1
+ module Cb
2
+ module Models
3
+ class CountryCode < ApiResponseModel
4
+ attr_accessor :code
5
+
6
+ def set_model_properties
7
+ @code = api_response['CountryCode']
8
+ end
9
+
10
+ def required_fields
11
+ ['CountryCode']
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,24 @@
1
+ require_relative '../base'
2
+
3
+ module Cb
4
+ module Requests
5
+ module DataLists
6
+ class CountryCodes < Base
7
+ def endpoint_uri
8
+ Cb.configuration.uri_country_codes
9
+ end
10
+
11
+ def http_method
12
+ :get
13
+ end
14
+
15
+ def headers
16
+ {
17
+ 'DeveloperKey' => Cb.configuration.dev_key,
18
+ 'Content-Type' => 'application/xml'
19
+ }
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,37 @@
1
+ module Cb
2
+ module Responses
3
+ class CountryCodes < ApiResponse
4
+
5
+ protected
6
+
7
+ def validate_api_hash
8
+ required_response_field(root_node, response)
9
+ required_response_field(collection_node, response[root_node])
10
+ required_response_field('CountryCode', response[root_node][collection_node])
11
+ end
12
+
13
+ def hash_containing_metadata
14
+ response[root_node]
15
+ end
16
+
17
+ def extract_models
18
+ model_hash.map! { |country_code| Models::CountryCode.new('CountryCode' => country_code) }
19
+ end
20
+
21
+ private
22
+
23
+ def root_node
24
+ 'ResponseCountryCodes'
25
+ end
26
+
27
+ def collection_node
28
+ 'SupportedCountryCodes'
29
+ end
30
+
31
+ def model_hash
32
+ response[root_node][collection_node]['CountryCode']
33
+ end
34
+ end
35
+ end
36
+ end
37
+
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '14.2.0'
2
+ VERSION = '14.3.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: 14.2.0
4
+ version: 14.3.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-11-07 00:00:00.000000000 Z
12
+ date: 2014-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -232,6 +232,7 @@ files:
232
232
  - lib/cb/responses/anonymous_saved_search/create.rb
233
233
  - lib/cb/responses/application.rb
234
234
  - lib/cb/responses/metadata.rb
235
+ - lib/cb/responses/data_list/country_codes.rb
235
236
  - lib/cb/responses/job/singular.rb
236
237
  - lib/cb/responses/job/search.rb
237
238
  - lib/cb/responses/application/application_form.rb
@@ -304,6 +305,7 @@ files:
304
305
  - lib/cb/models/implementations/resumes/salary_information.rb
305
306
  - lib/cb/models/implementations/resumes/language_code.rb
306
307
  - lib/cb/models/implementations/resumes/education.rb
308
+ - lib/cb/models/implementations/resumes/country_code.rb
307
309
  - lib/cb/models/implementations/resumes/skills_and_qualifications.rb
308
310
  - lib/cb/models/implementations/resumes/work_experience.rb
309
311
  - lib/cb/models/implementations/resumes/government_and_military.rb
@@ -330,6 +332,7 @@ files:
330
332
  - lib/cb/requests/category/search.rb
331
333
  - lib/cb/requests/application_external/submit_application.rb
332
334
  - lib/cb/requests/company/find.rb
335
+ - lib/cb/requests/data_lists/country_codes.rb
333
336
  - lib/cb/requests/resumes/list.rb
334
337
  - lib/cb/requests/resumes/put.rb
335
338
  - lib/cb/requests/resumes/delete.rb