credova 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/credova/api.rb +5 -4
- data/lib/credova/application.rb +2 -2
- data/lib/credova/ffl.rb +1 -1
- data/lib/credova/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68bc96d04f1b8144884f4921b77a5796e9392e26596247081dc866462d1c5ff0
|
4
|
+
data.tar.gz: 7a88000202ed805d4a50912c358b833d53dbe62631207749fc18b7bf06c36a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03f80ec3327370276cddb9459300f903660dc73fd60a173022b2404bff44fbc02cb7134aa5463e156a36bf65678664c2a577ec361c2e89603d92824850c2203
|
7
|
+
data.tar.gz: cbce41558061ab53b242b08540d8d49dd2432ceffb268e958fda1814dda9552f26164e069cbe5cb2356184608dccb038609562bddf36eb8079abf2f108000bee
|
data/lib/credova/api.rb
CHANGED
@@ -66,10 +66,11 @@ module Credova
|
|
66
66
|
file_name[(file_name.rindex('.') + 1)..-1]
|
67
67
|
end
|
68
68
|
|
69
|
-
def standardize_body_data
|
70
|
-
submitted_data.
|
71
|
-
|
72
|
-
|
69
|
+
def standardize_body_data(submitted_data, permitted_data_attrs)
|
70
|
+
_submitted_data = submitted_data.deep_transform_keys(&:to_sym)
|
71
|
+
permitted_data = (_submitted_data.select! { |k, v| permitted_data_attrs.include?(k) } || _submitted_data)
|
72
|
+
|
73
|
+
permitted_data.deep_transform_keys { |k| k.to_s.camelize(:lower) }
|
73
74
|
end
|
74
75
|
|
75
76
|
end
|
data/lib/credova/application.rb
CHANGED
@@ -41,7 +41,7 @@ module Credova
|
|
41
41
|
|
42
42
|
headers['Callback-Url'] = callback_url if callback_url.present?
|
43
43
|
|
44
|
-
standardize_body_data
|
44
|
+
application_data = standardize_body_data(application_data, CREATE_ATTRS[:permitted])
|
45
45
|
|
46
46
|
post_request(endpoint, application_data, headers)
|
47
47
|
end
|
@@ -67,7 +67,7 @@ module Credova
|
|
67
67
|
*content_type_header('application/json'),
|
68
68
|
].to_h
|
69
69
|
|
70
|
-
standardize_body_data
|
70
|
+
delivery_data = standardize_body_data(delivery_data, SET_DELIVERY_INFORMATION_ATTRS[:permitted])
|
71
71
|
|
72
72
|
post_request(endpoint, delivery_data, headers)
|
73
73
|
end
|
data/lib/credova/ffl.rb
CHANGED
@@ -29,7 +29,7 @@ module Credova
|
|
29
29
|
*content_type_header('application/json'),
|
30
30
|
].to_h
|
31
31
|
|
32
|
-
standardize_body_data
|
32
|
+
ffl_data = standardize_body_data(ffl_data, CREATE_ATTRS[:permitted])
|
33
33
|
|
34
34
|
post_request(endpoint, ffl_data, headers)
|
35
35
|
end
|
data/lib/credova/version.rb
CHANGED