rock_rms 8.3.0 → 8.4.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99595984bdaa0f88e5c67214510f387e8140da99eb8c19838e157e34fe8cbde5
|
4
|
+
data.tar.gz: c52d968559001749f7793259241bc15b7417f8ebb2173d0b057c5c5e0dabfb72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2baef9f7cf2861dbb34d70e978d0a479ca064c4bd95f2408bfbf125e84f3472bfb44991f2f607efd920e9a752e31bf32e36489b1b9beb9c7aa040d97365c7af7
|
7
|
+
data.tar.gz: 1ced4bd65ca1ed1669f8a9a64968a889ab04b576c8c4df03e8773d53f04bcbf762035e1bf2b77259689c448dbd5ebbf2cd66be42954da3ad7f818d441fd147ee
|
@@ -31,6 +31,27 @@ module RockRMS
|
|
31
31
|
patch(transaction_detail_path(id), options)
|
32
32
|
end
|
33
33
|
|
34
|
+
def create_transaction_detail(
|
35
|
+
transaction_id:,
|
36
|
+
fund_id:,
|
37
|
+
amount:,
|
38
|
+
fee_amount: nil,
|
39
|
+
fee_coverage_amount: nil,
|
40
|
+
entity_type_id: nil,
|
41
|
+
entity_id: nil
|
42
|
+
)
|
43
|
+
options = {}
|
44
|
+
options['TransactionId'] = transaction_id
|
45
|
+
options['AccountId'] = fund_id
|
46
|
+
options['Amount'] = amount
|
47
|
+
options['FeeAmount'] = fee_amount if fee_amount
|
48
|
+
options['EntityTypeId'] = entity_type_id if entity_type_id
|
49
|
+
options['EntityId'] = entity_id if entity_id
|
50
|
+
options['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount
|
51
|
+
|
52
|
+
post(transaction_detail_path, options)
|
53
|
+
end
|
54
|
+
|
34
55
|
private
|
35
56
|
|
36
57
|
def transaction_detail_path(id = nil)
|
data/lib/rock_rms/version.rb
CHANGED
@@ -82,5 +82,34 @@ RSpec.describe RockRMS::Client::TransactionDetail, type: :model do
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
+
describe '#create_transaction_detail' do
|
86
|
+
context 'simple' do
|
87
|
+
subject(:resource) do
|
88
|
+
client.create_transaction_detail(
|
89
|
+
transaction_id: 123,
|
90
|
+
fund_id: 2,
|
91
|
+
amount: 5.00
|
92
|
+
)
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'returns nothing' do
|
96
|
+
expect(subject).to eq(12345)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'passes options' do
|
100
|
+
expect(client).to receive(:post)
|
101
|
+
.with(
|
102
|
+
'FinancialTransactionDetails',
|
103
|
+
{
|
104
|
+
'AccountId' => 2,
|
105
|
+
'Amount' => 5.00,
|
106
|
+
'TransactionId' => 123
|
107
|
+
}
|
108
|
+
).and_call_original
|
109
|
+
resource
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
85
114
|
end
|
86
115
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
12345
|
data/spec/support/rock_mock.rb
CHANGED
@@ -66,6 +66,7 @@ class RockMock < Sinatra::Base
|
|
66
66
|
create_refund: 'FinancialTransactionRefunds',
|
67
67
|
create_refund_reason: 'DefinedValues',
|
68
68
|
create_saved_payment_method: 'FinancialPersonSavedAccounts',
|
69
|
+
create_transaction_detail: 'FinancialTransactionDetails',
|
69
70
|
create_recurring_donation_detail: 'FinancialScheduledTransactionDetails',
|
70
71
|
}.each do |json, end_point|
|
71
72
|
post "/api/#{end_point}" do
|
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: 8.
|
4
|
+
version: 8.4.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: 2023-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -331,6 +331,7 @@ files:
|
|
331
331
|
- spec/support/fixtures/create_refund_reason.json
|
332
332
|
- spec/support/fixtures/create_saved_payment_method.json
|
333
333
|
- spec/support/fixtures/create_transaction.json
|
334
|
+
- spec/support/fixtures/create_transaction_detail.json
|
334
335
|
- spec/support/fixtures/defined_values.json
|
335
336
|
- spec/support/fixtures/families.json
|
336
337
|
- spec/support/fixtures/gateways.json
|