wolf_core 1.0.10 → 1.0.11

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
  SHA256:
3
- metadata.gz: 1fc74c77d74d46328ceaeaa05d8f0bfe2339c5eb8f9c37f781d8a88b4547d5d9
4
- data.tar.gz: 991c1049dd50452777267fdee8edef2c5491c80883c3901bd0313399456838ac
3
+ metadata.gz: 1695b9abff3f7107b73cf372f8738d80211f21ba4fc5d3b5356b4f72308be859
4
+ data.tar.gz: baa798c8642f7df27c60199445b9e5834d49a75f6cb0f5e03ab1c032206280b2
5
5
  SHA512:
6
- metadata.gz: e0fdea166f2c88f7294dde457d39194990cdc8750df848ece6056e0830a0020c68e908eb31d91fa5e5b6dc60d8f45caecf0bde0665ef3be58201b66d92e16a2f
7
- data.tar.gz: a0fcaf4480c92f1d0553e88cbfd65372957ed0e47450fa49c73c9f73ecfdd65b2a824cacb205552faf78c95adbf8bec97beef47a8595520c175c5db48ce1c64c
6
+ metadata.gz: bf06d9fcda3da1740172d0f788091dce1568560bfdd93970636828530d9ee6830ff53357e6bdc8d4cd2a5a0d39bd9af5f28b1c74827ec3be3123933580815254
7
+ data.tar.gz: ca34d60088accb6c9e9373280736521b47a34226231de8ddb451949d3be48c1ffe4bebf8ee3246fc32fb2f8861fcb59799b6a5aa5b50f7dd4ae4ca90672ef1d4
@@ -0,0 +1,68 @@
1
+ module WolfCore
2
+ module Integrations
3
+ module ClientApiOperations
4
+ include WolfCore::HttpOperations
5
+
6
+ def fetch_client!(wolf_token:, client_id:, tenant:, wolf_platform_url:, error_message:)
7
+ response = safe_http_get(
8
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
9
+ url: "#{wolf_platform_url}/api/v2/clients/#{client_id}",
10
+ query: { tenant: tenant },
11
+ error_message: error_message
12
+ )
13
+ response_body = response.body
14
+ response_body.dig("data", "table", "client")
15
+ end
16
+
17
+ def fetch_client(wolf_token:, client_id:, tenant:, wolf_platform_url:)
18
+ response = parsed_http_get(
19
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
20
+ url: "#{wolf_platform_url}/api/v2/clients/#{client_id}",
21
+ query: { tenant: tenant }
22
+ )
23
+ response_body = response.body
24
+ return unless response_body.instance_of?(Hash)
25
+
26
+ response_body.dig("data", "table", "client")
27
+ end
28
+
29
+ def create_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:)
30
+ safe_http_post(
31
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
32
+ query: { tenant: tenant },
33
+ url: "#{wolf_platform_url}/api/v2/clients",
34
+ body: client,
35
+ error_message: error_message
36
+ )
37
+ end
38
+
39
+ def create_client(wolf_token:, client:, tenant:, wolf_platform_url:)
40
+ parsed_http_post(
41
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
42
+ query: { tenant: tenant },
43
+ url: "#{wolf_platform_url}/api/v2/clients",
44
+ body: client
45
+ )
46
+ end
47
+
48
+ def update_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:, client_id:)
49
+ safe_http_put(
50
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
51
+ query: { tenant: tenant },
52
+ url: "#{wolf_platform_url}/api/v2/clients/#{client_id}",
53
+ body: client,
54
+ error_message: error_message
55
+ )
56
+ end
57
+
58
+ def update_client(wolf_token:, client:, tenant:, wolf_platform_url:, client_id:)
59
+ parsed_http_put(
60
+ headers: { "Authorization" => "Bearer #{wolf_token}" },
61
+ query: { tenant: tenant },
62
+ url: "#{wolf_platform_url}/api/v2/clients/#{client_id}",
63
+ body: client
64
+ )
65
+ end
66
+ end
67
+ end
68
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.10"
4
+ VERSION = "1.0.11"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-28 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -98,6 +98,7 @@ files:
98
98
  - lib/wolf_core/application/burnett/positions_operations/positions_operations.rb
99
99
  - lib/wolf_core/application/exception_operations.rb
100
100
  - lib/wolf_core/application/integrations/change_detection.rb
101
+ - lib/wolf_core/application/integrations/client_api_operations.rb
101
102
  - lib/wolf_core/application/integrations/jobseeker_api_operations.rb
102
103
  - lib/wolf_core/application/integrations/orders_api_operations.rb
103
104
  - lib/wolf_core/application/integrations/routing_operations.rb