wolf_core 0.1.48 → 0.1.50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wolf_core/application/application_service.rb +1 -1
- data/lib/wolf_core/application/barton/mappings.rb +18 -0
- data/lib/wolf_core/infrastructure/http_operations.rb +4 -7
- data/lib/wolf_core/utils/logging_utils.rb +6 -2
- data/lib/wolf_core/utils/result.rb +8 -0
- data/lib/wolf_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1300576efdc2106aca06d783067ce049b0b5a67be847e9f2a21c040bab7193c6
|
4
|
+
data.tar.gz: 025bf0e116fba9153660c8c599f5936a27a737f0c637f24d326dcd52b000a0bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 284f56638e3d3d2388726ffa3cf3365b1d06bd25467a9bcdac15e00381ac5dd30cd10d158827ad180df295e7ea6dac7181b3244c41be9ad85460b892832f3e8d
|
7
|
+
data.tar.gz: dbd3c4ae6cbab2e75babbb8fd340d983a2ee75fa382807a542d5332dc9bde58c24e7191bbf041395da0075867508ee9bdf75f7fd16e29e6174c04c0827fff78d
|
@@ -71,7 +71,7 @@ module WolfCore
|
|
71
71
|
def validate_salesforce_response(response)
|
72
72
|
return if response.code == 200
|
73
73
|
message = JSON.parse(response.body).first['message']
|
74
|
-
raise_service_error({ message: message })
|
74
|
+
raise_service_error({ message: message, response: response })
|
75
75
|
end
|
76
76
|
|
77
77
|
def get_wolf_token
|
@@ -28,6 +28,16 @@ module WolfCore
|
|
28
28
|
'Closed' => 'pending',
|
29
29
|
}
|
30
30
|
|
31
|
+
SUBMITTAL_STAGE_MAP = {
|
32
|
+
'Pre-Submission' => 'wait',
|
33
|
+
'Submittal' => 'wait',
|
34
|
+
'Send Out' => 'wait',
|
35
|
+
'On Hold' => 'wait',
|
36
|
+
'Offer' => 'wait',
|
37
|
+
'Withdraw' => 'declined',
|
38
|
+
'Reject' => 'rejected',
|
39
|
+
}
|
40
|
+
|
31
41
|
def map_provider_type_to_pricing_id(provider_type)
|
32
42
|
pricing_id = PROVIDER_TYPE_MAPPING[provider_type]
|
33
43
|
pricing_id || provider_type
|
@@ -55,6 +65,14 @@ module WolfCore
|
|
55
65
|
def reverse_map_order_status(value)
|
56
66
|
ORDER_STATUS_MAP.invert[value] || value
|
57
67
|
end
|
68
|
+
|
69
|
+
def map_submittal_stage_to_order_application_status(value)
|
70
|
+
SUBMITTAL_STAGE_MAP[value] || value
|
71
|
+
end
|
72
|
+
|
73
|
+
def revert_map_submittal_stage_to_order_application_status(value)
|
74
|
+
SUBMITTAL_STAGE_MAP.invert[value] || value
|
75
|
+
end
|
58
76
|
end
|
59
77
|
end
|
60
78
|
end
|
@@ -31,13 +31,11 @@ module WolfCore
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def async_http_post(**args)
|
34
|
-
|
35
|
-
|
36
|
-
log_object args
|
34
|
+
log_object "starting async_http_post"
|
35
|
+
log_object args, title: 'async_http_post args are'
|
37
36
|
run_async do
|
38
37
|
response = http_post(**args)
|
39
|
-
|
40
|
-
log_object parse_http_response(response).to_h
|
38
|
+
log_object parse_http_response(response), title: 'async_http_post response is'
|
41
39
|
end
|
42
40
|
end
|
43
41
|
|
@@ -63,8 +61,7 @@ module WolfCore
|
|
63
61
|
log_object args, title: 'async_http_put args are'
|
64
62
|
run_async do
|
65
63
|
response = http_put(**args)
|
66
|
-
|
67
|
-
log_object parse_http_response(response).to_h
|
64
|
+
log_object parse_http_response(response), title: 'async_http_put response is'
|
68
65
|
end
|
69
66
|
end
|
70
67
|
|
@@ -1,11 +1,15 @@
|
|
1
|
+
require_relative 'result'
|
2
|
+
|
1
3
|
module WolfCore
|
2
4
|
module LoggingUtils
|
3
5
|
def log_object(object, title: nil)
|
4
6
|
puts '---------------------------------'
|
5
7
|
puts title if title
|
6
8
|
case object
|
7
|
-
when Hash, Array, OpenStruct
|
8
|
-
|
9
|
+
when Hash, Array, OpenStruct, Result
|
10
|
+
if object.instance_of?(OpenStruct) || object.instance_of?(Result)
|
11
|
+
object = object.to_h
|
12
|
+
end
|
9
13
|
puts object.to_json
|
10
14
|
when Object
|
11
15
|
pp object
|
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: 0.1.
|
4
|
+
version: 0.1.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|