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: fd375e13d1ddbcc18d07158eef1623732f1ddf94
4
- data.tar.gz: eaaf26fe10343d12fd205d28355e6ecc3a0b2bfa
3
+ metadata.gz: e535a69940f4263625158ca1ea2097ac261e0c58
4
+ data.tar.gz: b229d8c04bebd7b374ad58f0a708abd5610ea74e
5
5
  SHA512:
6
- metadata.gz: c12ed63721dfd7b629f68bbbfba73305bfac2e989d8f1d170982ca144fd4b594ce62ba4963b1c6caac1dc88a5e976b6449623ee8efe7a5e88108f0fe6108cd36
7
- data.tar.gz: a58a9265d8f6b51bd6fbead0981055f4eee142ca37909ad4b45b37b6d32acab877f76449cc1f38dd66d6a6dd9b3b7956359c82ae213f7ea631468a0d73af1b9b
6
+ metadata.gz: 12001933913c094b8c085ef3c7a017675f8abc92b4233fd5a8b35b800cf7d4be3ca128d6022e085145f4fbb1e7ca0ed16a5aeba47b60750eaa770f5e39adcc54
7
+ data.tar.gz: 252c9fc0c48b270f5c4a7fb161e80f86d6fae6371432717e20a926c965dc36ce67b8f65b254134acceafb42d0ab2236fecad75d25539ff37759746992c1acfd9
@@ -3,6 +3,7 @@ module RockRMS
3
3
  class Fund < Base
4
4
  MAP = {
5
5
  id: 'Id',
6
+ campus_id: 'CampusId',
6
7
  name: 'Name'
7
8
  }.freeze
8
9
 
@@ -8,6 +8,7 @@ module RockRMS
8
8
  first_name: 'FirstName',
9
9
  last_name: 'LastName',
10
10
  giving_id: 'GivingId',
11
+ giving_group_id: 'GivingGroupId',
11
12
  alias_id: 'PrimaryAliasId',
12
13
  connection_status_value_id: 'ConnectionStatusValueId'
13
14
  }.freeze
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '3.7.0'.freeze
2
+ VERSION = '3.8.0'.freeze
3
3
  end
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.7.0
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-01 00:00:00.000000000 Z
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday