wolf_core 1.0.75 → 1.0.76
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: 4131957142188d7ccc2d55ddff26bc2e870be3d2f24dc2de1a8b967781732b90
|
4
|
+
data.tar.gz: c66613acbdb12d9943f311bb9704609e4b4ff69b828c7fb495d5bb7117590e66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6b3abdff7a68bddd11cb97e58e3f75dbc0814293bd8d095217e95ee49bcac6feaa5a74c6bfd2b0ba6a229aedcb65fa2e35b6b6c0a1b45ddb2a57cf45180478d
|
7
|
+
data.tar.gz: f7142d372a4147716a75a96913a7a91067bf1f772aef5cf393410a051140e44059be588d5c61a977d1250e5007ff0b2284670a46b7eae0ab71476b7dea8c1d7b
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module WolfCore
|
2
|
+
module Integrations
|
3
|
+
module CustomValueApiOperations
|
4
|
+
include WolfCore::HttpOperations
|
5
|
+
|
6
|
+
def fetch_custom_values!(wolf_token:, tenant:, wolf_platform_url:, error_message:, error_data: nil, query: nil)
|
7
|
+
response = fetch_custom_values(
|
8
|
+
wolf_token: wolf_token,
|
9
|
+
tenant: tenant,
|
10
|
+
wolf_platform_url: wolf_platform_url,
|
11
|
+
query: query
|
12
|
+
)
|
13
|
+
validate_http_response(response: response, message: error_message, error_data: error_data)
|
14
|
+
response.body.dig("data", "table", "custom_values")
|
15
|
+
end
|
16
|
+
|
17
|
+
def fetch_custom_values(wolf_token:, tenant:, wolf_platform_url:, query: nil)
|
18
|
+
query ||= {}
|
19
|
+
parsed_http_get(
|
20
|
+
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
21
|
+
url: "#{wolf_platform_url}/api/v2/custom_values",
|
22
|
+
query: query.merge(tenant: tenant)
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
def fetch_custom_value!(wolf_token:, custom_value_id:, tenant:, wolf_platform_url:, error_message:, error_data: nil, query: nil)
|
27
|
+
response = fetch_custom_value(
|
28
|
+
wolf_token: wolf_token,
|
29
|
+
custom_value_id: custom_value_id,
|
30
|
+
tenant: tenant,
|
31
|
+
wolf_platform_url: wolf_platform_url,
|
32
|
+
query: query
|
33
|
+
)
|
34
|
+
validate_http_response(response: response, message: error_message, error_data: error_data)
|
35
|
+
response.body.dig("data", "table", "custom_value")
|
36
|
+
end
|
37
|
+
|
38
|
+
def fetch_custom_value(wolf_token:, custom_value_id:, tenant:, wolf_platform_url:, query: nil)
|
39
|
+
query ||= {}
|
40
|
+
parsed_http_get(
|
41
|
+
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
42
|
+
url: "#{wolf_platform_url}/api/v2/custom_values/#{custom_value_id}",
|
43
|
+
query: query.merge(tenant: tenant)
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def create_custom_value!(wolf_token:, custom_value:, tenant:, wolf_platform_url:, error_message:, custom_requirements_id:, error_data: nil, query: nil)
|
48
|
+
response = create_custom_value(
|
49
|
+
wolf_token: wolf_token,
|
50
|
+
custom_value: custom_value,
|
51
|
+
tenant: tenant,
|
52
|
+
wolf_platform_url: wolf_platform_url,
|
53
|
+
custom_requirements_id: custom_requirements_id,
|
54
|
+
query: query
|
55
|
+
)
|
56
|
+
validate_http_response(response: response, message: error_message, error_data: error_data)
|
57
|
+
response
|
58
|
+
end
|
59
|
+
|
60
|
+
def create_custom_value(wolf_token:, custom_value:, tenant:, wolf_platform_url:, custom_requirements_id:, query: nil)
|
61
|
+
query ||= {}
|
62
|
+
parsed_http_post(
|
63
|
+
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
64
|
+
query: query.merge(tenant: tenant),
|
65
|
+
url: "#{wolf_platform_url}/api/v2/custom_requirements/#{custom_requirements_id}/custom_values",
|
66
|
+
body: custom_value
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
def update_custom_value!(wolf_token:, custom_value:, tenant:, wolf_platform_url:, error_message:, custom_value_id:, error_data: nil, query: nil)
|
71
|
+
response = update_custom_value(
|
72
|
+
wolf_token: wolf_token,
|
73
|
+
custom_value: custom_value,
|
74
|
+
tenant: tenant,
|
75
|
+
wolf_platform_url: wolf_platform_url,
|
76
|
+
custom_value_id: custom_value_id,
|
77
|
+
query: query
|
78
|
+
)
|
79
|
+
validate_http_response(response: response, message: error_message, error_data: error_data)
|
80
|
+
response
|
81
|
+
end
|
82
|
+
|
83
|
+
def update_custom_value(wolf_token:, custom_value:, tenant:, wolf_platform_url:, custom_value_id:, query: nil)
|
84
|
+
query ||= {}
|
85
|
+
parsed_http_put(
|
86
|
+
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
87
|
+
query: query.merge(tenant: tenant),
|
88
|
+
url: "#{wolf_platform_url}/api/v2/custom_values/#{custom_value_id}",
|
89
|
+
body: custom_value
|
90
|
+
)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
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.76
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- lib/wolf_core/application/exception_operations.rb
|
111
111
|
- lib/wolf_core/application/integrations/change_detection.rb
|
112
112
|
- lib/wolf_core/application/integrations/client_api_operations.rb
|
113
|
+
- lib/wolf_core/application/integrations/custom_value_api_operations.rb
|
113
114
|
- lib/wolf_core/application/integrations/environment_operations.rb
|
114
115
|
- lib/wolf_core/application/integrations/iterate_orders_service.rb
|
115
116
|
- lib/wolf_core/application/integrations/jobseeker_api_operations.rb
|