wolf_core 1.0.83 → 1.0.84

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: c0305122ef0c94dd93b995b094dc4810a674aaf5e621e061e813f6a9b87250a4
4
- data.tar.gz: 3ebbb00e54961470675e1de04db824b948ea393a50bb105adc851295382795e3
3
+ metadata.gz: 4d7fa6a31a50c43cce5941f2892e68193eea7903d585332783ac0c88277b30fa
4
+ data.tar.gz: 24c484564b6779998fd59ef8a8d87884a83b90a05737952e20d17a597fd61387
5
5
  SHA512:
6
- metadata.gz: 36b1154bd493d0c8dc0c56b85b76346c88d00bebb0f3d0b97591a6eca2389a2b98c342dbdc2b8d854e64fd9500fc4a4628f015f99819d0f3d0b68af86dc04e39
7
- data.tar.gz: 1dc08603d0f9a15f580e242975197136c164ad3ce5b7a22c1a848caa0aaebb46ea4056baef51eebb36e346b4772d3a5ac9092a5b4a5f2951f3cba7e6e85e31ec
6
+ metadata.gz: 390850d53daea04127dc5c9786960ffeab9c8dbcd56196d1fcc97f2ec051187dc46ef583df56f8e47ba309347b5c1152bf90874fd4d61cd13e38d8f409b7b626
7
+ data.tar.gz: bddd441d1c619c082096e31f0521019a9801086dc193e25bc17092a0f27681f81d1e1bb9170de132e814f06fe0ec5d46ca79bd61dc8760b03db4076c189dfe16
@@ -4,12 +4,14 @@ module WolfCore
4
4
  include WolfCore::HttpOperations
5
5
  include WolfCore::Integrations::CustomValueApiOperations
6
6
 
7
- def fetch_client!(wolf_token:, client_id:, tenant:, wolf_platform_url:, error_message:)
7
+ def fetch_client!(wolf_token:, client_id:, tenant:, wolf_platform_url:, error_message:, error_data: nil)
8
+ error_data ||= {}
8
9
  response = safe_http_get(
9
10
  headers: { "Authorization" => "Bearer #{wolf_token}" },
10
11
  url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
11
12
  query: { tenant: tenant },
12
- error_message: error_message
13
+ error_message: error_message,
14
+ error_data: { client_id: client_id }.merge(error_data)
13
15
  )
14
16
  response_body = response.body
15
17
  response_body.dig("data", "table", "company")
@@ -23,13 +25,15 @@ module WolfCore
23
25
  )
24
26
  end
25
27
 
26
- def create_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:)
28
+ def create_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:, error_data: nil)
29
+ error_data ||= {}
27
30
  safe_http_post(
28
31
  headers: { "Authorization" => "Bearer #{wolf_token}" },
29
32
  query: { tenant: tenant },
30
33
  url: "#{wolf_platform_url}/api/v2/companies",
31
34
  body: client,
32
- error_message: error_message
35
+ error_message: error_message,
36
+ error_data: { client: client }.merge(error_data)
33
37
  )
34
38
  end
35
39
 
@@ -42,13 +46,15 @@ module WolfCore
42
46
  )
43
47
  end
44
48
 
45
- def update_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:, client_id:)
49
+ def update_client!(wolf_token:, client:, tenant:, wolf_platform_url:, error_message:, client_id:, error_data: nil)
50
+ error_data ||= {}
46
51
  safe_http_put(
47
52
  headers: { "Authorization" => "Bearer #{wolf_token}" },
48
53
  query: { tenant: tenant },
49
54
  url: "#{wolf_platform_url}/api/v2/companies/#{client_id}",
50
55
  body: client,
51
- error_message: error_message
56
+ error_message: error_message,
57
+ error_data: { client_id: client_id, client: client }.merge(error_data)
52
58
  )
53
59
  end
54
60
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.83"
4
+ VERSION = "1.0.84"
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.83
4
+ version: 1.0.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo