cb-api 18.4.0 → 18.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92b64824e96c472291ad8e31393461dfd84e3d3d
4
- data.tar.gz: fd70916fec02c781ea0e753d89250e24bdd3c65b
3
+ metadata.gz: 7a528b3ab30440eccd01a070105898be492bdba0
4
+ data.tar.gz: 40b8622dcf684443ccd1fb8a0cf9af96757be970
5
5
  SHA512:
6
- metadata.gz: dceeb0718cdc7037c7f07cdff7cac2f163d453544a3c8bb0fdb784f430fb55dd8e3e0b2b3e4250ffaf0f71445638b0038f9a1b5f239efff66e104e9d6ff80ac3
7
- data.tar.gz: a8e73cba18fd993a25b2e4c61c4d4663bf007adad635397dae338e7e26938bbf181f0d31e8fd96393e04812190bda8a29eec3f1c39cf8b1b3e7523347e2d81bb
6
+ metadata.gz: bde953029280007924d3d3cd52ff1a5e39205461cf68fdc42a8db6aa19a8c41f8d42def51dee2e3decaa91a72c8464e852eed358b2b244cde837daeaf6884667
7
+ data.tar.gz: cf7e3f2eca41c415c0dbd35282803d6112b03dc1c4e8aab8a8629165dd2dc5c51582ced8606e87a4cc24d86181db8d6a48893b267f22285e469b35d405a15d11
@@ -3,6 +3,7 @@ Version History
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
5
 
6
+ * 18.5.0 Adding support for Cover Letter Update.
6
7
  * 18.4.0 Adding support for Cover Letter APIs - Retrieve, List, and Delete.
7
8
  * 18.3.0 Correcting report a job to use xml request and correctly map model from response.
8
9
  * 18.2.2 Filter out release directory related information when getting the API caller.
@@ -107,6 +107,7 @@ module Cb
107
107
  @uri_report_job ||= '/v1/job/report'
108
108
  @uri_cover_letter_list ||= '/v1/coverletter/list'
109
109
  @uri_cover_letter_retrieve ||= '/coverletter/retrieve'
110
+ @uri_cover_letter_update ||= '/coverletter/edit'
110
111
  @uri_cover_letter_delete ||= '/coverletter/delete'
111
112
  end
112
113
 
@@ -0,0 +1,40 @@
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.
11
+ require 'cb/requests/base'
12
+
13
+ module Cb
14
+ module Requests
15
+ module CoverLetter
16
+ class Update < Base
17
+ def endpoint_uri
18
+ Cb.configuration.uri_cover_letter_update
19
+ end
20
+
21
+ def http_method
22
+ :post
23
+ end
24
+
25
+ def body
26
+ <<-eos
27
+ <Request>
28
+ <DeveloperKey>#{ Cb.configuration.dev_key }</DeveloperKey>
29
+ <ExternalID>#{ args[:external_id] }</ExternalID>
30
+ <ExternalUserID>#{ args[:external_user_id] }</ExternalUserID>
31
+ <CoverLetterTitle>#{ args[:cover_letter_title] }</CoverLetterTitle>
32
+ <Text>#{ args[:text] }</Text>
33
+ <Test>#{ args[:test] || false }</Test>
34
+ </Request>
35
+ eos
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -8,27 +8,15 @@
8
8
  # distributed under the License is distributed on an "AS IS" BASIS,
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
+ require_relative 'status'
12
+ require_relative '../nil_model'
13
+
11
14
  module Cb
12
15
  module Responses
13
16
  module CoverLetter
14
17
  class Delete < ApiResponse
15
- def status
16
- response[root_node]['Status']
17
- end
18
-
19
- private
20
-
21
- def extract_models
22
- nil
23
- end
24
-
25
- def validate_api_hash
26
- required_response_field(root_node, response)
27
- end
28
-
29
- def hash_containing_metadata
30
- response
31
- end
18
+ include Cb::Responses::CoverLetter::Status
19
+ include Cb::Responses::NilModel
32
20
 
33
21
  def root_node
34
22
  'ResponseUserDelete'
@@ -15,7 +15,7 @@ module Cb
15
15
  private
16
16
 
17
17
  def extract_models
18
- Models::CoverLetter.new api_cover_letter
18
+ Models::CoverLetter.new api_cover_letter unless api_cover_letter.nil?
19
19
  end
20
20
 
21
21
  def validate_api_hash
@@ -0,0 +1,31 @@
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.
11
+ module Cb
12
+ module Responses
13
+ module CoverLetter
14
+ module Status
15
+ def status
16
+ response[root_node]['Status']
17
+ end
18
+
19
+ private
20
+
21
+ def validate_api_hash
22
+ required_response_field(root_node, response)
23
+ end
24
+
25
+ def hash_containing_metadata
26
+ response
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,27 @@
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.
11
+ require_relative 'status'
12
+ require_relative '../nil_model'
13
+
14
+ module Cb
15
+ module Responses
16
+ module CoverLetter
17
+ class Update < ApiResponse
18
+ include Cb::Responses::CoverLetter::Status
19
+ include Cb::Responses::NilModel
20
+
21
+ def root_node
22
+ 'ResponseUserUpdate'
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +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.
11
+ module Cb
12
+ module Responses
13
+ module NilModel
14
+ private
15
+
16
+ def extract_models
17
+ nil
18
+ end
19
+ end
20
+ end
21
+ end
@@ -46,6 +46,7 @@ module Cb
46
46
 
47
47
  Cb::Requests::CoverLetter::List => Cb::Responses::CoverLetter::List,
48
48
  Cb::Requests::CoverLetter::Retrieve => Cb::Responses::CoverLetter::Retrieve,
49
+ Cb::Requests::CoverLetter::Update => Cb::Responses::CoverLetter::Update,
49
50
  Cb::Requests::CoverLetter::Delete => Cb::Responses::CoverLetter::Delete,
50
51
 
51
52
  Cb::Requests::Education::Get => Cb::Responses::Education::Get,
@@ -9,5 +9,5 @@
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
11
  module Cb
12
- VERSION = '18.4.0'
12
+ VERSION = '18.5.0'
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.4.0
4
+ version: 18.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Niche and Consumer Development teams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -304,6 +304,7 @@ files:
304
304
  - lib/cb/requests/cover_letter/delete.rb
305
305
  - lib/cb/requests/cover_letter/list.rb
306
306
  - lib/cb/requests/cover_letter/retrieve.rb
307
+ - lib/cb/requests/cover_letter/update.rb
307
308
  - lib/cb/requests/data_lists/countries.rb
308
309
  - lib/cb/requests/data_lists/data_list_base.rb
309
310
  - lib/cb/requests/data_lists/desired_job_type.rb
@@ -340,6 +341,8 @@ files:
340
341
  - lib/cb/responses/cover_letter/delete.rb
341
342
  - lib/cb/responses/cover_letter/list.rb
342
343
  - lib/cb/responses/cover_letter/retrieve.rb
344
+ - lib/cb/responses/cover_letter/status.rb
345
+ - lib/cb/responses/cover_letter/update.rb
343
346
  - lib/cb/responses/data_list/state.rb
344
347
  - lib/cb/responses/data_lists/resume_data_list.rb
345
348
  - lib/cb/responses/education/get.rb
@@ -352,6 +355,7 @@ files:
352
355
  - lib/cb/responses/job/search_v3.rb
353
356
  - lib/cb/responses/job/singular.rb
354
357
  - lib/cb/responses/metadata.rb
358
+ - lib/cb/responses/nil_model.rb
355
359
  - lib/cb/responses/resumes/language_codes.rb
356
360
  - lib/cb/responses/resumes/resume.rb
357
361
  - lib/cb/responses/resumes/resume_document.rb