cb-api 17.4.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -0
  3. data/CONTRIBUTING.md +18 -0
  4. data/LICENSE +202 -0
  5. data/README.md +3 -1
  6. data/lib/cb.rb +12 -2
  7. data/lib/cb/client.rb +10 -0
  8. data/lib/cb/clients/anon_saved_search.rb +12 -4
  9. data/lib/cb/clients/application.rb +10 -2
  10. data/lib/cb/clients/application_external.rb +13 -5
  11. data/lib/cb/clients/category.rb +16 -8
  12. data/lib/cb/clients/company.rb +16 -8
  13. data/lib/cb/clients/education.rb +17 -9
  14. data/lib/cb/clients/employee_types.rb +11 -3
  15. data/lib/cb/clients/industry.rb +12 -3
  16. data/lib/cb/clients/job.rb +10 -2
  17. data/lib/cb/clients/job_branding.rb +13 -5
  18. data/lib/cb/clients/recommendation.rb +27 -18
  19. data/lib/cb/clients/saved_search.rb +21 -15
  20. data/lib/cb/clients/talent_network.rb +20 -12
  21. data/lib/cb/clients/user.rb +22 -14
  22. data/lib/cb/config.rb +64 -54
  23. data/lib/cb/convenience.rb +22 -13
  24. data/lib/cb/criteria/application/cover_letter.rb +10 -0
  25. data/lib/cb/criteria/application/create.rb +11 -1
  26. data/lib/cb/criteria/application/get.rb +10 -0
  27. data/lib/cb/criteria/application/response.rb +10 -0
  28. data/lib/cb/criteria/application/resume.rb +10 -0
  29. data/lib/cb/criteria/application/update.rb +10 -0
  30. data/lib/cb/criteria/job/details.rb +11 -1
  31. data/lib/cb/criteria/resumes/get_by_hash.rb +12 -2
  32. data/lib/cb/criteria/user/change_password.rb +21 -11
  33. data/lib/cb/criteria/user/delete.rb +18 -11
  34. data/lib/cb/exceptions.rb +14 -4
  35. data/lib/cb/models/api_call_model.rb +10 -1
  36. data/lib/cb/models/api_response_model.rb +15 -7
  37. data/lib/cb/models/implementations/application.rb +10 -1
  38. data/lib/cb/models/implementations/application/cover_letter.rb +10 -1
  39. data/lib/cb/models/implementations/application/form.rb +13 -5
  40. data/lib/cb/models/implementations/application/response.rb +10 -1
  41. data/lib/cb/models/implementations/application/resume.rb +10 -1
  42. data/lib/cb/models/implementations/application_external.rb +12 -3
  43. data/lib/cb/models/implementations/branding/media.rb +10 -2
  44. data/lib/cb/models/implementations/branding/section.rb +10 -2
  45. data/lib/cb/models/implementations/branding/style.rb +10 -2
  46. data/lib/cb/models/implementations/branding/styles/base.rb +12 -4
  47. data/lib/cb/models/implementations/branding/styles/buttons.rb +10 -2
  48. data/lib/cb/models/implementations/branding/styles/company_info.rb +11 -3
  49. data/lib/cb/models/implementations/branding/styles/container.rb +11 -3
  50. data/lib/cb/models/implementations/branding/styles/content.rb +10 -2
  51. data/lib/cb/models/implementations/branding/styles/css_adapter.rb +10 -2
  52. data/lib/cb/models/implementations/branding/styles/headings.rb +10 -2
  53. data/lib/cb/models/implementations/branding/styles/job_details.rb +10 -2
  54. data/lib/cb/models/implementations/branding/styles/page.rb +10 -2
  55. data/lib/cb/models/implementations/branding/widget.rb +10 -2
  56. data/lib/cb/models/implementations/category.rb +17 -7
  57. data/lib/cb/models/implementations/collapsed_job_results.rb +10 -1
  58. data/lib/cb/models/implementations/collapsed_jobs.rb +10 -0
  59. data/lib/cb/models/implementations/company.rb +17 -10
  60. data/lib/cb/models/implementations/data_lists/resume_data_list.rb +11 -1
  61. data/lib/cb/models/implementations/education.rb +10 -0
  62. data/lib/cb/models/implementations/email_subscription.rb +10 -0
  63. data/lib/cb/models/implementations/employee_type.rb +14 -4
  64. data/lib/cb/models/implementations/industry.rb +14 -6
  65. data/lib/cb/models/implementations/job.rb +24 -20
  66. data/lib/cb/models/implementations/job_branding.rb +13 -5
  67. data/lib/cb/models/implementations/job_results.rb +10 -2
  68. data/lib/cb/models/implementations/job_results_v3.rb +11 -1
  69. data/lib/cb/models/implementations/recommended_job.rb +10 -0
  70. data/lib/cb/models/implementations/resume.rb +11 -1
  71. data/lib/cb/models/implementations/resume_document.rb +10 -0
  72. data/lib/cb/models/implementations/resume_listing.rb +11 -1
  73. data/lib/cb/models/implementations/resumes/country_code.rb +10 -0
  74. data/lib/cb/models/implementations/resumes/education.rb +11 -1
  75. data/lib/cb/models/implementations/resumes/government_and_military.rb +11 -1
  76. data/lib/cb/models/implementations/resumes/language_code.rb +12 -2
  77. data/lib/cb/models/implementations/resumes/relocation.rb +11 -1
  78. data/lib/cb/models/implementations/resumes/salary_information.rb +11 -2
  79. data/lib/cb/models/implementations/resumes/skills_and_qualifications.rb +10 -0
  80. data/lib/cb/models/implementations/resumes/work_experience.rb +11 -1
  81. data/lib/cb/models/implementations/saved_search.rb +83 -73
  82. data/lib/cb/models/implementations/state.rb +11 -2
  83. data/lib/cb/models/implementations/talent_network.rb +44 -36
  84. data/lib/cb/models/implementations/user.rb +12 -2
  85. data/lib/cb/models/implementations/work_status.rb +12 -3
  86. data/lib/cb/requests/anonymous_saved_search/create.rb +10 -2
  87. data/lib/cb/requests/anonymous_saved_search/delete.rb +10 -2
  88. data/lib/cb/requests/application/create.rb +10 -1
  89. data/lib/cb/requests/application/form.rb +10 -2
  90. data/lib/cb/requests/application/get.rb +10 -1
  91. data/lib/cb/requests/application/update.rb +10 -1
  92. data/lib/cb/requests/application/utils.rb +10 -1
  93. data/lib/cb/requests/application_external/submit_application.rb +10 -2
  94. data/lib/cb/requests/base.rb +13 -5
  95. data/lib/cb/requests/category/search.rb +10 -2
  96. data/lib/cb/requests/company/find.rb +12 -4
  97. data/lib/cb/requests/data_lists/countries.rb +10 -0
  98. data/lib/cb/requests/data_lists/data_list_base.rb +11 -1
  99. data/lib/cb/requests/data_lists/desired_job_type.rb +10 -0
  100. data/lib/cb/requests/data_lists/education_codes.rb +10 -0
  101. data/lib/cb/requests/data_lists/languages.rb +10 -0
  102. data/lib/cb/requests/data_lists/state.rb +12 -2
  103. data/lib/cb/requests/education/get.rb +10 -2
  104. data/lib/cb/requests/email_subscription/modify.rb +13 -5
  105. data/lib/cb/requests/email_subscription/retrieve.rb +10 -2
  106. data/lib/cb/requests/job_search/get.rb +12 -3
  107. data/lib/cb/requests/recommendations/resume_recs.rb +12 -4
  108. data/lib/cb/requests/resumes/delete.rb +10 -0
  109. data/lib/cb/requests/resumes/get.rb +10 -0
  110. data/lib/cb/requests/resumes/language_codes.rb +12 -2
  111. data/lib/cb/requests/resumes/list.rb +12 -2
  112. data/lib/cb/requests/resumes/post.rb +11 -1
  113. data/lib/cb/requests/resumes/put.rb +11 -3
  114. data/lib/cb/requests/user/change_password.rb +10 -2
  115. data/lib/cb/requests/user/check_existing.rb +10 -2
  116. data/lib/cb/requests/user/delete.rb +10 -2
  117. data/lib/cb/requests/user/retrieve.rb +10 -2
  118. data/lib/cb/requests/user/temporary_password.rb +11 -3
  119. data/lib/cb/requests/work_status/list.rb +10 -2
  120. data/lib/cb/responses/Recommendation/recommendations.rb +10 -1
  121. data/lib/cb/responses/anonymous_saved_search/create.rb +10 -2
  122. data/lib/cb/responses/anonymous_saved_search/delete.rb +10 -2
  123. data/lib/cb/responses/api_response.rb +19 -9
  124. data/lib/cb/responses/application.rb +10 -2
  125. data/lib/cb/responses/application/application_form.rb +10 -2
  126. data/lib/cb/responses/application_external/submit_application.rb +11 -2
  127. data/lib/cb/responses/category/search.rb +13 -4
  128. data/lib/cb/responses/company/find.rb +12 -3
  129. data/lib/cb/responses/data_list/state.rb +10 -1
  130. data/lib/cb/responses/data_lists/resume_data_list.rb +10 -1
  131. data/lib/cb/responses/education/get.rb +13 -4
  132. data/lib/cb/responses/email_subscription/response.rb +11 -2
  133. data/lib/cb/responses/employee_types/search.rb +10 -3
  134. data/lib/cb/responses/errors.rb +14 -5
  135. data/lib/cb/responses/industry/search.rb +11 -4
  136. data/lib/cb/responses/job/search.rb +10 -1
  137. data/lib/cb/responses/job/search_v3.rb +10 -1
  138. data/lib/cb/responses/job/singular.rb +13 -4
  139. data/lib/cb/responses/metadata.rb +11 -2
  140. data/lib/cb/responses/resumes/language_codes.rb +11 -0
  141. data/lib/cb/responses/resumes/resume.rb +10 -1
  142. data/lib/cb/responses/resumes/resume_document.rb +10 -0
  143. data/lib/cb/responses/resumes/resume_list.rb +10 -0
  144. data/lib/cb/responses/saved_search/delete.rb +11 -3
  145. data/lib/cb/responses/saved_search/list.rb +10 -2
  146. data/lib/cb/responses/saved_search/retrieve.rb +10 -2
  147. data/lib/cb/responses/saved_search/singular.rb +10 -2
  148. data/lib/cb/responses/saved_search/update.rb +11 -3
  149. data/lib/cb/responses/timing.rb +15 -6
  150. data/lib/cb/responses/user/change_password.rb +12 -4
  151. data/lib/cb/responses/user/check_existing.rb +11 -3
  152. data/lib/cb/responses/user/delete.rb +11 -3
  153. data/lib/cb/responses/user/retrieve.rb +10 -3
  154. data/lib/cb/responses/user/temporary_password.rb +10 -3
  155. data/lib/cb/responses/work_status/list.rb +12 -4
  156. data/lib/cb/utils/api.rb +22 -12
  157. data/lib/cb/utils/console_observer.rb +11 -2
  158. data/lib/cb/utils/country.rb +14 -4
  159. data/lib/cb/utils/fluid_attributes.rb +11 -4
  160. data/lib/cb/utils/meta_values.rb +10 -0
  161. data/lib/cb/utils/response_array_extractor.rb +14 -6
  162. data/lib/cb/utils/response_map.rb +12 -3
  163. data/lib/cb/utils/validator.rb +21 -19
  164. data/lib/cb/version.rb +11 -1
  165. data/lib/tasks/cb.rake +11 -1
  166. data/lib/tasks/doc.rake +15 -5
  167. metadata +5 -3
@@ -1,26 +1,36 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  require 'nokogiri'
2
12
 
3
13
  module Cb
4
14
  module Criteria
5
15
  module User
6
16
  class ChangePassword
7
- attr_accessor :external_id, :old_password, :new_password,:test
17
+ attr_accessor :external_id, :old_password, :new_password, :test
8
18
  def initialize(args = {})
9
- @external_id = args[:external_id] || ''
10
- @old_password = args[:old_password] || ''
11
- @new_password = args[:new_password] || ''
12
- @test = args[:test] || 'false'
19
+ @external_id = args[:external_id] || ''
20
+ @old_password = args[:old_password] || ''
21
+ @new_password = args[:new_password] || ''
22
+ @test = args[:test] || 'false'
13
23
  end
14
24
 
15
25
  def to_xml
16
26
  Nokogiri::XML::Builder.new do |xml|
17
- xml.Request {
27
+ xml.Request do
18
28
  xml.DeveloperKey Cb.configuration.dev_key
19
- xml.ExternalID external_id
20
- xml.OldPassword old_password
21
- xml.NewPassword new_password
22
- xml.Test test
23
- }
29
+ xml.ExternalID external_id
30
+ xml.OldPassword old_password
31
+ xml.NewPassword new_password
32
+ xml.Test test
33
+ end
24
34
  end.to_xml
25
35
  end
26
36
  end
@@ -1,31 +1,38 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  require 'nokogiri'
2
12
 
3
13
  module Cb
4
14
  module Criteria
5
15
  module User
6
-
7
16
  class Delete
8
17
  attr_accessor :external_id, :password, :test
9
18
 
10
19
  def initialize(args = {})
11
- @external_id = args[:external_id] || ''
12
- @password = args[:password] || ''
13
- @test = args[:test] || 'false'
20
+ @external_id = args[:external_id] || ''
21
+ @password = args[:password] || ''
22
+ @test = args[:test] || 'false'
14
23
  end
15
24
 
16
25
  def to_xml
17
26
  Nokogiri::XML::Builder.new do |xml|
18
- xml.Request {
27
+ xml.Request do
19
28
  xml.DeveloperKey Cb.configuration.dev_key
20
- xml.Password password
21
- xml.ExternalID external_id
22
- xml.Test self.test # ruby has a builtin called test, confusion occurs :(
23
- }
29
+ xml.Password password
30
+ xml.ExternalID external_id
31
+ xml.Test test # ruby has a builtin called test, confusion occurs :(
32
+ end
24
33
  end.to_xml
25
34
  end
26
-
27
35
  end
28
-
29
36
  end
30
37
  end
31
38
  end
@@ -1,7 +1,17 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  class IncomingParamIsWrongTypeException < StandardError; end
3
- class ExpectedResponseFieldMissing < StandardError; end
4
- class ApiResponseError < StandardError; end
5
- class ServiceUnavailableError < ApiResponseError; end
6
- class UnauthorizedError < ApiResponseError; end
13
+ class ExpectedResponseFieldMissing < StandardError; end
14
+ class ApiResponseError < StandardError; end
15
+ class ServiceUnavailableError < ApiResponseError; end
16
+ class UnauthorizedError < ApiResponseError; end
7
17
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class ApiCall < Struct.new(:api_call_type, :path, :options, :api_caller, :response, :elapsed_time)
4
14
  end
5
15
  end
6
16
  end
7
-
@@ -1,10 +1,19 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class ApiResponseModel
4
-
5
14
  attr_accessor :api_response
6
15
 
7
- def initialize(response={})
16
+ def initialize(response = {})
8
17
  @api_response = response
9
18
  validate_api_response
10
19
  set_model_properties
@@ -14,21 +23,20 @@ module Cb
14
23
 
15
24
  def required_fields
16
25
  # return an array of hash keys to check for in your api hash
17
- raise NotImplementedError.new(__method__)
26
+ fail NotImplementedError.new(__method__)
18
27
  end
19
28
 
20
29
  def set_model_properties
21
30
  # do whatever work you need to do to set up the attributes on your model
22
- raise NotImplementedError.new(__method__)
31
+ fail NotImplementedError.new(__method__)
23
32
  end
24
33
 
25
34
  private
26
35
 
27
36
  def validate_api_response
28
- missing_fields = required_fields.map { |field| field unless @api_response.has_key?(field) }.compact
29
- raise ExpectedResponseFieldMissing.new(missing_fields.join(' ')) unless missing_fields.empty?
37
+ missing_fields = required_fields.map { |field| field unless @api_response.key?(field) }.compact
38
+ fail ExpectedResponseFieldMissing.new(missing_fields.join(' ')) unless missing_fields.empty?
30
39
  end
31
-
32
40
  end
33
41
  end
34
42
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class Application < ApiResponseModel
@@ -41,7 +51,6 @@ module Cb
41
51
  Response.new response_hash
42
52
  end
43
53
  end
44
-
45
54
  end
46
55
  end
47
56
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class Application < ApiResponseModel
@@ -15,7 +25,6 @@ module Cb
15
25
  @cover_letter_text = api_response['CoverLetterText']
16
26
  @cover_letter_title = api_response['CoverLetterTitle']
17
27
  end
18
-
19
28
  end
20
29
  end
21
30
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class Application < ApiResponseModel
4
-
5
14
  class Form < ApiResponseModel
6
15
  attr_reader :job_did, :job_title, :is_shared_apply, :question_list, :requirements,
7
16
  :degree_required, :travel_required, :experience_required, :external_application,
@@ -31,7 +40,7 @@ module Cb
31
40
  end
32
41
 
33
42
  def extracted_questions
34
- questions = iterable_questions? ? response_questions : Array.new
43
+ questions = iterable_questions? ? response_questions : []
35
44
  questions.map { |question_hash| Question.new(question_hash) }
36
45
  end
37
46
 
@@ -66,7 +75,7 @@ module Cb
66
75
  end
67
76
 
68
77
  def extracted_answers
69
- answers = iterable_answers? ? response_answers : Array.new
78
+ answers = iterable_answers? ? response_answers : []
70
79
  answers.map { |answer_hash| Answer.new(answer_hash) }
71
80
  end
72
81
 
@@ -79,7 +88,7 @@ module Cb
79
88
  end
80
89
 
81
90
  def extracted_int_or_nil(key)
82
- api_response.has_key?(key) ? api_response[key].to_i : nil
91
+ api_response.key?(key) ? api_response[key].to_i : nil
83
92
  end
84
93
  end
85
94
 
@@ -98,7 +107,6 @@ module Cb
98
107
  @question_id = api_response['QuestionID']
99
108
  end
100
109
  end
101
-
102
110
  end
103
111
  end
104
112
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class Application < ApiResponseModel
@@ -14,7 +24,6 @@ module Cb
14
24
  @question_id = api_response['QuestionID']
15
25
  @response_text = api_response['ResponseText']
16
26
  end
17
-
18
27
  end
19
28
  end
20
29
  end
@@ -1,3 +1,13 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class Application < ApiResponseModel
@@ -17,7 +27,6 @@ module Cb
17
27
  @resume_extension = api_response['ResumeExtension']
18
28
  @resume_title = api_response['ResumeTitle']
19
29
  end
20
-
21
30
  end
22
31
  end
23
32
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  class ApplicationExternal
4
-
5
14
  IPATH_LENGTH = 10
6
15
  attr_accessor :job_did, :email, :site_id, :ipath, :apply_url, :is_external_link_apply
7
16
 
@@ -15,7 +24,7 @@ module Cb
15
24
  end
16
25
 
17
26
  def to_xml
18
- ret = "<Request>"
27
+ ret = '<Request>'
19
28
  ret += "<DeveloperKey>#{Cb.configuration.dev_key}</DeveloperKey>"
20
29
  ret += "<EmailAddress>#{@email}</EmailAddress>"
21
30
  ret += "<JobDID>#{@job_did}</JobDID>"
@@ -23,7 +32,7 @@ module Cb
23
32
  ret += "<IPath>#{@ipath}</IPath>"
24
33
  ret += "<IsExternalLinkApply>#{@is_external_link_apply}</IsExternalLinkApply>"
25
34
  ret += "<HostSite>#{Cb.configuration.host_site}</HostSite>"
26
- ret += "</Request>"
35
+ ret += '</Request>'
27
36
  ret
28
37
  end
29
38
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  module Branding
4
-
5
14
  class Media
6
15
  attr_accessor :header, :header_type, :tablet_banner, :mobile_logo, :footer, :is_multi_video
7
16
 
@@ -14,7 +23,6 @@ module Cb
14
23
  @is_multi_video = args['IsMultiVideo'] == 'true'
15
24
  end
16
25
  end
17
-
18
26
  end
19
27
  end
20
28
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  module Branding
4
-
5
14
  class Section
6
15
  attr_accessor :type, :section_1, :section_2, :section_3, :description, :requirements, :snapshot
7
16
 
@@ -15,7 +24,6 @@ module Cb
15
24
  @snapshot = args['Snapshot'] || ''
16
25
  end
17
26
  end
18
-
19
27
  end
20
28
  end
21
29
  end
@@ -1,7 +1,16 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  module Branding
4
-
5
14
  class Style
6
15
  attr_accessor :page, :job_details, :company_info
7
16
 
@@ -11,7 +20,6 @@ module Cb
11
20
  @company_info = Styles::CompanyInfo.new args['CompanyInfo']
12
21
  end
13
22
  end
14
-
15
23
  end
16
24
  end
17
25
  end
@@ -1,12 +1,21 @@
1
+ # Copyright 2015 CareerBuilder, LLC
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and limitations under the License.
1
11
  module Cb
2
12
  module Models
3
13
  module Branding
4
14
  module Styles
5
-
6
15
  class Base
7
16
  attr_writer :styles
8
17
 
9
- def initialize args = {}
18
+ def initialize(args = {})
10
19
  @styles = args
11
20
  end
12
21
 
@@ -14,8 +23,7 @@ module Cb
14
23
  @styles
15
24
  end
16
25
  end
17
-
18
26
  end
19
27
  end
20
28
  end
21
- end
29
+ end