wolf_core 1.0.13 → 1.0.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f382dfda0bedb49f159991bab1f97576dcb64e33e365675d79b9b56bd2f26d
|
4
|
+
data.tar.gz: 8892e476190ab52b3cbd32875f2337711638d2179d4e498e65da0f2517562208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da58c403c6326fb283c17461e19b785bfd4c2fb21fa2394026d494d47f0e7b944bbb277cbd401954cca5d4c8b8a9c9668ab7f5664b1a133709f59b7b8e03ca13
|
7
|
+
data.tar.gz: ce5efec5d2116d5f77a0730c514349385df720c1babcaa313edc196416e6f2f8b440fa3eec52e56901a111cfba822fc359fb325c85e61a7bd08747e24da41ddd
|
@@ -6,31 +6,31 @@ module WolfCore
|
|
6
6
|
def fetch_client!(wolf_token:, client_id:, tenant:, wolf_platform_url:, error_message:)
|
7
7
|
response = safe_http_get(
|
8
8
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
9
|
-
url: "#{wolf_platform_url}/api/v2/
|
9
|
+
url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
|
10
10
|
query: { tenant: tenant },
|
11
11
|
error_message: error_message
|
12
12
|
)
|
13
13
|
response_body = response.body
|
14
|
-
response_body.dig("data", "table", "
|
14
|
+
response_body.dig("data", "table", "companies")
|
15
15
|
end
|
16
16
|
|
17
17
|
def fetch_client(wolf_token:, client_id:, tenant:, wolf_platform_url:)
|
18
18
|
response = parsed_http_get(
|
19
19
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
20
|
-
url: "#{wolf_platform_url}/api/v2/
|
20
|
+
url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
|
21
21
|
query: { tenant: tenant }
|
22
22
|
)
|
23
23
|
response_body = response.body
|
24
24
|
return unless response_body.instance_of?(Hash)
|
25
25
|
|
26
|
-
response_body.dig("data", "table", "
|
26
|
+
response_body.dig("data", "table", "companies")
|
27
27
|
end
|
28
28
|
|
29
29
|
def create_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:)
|
30
30
|
safe_http_post(
|
31
31
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
32
32
|
query: { tenant: tenant },
|
33
|
-
url: "#{wolf_platform_url}/api/v2/
|
33
|
+
url: "#{wolf_platform_url}/api/v2/companies",
|
34
34
|
body: client,
|
35
35
|
error_message: error_message
|
36
36
|
)
|
@@ -40,7 +40,7 @@ module WolfCore
|
|
40
40
|
parsed_http_post(
|
41
41
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
42
42
|
query: { tenant: tenant },
|
43
|
-
url: "#{wolf_platform_url}/api/v2/
|
43
|
+
url: "#{wolf_platform_url}/api/v2/companies",
|
44
44
|
body: client
|
45
45
|
)
|
46
46
|
end
|
@@ -49,7 +49,7 @@ module WolfCore
|
|
49
49
|
safe_http_put(
|
50
50
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
51
51
|
query: { tenant: tenant },
|
52
|
-
url: "#{wolf_platform_url}/api/v2/
|
52
|
+
url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
|
53
53
|
body: client,
|
54
54
|
error_message: error_message
|
55
55
|
)
|
@@ -59,7 +59,7 @@ module WolfCore
|
|
59
59
|
parsed_http_put(
|
60
60
|
headers: { "Authorization" => "Bearer #{wolf_token}" },
|
61
61
|
query: { tenant: tenant },
|
62
|
-
url: "#{wolf_platform_url}/api/v2/
|
62
|
+
url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
|
63
63
|
body: client
|
64
64
|
)
|
65
65
|
end
|
data/lib/wolf_core/version.rb
CHANGED