rock_rms 5.9.2 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f32473b27446f60af760e2f113670a7a92bf7126bb27f77aea8eba4d0d71ff3
4
- data.tar.gz: 7ab84e4e37918f83c6aceddb3a744a7b0af8093425bd7a10073a8d2eb50b42a4
3
+ metadata.gz: d67ca6fa5ecea4ee2f92dcc85e4b54fa6c4821ddcf893516625ee20961ed03b3
4
+ data.tar.gz: cf5c11cf2dea23eed77eac210371c42bb0fe2b02edd0f185ef803288ce50893d
5
5
  SHA512:
6
- metadata.gz: 89cf493e25aa3bf163db43abb8f18c0319c8f1d41c7beedc78afd2b65689163358c75d604966b5eb02a02f73afe2bec115c15079e11f13b6ffa813252182332f
7
- data.tar.gz: 0c80f3bcfaa5cfb38a87f40e4039494b865fb672e221af7448d7138e441cde9d7ecfcf679f4fc5a9c32efc5609d936db0b2d979491d737b27d817b02bf83ff06
6
+ metadata.gz: f92db38dffbc0c81591f6215b4d962c232dae33074a7ab35d3b6d9ec80855de719c3978928471af46ee11ab59aa60382def3a3f9d60cb1b8bcd7559c37c84acb
7
+ data.tar.gz: 7602db4a3e6b680d4faea4375ab5df60291dea623e0c5674a979b43659004488a690c88cbaf77374b122495418af7427f8a158b98c136c36508445db9f87aa71
@@ -48,12 +48,14 @@ module RockRMS
48
48
  next_payment_date:,
49
49
  transaction_code: nil,
50
50
  payment_detail_id: nil,
51
- active: nil
51
+ active: nil,
52
+ frequency: nil
52
53
  )
53
54
  options = { 'NextPaymentDate' => next_payment_date }
54
55
  options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
55
56
  options['TransactionCode'] = transaction_code if transaction_code
56
57
  options['IsActive'] = active if !active.nil?
58
+ options['TransactionFrequencyValueId'] = RecurringFrequencies::RECURRING_FREQUENCIES[frequency] if !frequency.nil?
57
59
 
58
60
  patch(recurring_donation_path(id), options)
59
61
  end
@@ -45,7 +45,9 @@ module RockRMS
45
45
  apportion_refund_amount_over_accounts(details, transaction_amount, refund_amount).map do |dt|
46
46
  {
47
47
  'Amount' => -dt[:amount],
48
- 'AccountId' => dt[:fund_id]
48
+ 'AccountId' => dt[:fund_id],
49
+ 'EntityTypeId' => dt[:entity_type_id],
50
+ 'EntityId' => dt[:entity_id]
49
51
  }
50
52
  end
51
53
  end
@@ -8,6 +8,7 @@ module RockRMS
8
8
 
9
9
  def create_saved_payment_method(
10
10
  gateway_id:,
11
+ gateway_person_id: nil,
11
12
  payment_detail_id:,
12
13
  person_alias_id:,
13
14
  name:,
@@ -21,9 +22,34 @@ module RockRMS
21
22
  'ReferenceNumber' => reference_number
22
23
  }
23
24
 
25
+ if gateway_person_id
26
+ options['GatewayPersonIdentifier'] = gateway_person_id
27
+ end
28
+
24
29
  post(saved_payment_method_path, options)
25
30
  end
26
31
 
32
+ def update_saved_payment_method(
33
+ id,
34
+ gateway_id: nil,
35
+ gateway_person_id: nil,
36
+ payment_detail_id: nil,
37
+ person_alias_id: nil,
38
+ name: nil,
39
+ reference_number: nil
40
+ )
41
+ options = {}
42
+
43
+ options['FinancialGatewayId'] = gateway_id if gateway_id
44
+ options['GatewayPersonIdentifier'] = gateway_person_id if gateway_person_id
45
+ options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
46
+ options['Name'] = name if name
47
+ options['PersonAliasId'] = person_alias_id if person_alias_id
48
+ options['ReferenceNumber'] = reference_number if reference_number
49
+
50
+ patch(saved_payment_method_path(id), options)
51
+ end
52
+
27
53
  def delete_saved_payment_method(id)
28
54
  delete(saved_payment_method_path(id))
29
55
  end
@@ -14,6 +14,7 @@ module RockRMS
14
14
  start_date: 'StartDate',
15
15
  transaction_details: 'ScheduledTransactionDetails',
16
16
  transaction_code: 'TransactionCode',
17
+ transaction_type_id: 'TransactionTypeValueId',
17
18
  summary: 'Summary'
18
19
  }.freeze
19
20
 
@@ -5,6 +5,7 @@ module RockRMS
5
5
  id: 'Id',
6
6
  foreign_key: 'ForeignKey',
7
7
  gateway_id: 'FinancialGatewayId',
8
+ gateway_person_id: 'GatewayPersonIdentifier',
8
9
  name: 'Name',
9
10
  payment_details: 'FinancialPaymentDetail',
10
11
  payment_detail_id: 'FinancialPaymentDetailId',
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '5.9.2'.freeze
2
+ VERSION = '5.13.0'.freeze
3
3
  end
@@ -54,7 +54,20 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
54
54
  'FinancialGatewayId' => nil,
55
55
  'FinancialPaymentDetailId' => 156,
56
56
  'TransactionDateTime' => '2018-02-01',
57
- 'TransactionDetails' => [{"Amount"=>-10.0, "AccountId"=>23}, {"Amount"=>-90.0, "AccountId"=>24}],
57
+ 'TransactionDetails' => [
58
+ {
59
+ "Amount"=>-10.0,
60
+ "AccountId"=>23,
61
+ "EntityTypeId" => nil,
62
+ "EntityId" => nil
63
+ },
64
+ {
65
+ "Amount"=> -90.0,
66
+ "AccountId"=>24,
67
+ "EntityTypeId" => nil,
68
+ "EntityId" => nil
69
+ }
70
+ ],
58
71
  'TransactionTypeValueId' => 53,
59
72
  'TransactionCode' => nil
60
73
  }
@@ -93,7 +106,20 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
93
106
  'FinancialGatewayId' => nil,
94
107
  'FinancialPaymentDetailId' => 156,
95
108
  'TransactionDateTime' => '2018-02-01',
96
- 'TransactionDetails' => [{"Amount"=>-7.56, "AccountId"=>23}, {"Amount"=>-67.99, "AccountId"=>24}],
109
+ 'TransactionDetails' => [
110
+ {
111
+ "Amount"=>-7.56,
112
+ "AccountId"=>23,
113
+ "EntityTypeId" => nil,
114
+ "EntityId" => nil
115
+ },
116
+ {
117
+ "Amount"=>-67.99,
118
+ "AccountId"=>24,
119
+ "EntityTypeId" => nil,
120
+ "EntityId" => nil
121
+ }
122
+ ],
97
123
  'TransactionTypeValueId' => 53,
98
124
  'TransactionCode' => nil
99
125
  }
@@ -27,6 +27,7 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do
27
27
  start_date
28
28
  transaction_details
29
29
  transaction_code
30
+ transaction_type_id
30
31
  summary
31
32
  ]
32
33
 
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: 5.9.2
4
+ version: 5.13.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: 2021-04-02 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday