wolf_core 0.1.98 → 0.1.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e3d081c4b356d9b3bee8084b26251a3540c6884dba594cedc404d5a346dff22
4
- data.tar.gz: 8b9e86ead216520b002ebaaea42b621a188569e8a05c717ec3ad2e7df205290c
3
+ metadata.gz: 8d2f944616b25d134e6589f0dbfcb8fd909a27dfb881cfd78eb9b76e264f900c
4
+ data.tar.gz: d6644bfec1886500d96906243f1429e6d28145fc19dd3e419826309122b243c5
5
5
  SHA512:
6
- metadata.gz: 613f563fdceb49519c12ce40d68e0a38f099d96f121ef63f71e305d8bce4b2f1bdab8057978dc8f2bbb305b13fb17c90b81d026971477bfb3517d8288763e8ba
7
- data.tar.gz: e1e40740f03748298dcc6430237bae7c7d4e6d73e8acf32cd521aefd2e9e3e8fdf5c3418e1169c35fc45993afdf7ce93291b81782ae15c85d87224ab6067fee8
6
+ metadata.gz: afef89f59ffb52ca6dee4b5a9a5a8baf1d281ac609702c472f7e048de8d57472439b4c82fe5800aec86f1e7790b6ad9fa0c800adfb507482aad1bc49cbefd447
7
+ data.tar.gz: f0f4f40b589361933bf7a7f2f5df41f7bc4e6f1ade3f3872d10b6fa10bf508b8d0fc989e2892bd1454f6345c8dc04b4e5bf40fb6fbba8d3e4ed63d39db4456d4
@@ -0,0 +1,32 @@
1
+ module WolfCore
2
+ module Integrations
3
+ module JobseekerApiOperations
4
+ include WolfCore::HttpOperations
5
+
6
+ def fetch_jobseeker(wolf_token:, jobseeker_id:, tenant:)
7
+ response = safe_http_get(
8
+ headers: { 'Authorization' => "Bearer #{wolf_token}" },
9
+ url: "#{ENV['WOLF_PLATFORM_URL']}/api/v2/jobseekers/#{jobseeker_id}",
10
+ query: { tenant: tenant },
11
+ error_message: 'Failed to fetch jobseeker',
12
+ )
13
+ response_body = response.body
14
+ response_body.dig('data', 'table', 'jobseeker')
15
+ end
16
+
17
+ def create_jobseeker(wolf_token:, jobseeker:, tenant:)
18
+ response = http_post(
19
+ headers: { 'Authorization' => "Bearer #{wolf_token}" },
20
+ query: { tenant: tenant },
21
+ url: "#{ENV['WOLF_PLATFORM_URL']}/api/v2/jobseekers",
22
+ body: jobseeker
23
+ )
24
+ log_object response, title: 'create jobseeker response is'
25
+ validate_http_response(
26
+ response: response,
27
+ message: 'Can not create jobseeker'
28
+ )
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.98"
4
+ VERSION = "0.1.99"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.98
4
+ version: 0.1.99
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo
@@ -95,6 +95,7 @@ files:
95
95
  - lib/wolf_core/application/burnett/auth/auth_operations.rb
96
96
  - lib/wolf_core/application/exception_operations.rb
97
97
  - lib/wolf_core/application/integrations/change_detection.rb
98
+ - lib/wolf_core/application/integrations/jobseeker_api_operations.rb
98
99
  - lib/wolf_core/application/integrations/routing_operations.rb
99
100
  - lib/wolf_core/application/integrations/webhooks_operations.rb
100
101
  - lib/wolf_core/application/salesforce_oauth_service.rb