cb-api 7.5.0 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -82,6 +82,7 @@ Currently, this workflow only works on the following endpoints:
82
82
  * Application
83
83
  * Application External
84
84
  * Category
85
+ * Education
85
86
  * Company
86
87
  * User
87
88
 
@@ -0,0 +1,25 @@
1
+ require_relative '../base'
2
+
3
+ module Cb
4
+ module Requests
5
+ module Education
6
+ class Get < Base
7
+
8
+ def endpoint_uri
9
+ Cb.configuration.uri_education_code
10
+ end
11
+
12
+ def http_method
13
+ :get
14
+ end
15
+
16
+ def query
17
+ {
18
+ CountryCode: @args[:country_code]
19
+ }
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,44 @@
1
+ require 'cb/responses/api_response'
2
+
3
+ module Cb
4
+ module Responses
5
+ module Education
6
+ class Get < ApiResponse
7
+
8
+ protected
9
+
10
+ def hash_containing_metadata
11
+ response
12
+ end
13
+
14
+ def validate_api_hash
15
+ required_response_field(response_node, response)
16
+ required_response_field(education_codes_node, response[response_node])
17
+ required_response_field(education_array_node, response[response_node][education_codes_node])
18
+ end
19
+
20
+ def extract_models
21
+ model_array.map { |category| Cb::Models::Education.new(category) }
22
+ end
23
+
24
+ private
25
+
26
+ def response_node
27
+ "ResponseEducationCodes"
28
+ end
29
+
30
+ def education_codes_node
31
+ "EducationCodes"
32
+ end
33
+
34
+ def education_array_node
35
+ "Education"
36
+ end
37
+
38
+ def model_array
39
+ response[response_node][education_codes_node][education_array_node]
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -24,6 +24,8 @@ module Cb
24
24
 
25
25
  Cb::Requests::Category::Search => Cb::Responses::Category::Search,
26
26
 
27
+ Cb::Requests::Education::Get => Cb::Responses::Education::Get,
28
+
27
29
  Cb::Requests::Company::Find => Cb::Responses::Company::Find,
28
30
 
29
31
  Cb::Requests::User::ChangePassword => Cb::Responses::User::ChangePassword,
data/lib/cb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '7.5.0'
2
+ VERSION = '7.6.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: 7.5.0
4
+ version: 7.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -235,6 +235,7 @@ files:
235
235
  - lib/cb/responses/employee_types/search.rb
236
236
  - lib/cb/responses/errors.rb
237
237
  - lib/cb/responses/company/find.rb
238
+ - lib/cb/responses/education/get.rb
238
239
  - lib/cb/exceptions.rb
239
240
  - lib/cb/config.rb
240
241
  - lib/cb/models/api_response_model.rb
@@ -287,6 +288,7 @@ files:
287
288
  - lib/cb/requests/category/search.rb
288
289
  - lib/cb/requests/application_external/submit_application.rb
289
290
  - lib/cb/requests/company/find.rb
291
+ - lib/cb/requests/education/get.rb
290
292
  - lib/cb/convenience.rb
291
293
  - lib/cb/clients/job_branding.rb
292
294
  - lib/cb/clients/recommendation.rb