wolf_core 1.0.10 → 1.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b0bfee7a6d6e88da4f300634006e48155fe904137816fdc76e377761e32170
|
4
|
+
data.tar.gz: 6e5bf56c5bb117e763b0c275bdb2c10bce489f664dabdc33be9d3b87170702b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff9b9f4a6795020f54ed3acee822e620e311f9f6e5dec6c07e13e4f3b0adf7cd774341107e2a45726c7de86b267e11c96edc9c51a2cb5c65f7cbd0153ce3ef8d
|
7
|
+
data.tar.gz: 36fe8490133a9cb127b7cd14628b27d0797479fcd1c369c2d291ed3c432bdd2982698995f105f8d951dafc9260b3a315a282db4568ce6970e688214bc8db9f11
|
@@ -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
|
data/lib/wolf_core/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.12
|
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-
|
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
|