rock_rms 0.0.7 → 0.0.8
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 +4 -4
- data/lib/rock_rms/error.rb +1 -1
- data/lib/rock_rms/resources/donation.rb +7 -5
- data/lib/rock_rms/resources/payment_method.rb +13 -0
- data/lib/rock_rms/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 514de0ec32fa96166e279cdf6e49215a7d624b6a
|
4
|
+
data.tar.gz: 15f69b870070433905f4bb35b48392dd2649c6f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b42adaf40fd595e89e941ad174c410bc9e7e508adac4f4aed40b3811cfe02254956efd6ca1ea63865c9cb9eb96a8350c3666fe2a7039b63dad36adbc338432c
|
7
|
+
data.tar.gz: 3ed86f2a15a85b89f28c9af76348e1dbadb2ca0ae0ddeecf2dfe2a4abf5f0bbcc390a3f55725d45c455a5ace26606210eadd8f5397efed30116feeb1966f3b92
|
data/lib/rock_rms/error.rb
CHANGED
@@ -17,17 +17,19 @@ module RockRMS
|
|
17
17
|
RockRMS::Donation.format(res)
|
18
18
|
end
|
19
19
|
|
20
|
-
def create_donation(payment_type:, authorized_person_id:, amount:, date:, fund_id:, batch_id:)
|
20
|
+
def create_donation(payment_type:, authorized_person_id:, amount:, date:, fund_id:, batch_id:, transaction_code: nil)
|
21
21
|
options = {
|
22
|
-
"TransactionDateTime" => date,
|
23
22
|
"AuthorizedPersonAliasId" => authorized_person_id,
|
23
|
+
"BatchId" => batch_id,
|
24
|
+
"FinancialPaymentDetailId" => payment_type,
|
25
|
+
"TransactionCode" => transaction_code,
|
26
|
+
"TransactionDateTime" => date,
|
24
27
|
"TransactionDetails" => [{
|
25
28
|
"Amount" => amount,
|
26
29
|
"AccountId" => fund_id,
|
27
30
|
}],
|
28
|
-
"TransactionTypeValueId" => 53, #
|
29
|
-
"
|
30
|
-
"BatchId" => batch_id
|
31
|
+
"TransactionTypeValueId" => 53, # contribution, registration
|
32
|
+
"SourceTypeValueId" => 10, # website, kiosk, mobile app
|
31
33
|
}
|
32
34
|
post(transaction_path, options)
|
33
35
|
end
|
@@ -6,6 +6,19 @@ module RockRMS
|
|
6
6
|
get(payment_method_path, options)
|
7
7
|
end
|
8
8
|
|
9
|
+
def create_payment_method(uuid:, person_id:, last_4:, payment_type:, name:)
|
10
|
+
opts = {
|
11
|
+
"PersonAliasId" => person_id,
|
12
|
+
"Name" => name,
|
13
|
+
"ForeignKey" => uuid,
|
14
|
+
"FinancialPaymentDetail" => {
|
15
|
+
"AccountNumberMasked" => last_4,
|
16
|
+
"CurrencyTypeValueId" => payment_type == 'card' ? 156 : 157,
|
17
|
+
}
|
18
|
+
}
|
19
|
+
post("FinancialPersonSavedAccounts", opts)
|
20
|
+
end
|
21
|
+
|
9
22
|
private
|
10
23
|
|
11
24
|
def payment_method_path(id = nil)
|
data/lib/rock_rms/version.rb
CHANGED
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: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.6.8
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: A Ruby wrapper for the Rock RMS API
|