rock_rms 3.7.0 → 3.8.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e535a69940f4263625158ca1ea2097ac261e0c58
|
4
|
+
data.tar.gz: b229d8c04bebd7b374ad58f0a708abd5610ea74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12001933913c094b8c085ef3c7a017675f8abc92b4233fd5a8b35b800cf7d4be3ca128d6022e085145f4fbb1e7ca0ed16a5aeba47b60750eaa770f5e39adcc54
|
7
|
+
data.tar.gz: 252c9fc0c48b270f5c4a7fb161e80f86d6fae6371432717e20a926c965dc36ce67b8f65b254134acceafb42d0ab2236fecad75d25539ff37759746992c1acfd9
|
@@ -4,6 +4,7 @@ module RockRMS
|
|
4
4
|
MAP = {
|
5
5
|
id: 'Id',
|
6
6
|
date: 'TransactionDateTime',
|
7
|
+
person: 'AuthorizedPersonAlias',
|
7
8
|
person_id: 'AuthorizedPersonAliasId',
|
8
9
|
batch_id: 'BatchId',
|
9
10
|
gateway_id: 'FinancialGatewayId',
|
@@ -21,10 +22,16 @@ module RockRMS
|
|
21
22
|
response = to_h(MAP, data)
|
22
23
|
response[:details] = TransactionDetail.format(response[:details])
|
23
24
|
response[:payment_details] = PaymentMethod.format(response[:payment_details])
|
25
|
+
response[:person] = format_person(response[:person])
|
24
26
|
response[:amount] = calculate_total(response[:details])
|
25
27
|
response
|
26
28
|
end
|
27
29
|
|
30
|
+
def format_person(res)
|
31
|
+
return res if res.nil?
|
32
|
+
Person.format(res['Person'])
|
33
|
+
end
|
34
|
+
|
28
35
|
def calculate_total(details)
|
29
36
|
details.reduce(0) { |sum, td| sum + td[:amount] }
|
30
37
|
end
|
@@ -3,12 +3,15 @@ module RockRMS
|
|
3
3
|
class TransactionDetail < Base
|
4
4
|
MAP = {
|
5
5
|
id: 'Id',
|
6
|
+
fund: 'Account',
|
6
7
|
fund_id: 'AccountId',
|
7
8
|
amount: 'Amount'
|
8
9
|
}.freeze
|
9
10
|
|
10
11
|
def format_single(response)
|
11
|
-
to_h(MAP, response)
|
12
|
+
response = to_h(MAP, response)
|
13
|
+
response[:fund] = Fund.format(response[:fund])
|
14
|
+
response
|
12
15
|
end
|
13
16
|
end
|
14
17
|
end
|
data/lib/rock_rms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_rms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|