wolf_core 1.0.79 → 1.0.80

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: cc3e21eb1532a5bd8771602f7dd2232b90e4473c250b89a1622522611b296c9e
4
- data.tar.gz: 36059878bace0fe3f461ccb766b1a7ef82fe005fb2ba8d920dcfc6f9f3f9cd41
3
+ metadata.gz: dba5a6af48f4e65eb2177ce9efbe3054962b0ae0a9486c6e6bebf56e807e504b
4
+ data.tar.gz: a1e4b6de1374970c33cd412815538304ba4c055a7c56ac397372c574a41b68e5
5
5
  SHA512:
6
- metadata.gz: 95bbf884e9bdd6ecff49f31c0d13acfe7d83bff9b8f0b25197d3d59cadc3f47d6759dfbbb6a017093ff407136f4fd852286e565d52d2bc0553fdb38a96a5b4f7
7
- data.tar.gz: e30ba7b7e3a113e0646bd686d73da9bf463b2316d571841a538b31c31779fc8d1f8f5334b7dbdf94d4acd1c29df9223c4052920bd1ccb7348aac03b38763e05c
6
+ metadata.gz: b95aa6e078393c421bd80c5181f492937663a854e10193578a0cc7c01d77993fb4f0274fdd2b651c3dfecf6375e0eda52e699e1f9666884ab216d9402844ee3c
7
+ data.tar.gz: d13fd447223299bbf6e2ed7198175c937c37cd47204bd5bfb96169903856a29314e1dd21b7bcb963cc77b08e52d637d44f91d3951d876b17c7c23af803b37f35
@@ -107,7 +107,8 @@ module WolfCore
107
107
  validate_http_response(response: response, message: error_message, error_data: error_data)
108
108
  custom_values = response.body.dig("data", "table", "custom_values")
109
109
 
110
- if custom_values&.any?
110
+ response = if custom_values&.any?
111
+ operation_type = :update
111
112
  custom_value_id = custom_values.first["id"]
112
113
  update_custom_value!(
113
114
  wolf_platform_url: wolf_platform_url,
@@ -119,6 +120,7 @@ module WolfCore
119
120
  error_data: error_data
120
121
  )
121
122
  else
123
+ operation_type = :create
122
124
  create_custom_value!(
123
125
  wolf_platform_url: wolf_platform_url,
124
126
  tenant: tenant,
@@ -129,6 +131,8 @@ module WolfCore
129
131
  error_data: error_data
130
132
  )
131
133
  end
134
+
135
+ { operation_type: operation_type, response: response }
132
136
  end
133
137
 
134
138
  def upsert_custom_value(wolf_token:, tenant:, wolf_platform_url:, query:, custom_requirement_id:, custom_value:)
@@ -143,7 +147,8 @@ module WolfCore
143
147
 
144
148
  custom_values = response.body.dig("data", "table", "custom_values")
145
149
 
146
- if custom_values&.any?
150
+ response = if custom_values&.any?
151
+ operation_type = :update
147
152
  custom_value_id = custom_values.first["id"]
148
153
  update_custom_value(
149
154
  wolf_platform_url: wolf_platform_url,
@@ -153,6 +158,7 @@ module WolfCore
153
158
  custom_value: custom_value
154
159
  )
155
160
  else
161
+ operation_type = :create
156
162
  create_custom_value(
157
163
  wolf_platform_url: wolf_platform_url,
158
164
  tenant: tenant,
@@ -161,6 +167,7 @@ module WolfCore
161
167
  custom_value: custom_value
162
168
  )
163
169
  end
170
+ OpenStruct.new({ operation_type: operation_type, response: response })
164
171
  end
165
172
  end
166
173
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.79"
4
+ VERSION = "1.0.80"
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.79
4
+ version: 1.0.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo