rock_rms 6.0.0 → 6.0.4
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/transaction.rb +5 -2
- data/lib/rock_rms/resources/transaction_detail.rb +7 -5
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/resources/recurring_donation_spec.rb +1 -1
- data/spec/rock_rms/resources/transaction_detail_spec.rb +40 -15
- data/spec/rock_rms/resources/transaction_spec.rb +1 -1
- 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: da4caae8fdb2aac247791226b248cda65af1110fab52adad19f9fc6968fae3cd
|
4
|
+
data.tar.gz: 773f7f6e25e4ec5ca9389e78cd113f8e44d29af2e5a2f0ce2b59803779caa0a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368d09ee713ceedcc744bee4486ff23b15e406378cefbbe90d6decdef8e425d2a2f9b9489a10d517f97d3df4c2e927b3a195e9be7a59e1307b918385f9f534a2
|
7
|
+
data.tar.gz: c6171cb087332d56da11940817d5b37cee291112cbd89c0acb8da4c1978754917c7e7e677b01e1055c5d9c5ae0f91607fae82e41e8701f3cfaef58c255d45a24
|
@@ -57,7 +57,8 @@ module RockRMS
|
|
57
57
|
source_type_id: nil,
|
58
58
|
transaction_code: nil,
|
59
59
|
transaction_type_value_id: nil,
|
60
|
-
authorized_person_id: nil
|
60
|
+
authorized_person_id: nil,
|
61
|
+
date: nil
|
61
62
|
)
|
62
63
|
options = {}
|
63
64
|
|
@@ -69,6 +70,7 @@ module RockRMS
|
|
69
70
|
options['TransactionTypeValueId'] = transaction_type_value_id if transaction_type_value_id
|
70
71
|
options['TransactionCode'] = transaction_code if transaction_code
|
71
72
|
options['AuthorizedPersonAliasId'] = authorized_person_id if authorized_person_id
|
73
|
+
options['TransactionDateTime'] = date if date
|
72
74
|
|
73
75
|
patch(transaction_path(id), options)
|
74
76
|
end
|
@@ -99,7 +101,8 @@ module RockRMS
|
|
99
101
|
'Amount' => fund[:amount],
|
100
102
|
'AccountId' => fund[:fund_id],
|
101
103
|
'EntityTypeId' => fund[:entity_type_id],
|
102
|
-
'EntityId' => fund[:entity_id]
|
104
|
+
'EntityId' => fund[:entity_id],
|
105
|
+
'FeeAmount' => fund[:fee_amount]
|
103
106
|
}
|
104
107
|
end
|
105
108
|
end
|
@@ -16,15 +16,17 @@ module RockRMS
|
|
16
16
|
fund_id: nil,
|
17
17
|
amount: nil,
|
18
18
|
fee_amount: nil,
|
19
|
+
fee_coverage_amount: nil,
|
19
20
|
entity_type_id: nil,
|
20
21
|
entity_id: nil
|
21
22
|
)
|
22
23
|
options = {}
|
23
|
-
options['AccountId']
|
24
|
-
options['Amount']
|
25
|
-
options['FeeAmount']
|
26
|
-
options['EntityTypeId']
|
27
|
-
options['EntityId']
|
24
|
+
options['AccountId'] = fund_id if fund_id
|
25
|
+
options['Amount'] = amount if amount
|
26
|
+
options['FeeAmount'] = fee_amount if fee_amount
|
27
|
+
options['EntityTypeId'] = entity_type_id if entity_type_id
|
28
|
+
options['EntityId'] = entity_id if entity_id
|
29
|
+
options['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount
|
28
30
|
|
29
31
|
patch(transaction_detail_path(id), options)
|
30
32
|
end
|
data/lib/rock_rms/version.rb
CHANGED
@@ -139,7 +139,7 @@ RSpec.describe RockRMS::Client::RecurringDonation, type: :model do
|
|
139
139
|
'FinancialGatewayId' => nil,
|
140
140
|
'FinancialPaymentDetailId' => nil,
|
141
141
|
'TransactionCode' => 'asdf',
|
142
|
-
'ScheduledTransactionDetails' => [{ 'Amount' => 450, 'AccountId' => 2, 'EntityId' => nil, 'EntityTypeId' => nil }],
|
142
|
+
'ScheduledTransactionDetails' => [{ 'Amount' => 450, 'AccountId' => 2, 'EntityId' => nil, 'EntityTypeId' => nil, 'FeeAmount' => nil }],
|
143
143
|
'GatewayScheduleId' => nil,
|
144
144
|
'SourceTypeValueId' => 10,
|
145
145
|
'ForeignKey' => nil
|
@@ -34,24 +34,49 @@ RSpec.describe RockRMS::Client::TransactionDetail, type: :model do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
describe '#update_transaction_detail' do
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
context 'simple' do
|
38
|
+
subject(:resource) do
|
39
|
+
client.update_transaction_detail(
|
40
|
+
123,
|
41
|
+
fund_id: 2,
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'returns nothing' do
|
46
|
+
expect(client.update_transaction_detail(123, fund_id: 5)).to eq(nil)
|
47
|
+
end
|
43
48
|
|
44
|
-
|
45
|
-
|
49
|
+
it 'passes options' do
|
50
|
+
expect(client).to receive(:patch)
|
51
|
+
.with(
|
52
|
+
'FinancialTransactionDetails/123',
|
53
|
+
'AccountId' => 2
|
54
|
+
).and_call_original
|
55
|
+
resource
|
56
|
+
end
|
46
57
|
end
|
47
58
|
|
48
|
-
|
49
|
-
|
50
|
-
.
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
59
|
+
context 'complex' do
|
60
|
+
subject(:resource) do
|
61
|
+
client.update_transaction_detail(
|
62
|
+
123,
|
63
|
+
fund_id: 2,
|
64
|
+
fee_amount: 50,
|
65
|
+
fee_coverage_amount: 45
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'passes options' do
|
70
|
+
expect(client).to receive(:patch)
|
71
|
+
.with(
|
72
|
+
'FinancialTransactionDetails/123',
|
73
|
+
'FeeAmount' => 50,
|
74
|
+
'FeeCoverageAmount' => 45,
|
75
|
+
'AccountId' => 2
|
76
|
+
).and_call_original
|
77
|
+
resource
|
78
|
+
end
|
55
79
|
end
|
80
|
+
|
56
81
|
end
|
57
82
|
end
|
@@ -85,7 +85,7 @@ RSpec.describe RockRMS::Client::Transaction, type: :model do
|
|
85
85
|
'FinancialPaymentDetailId' => 1,
|
86
86
|
'TransactionCode' => 'asdf',
|
87
87
|
'TransactionDateTime' => 1,
|
88
|
-
'TransactionDetails' => [{ 'Amount' => 450, 'AccountId' => 2, 'EntityTypeId' => nil, 'EntityId' => nil }],
|
88
|
+
'TransactionDetails' => [{ 'Amount' => 450, 'AccountId' => 2, 'EntityTypeId' => nil, 'EntityId' => nil, 'FeeAmount' => nil }],
|
89
89
|
'TransactionTypeValueId' => 53,
|
90
90
|
'SourceTypeValueId' => 10,
|
91
91
|
'Summary' => 'taco tuesday'
|
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: 6.0.
|
4
|
+
version: 6.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|