wolf_core 1.0.13 → 1.0.15

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: 723efe91409c3f400d4c4cadcd6396f00c91e1754cb99e290774c20d07840bf5
4
- data.tar.gz: e318dd0a2bb09af4b030f0232680b4d6e4e9ab90b933abffefd14c9358bed794
3
+ metadata.gz: 02f382dfda0bedb49f159991bab1f97576dcb64e33e365675d79b9b56bd2f26d
4
+ data.tar.gz: 8892e476190ab52b3cbd32875f2337711638d2179d4e498e65da0f2517562208
5
5
  SHA512:
6
- metadata.gz: b41bfe240fb131bc9582a3ccdeb01a433c6a6d492efdcca340cf80960fec06812f9103537472d3c94841cadc0c584e13bb1fc7fa745c83854bb3a43203cf6464
7
- data.tar.gz: 62dc949377d0cb40769720aa56f553ce3a9fe63d2ddc03fda496d4fe346cb06430c3347ecd862d9c30756fe8dc675b03e95b0d003845c69bc760216a3ff7b624
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/clients/#{client_id}",
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", "client")
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/clients/#{client_id}",
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", "client")
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/clients",
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/clients",
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/clients/#{client_id}",
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/clients/#{client_id}",
62
+ url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
63
63
  body: client
64
64
  )
65
65
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.13"
4
+ VERSION = "1.0.15"
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: 1.0.13
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo