rock_rms 5.9.2 → 5.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_rms/resources/recurring_donation.rb +3 -1
- data/lib/rock_rms/resources/refund.rb +3 -1
- data/lib/rock_rms/resources/saved_payment_method.rb +26 -0
- data/lib/rock_rms/response/recurring_donation.rb +1 -0
- data/lib/rock_rms/response/saved_payment_method.rb +1 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/resources/refund_spec.rb +28 -2
- data/spec/rock_rms/response/recurring_donation_spec.rb +1 -0
- 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: d67ca6fa5ecea4ee2f92dcc85e4b54fa6c4821ddcf893516625ee20961ed03b3
|
4
|
+
data.tar.gz: cf5c11cf2dea23eed77eac210371c42bb0fe2b02edd0f185ef803288ce50893d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/rock_rms/version.rb
CHANGED
@@ -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' => [
|
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' => [
|
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
|
}
|
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.
|
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-
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|