rock_rms 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rock_rms/client.rb +1 -0
- data/lib/rock_rms/resources/gateway.rb +11 -0
- data/lib/rock_rms/resources/transaction.rb +11 -2
- data/lib/rock_rms/response/gateway.rb +15 -0
- data/lib/rock_rms/response/transaction.rb +1 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/resources/gateway_spec.rb +13 -0
- data/spec/rock_rms/resources/transaction_spec.rb +1 -0
- data/spec/support/fixtures/gateways.json +22 -0
- data/spec/support/rock_mock.rb +1 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93022281b1fbfb9085f5e8d645efdb07c4365a22
|
4
|
+
data.tar.gz: 16c794212e821977c4ac7137574eee7fbfd6e1ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e70a139af03b29e0fc0bfcebf6c3d91e4d0e63e816e28289c7521190a8f6381ffab9253a5cebb5a68b7570563d31fef3f44f6876a09d3ed382f315dc1b83e25
|
7
|
+
data.tar.gz: 07215a3a976faffa8baf74214af142264e3afb42968721bb4681f5d59771beeeea7cff4ed064515e21d2e4283a62bfaaf460812bf404d897bc58d84f2fe6338c
|
data/README.md
CHANGED
data/lib/rock_rms/client.rb
CHANGED
@@ -11,6 +11,7 @@ module RockRMS
|
|
11
11
|
include RockRMS::Client::Batch
|
12
12
|
include RockRMS::Client::Fund
|
13
13
|
include RockRMS::Client::Campus
|
14
|
+
include RockRMS::Client::Gateway
|
14
15
|
include RockRMS::Client::Group
|
15
16
|
include RockRMS::Client::GroupMember
|
16
17
|
include RockRMS::Client::PaymentMethod
|
@@ -27,13 +27,15 @@ module RockRMS
|
|
27
27
|
source_type_id: 10,
|
28
28
|
transaction_code: nil,
|
29
29
|
summary: nil,
|
30
|
-
recurring_donation_id: nil
|
30
|
+
recurring_donation_id: nil,
|
31
|
+
gateway_id: nil
|
31
32
|
)
|
32
33
|
|
33
34
|
options = {
|
34
35
|
'AuthorizedPersonAliasId' => authorized_person_id,
|
35
36
|
'ScheduledTransactionId' => recurring_donation_id,
|
36
37
|
'BatchId' => batch_id,
|
38
|
+
'FinancialGatewayId' => gateway_id,
|
37
39
|
'FinancialPaymentDetailId' => payment_type,
|
38
40
|
'TransactionCode' => transaction_code,
|
39
41
|
'TransactionDateTime' => date,
|
@@ -45,11 +47,18 @@ module RockRMS
|
|
45
47
|
post(transaction_path, options)
|
46
48
|
end
|
47
49
|
|
48
|
-
def update_transaction(
|
50
|
+
def update_transaction(
|
51
|
+
id,
|
52
|
+
batch_id: nil,
|
53
|
+
summary: nil,
|
54
|
+
recurring_donation_id: nil,
|
55
|
+
gateway_id: nil
|
56
|
+
)
|
49
57
|
options = {}
|
50
58
|
|
51
59
|
options['Summary'] = summary if summary
|
52
60
|
options['BatchId'] = batch_id if batch_id
|
61
|
+
options['FinancialGatewayId'] = gateway_id if gateway_id
|
53
62
|
options['ScheduledTransactionId'] = recurring_donation_id if recurring_donation_id
|
54
63
|
|
55
64
|
patch(transaction_path(id), options)
|
data/lib/rock_rms/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe RockRMS::Client::Gateway, type: :model do
|
4
|
+
include_context 'resource specs'
|
5
|
+
|
6
|
+
describe '#list_gateways' do
|
7
|
+
it 'returns a array' do
|
8
|
+
resource = client.list_gateways
|
9
|
+
expect(resource).to be_a(Array)
|
10
|
+
expect(resource.first).to be_a(Hash)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -81,6 +81,7 @@ RSpec.describe RockRMS::Client::Transaction, type: :model do
|
|
81
81
|
'AuthorizedPersonAliasId' => 1,
|
82
82
|
'ScheduledTransactionId' => 1,
|
83
83
|
'BatchId' => 1,
|
84
|
+
'FinancialGatewayId' => nil,
|
84
85
|
'FinancialPaymentDetailId' => 1,
|
85
86
|
'TransactionCode' => 'asdf',
|
86
87
|
'TransactionDateTime' => 1,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"Name": "Simple Donation",
|
4
|
+
"Description": null,
|
5
|
+
"EntityTypeId": 5367,
|
6
|
+
"BatchTimeOffsetTicks": 0,
|
7
|
+
"IsActive": false,
|
8
|
+
"EntityType": null,
|
9
|
+
"CreatedDateTime": null,
|
10
|
+
"ModifiedDateTime": null,
|
11
|
+
"CreatedByPersonAliasId": null,
|
12
|
+
"ModifiedByPersonAliasId": null,
|
13
|
+
"ModifiedAuditValuesAlreadyUpdated": false,
|
14
|
+
"Attributes": null,
|
15
|
+
"AttributeValues": null,
|
16
|
+
"Id": 3,
|
17
|
+
"Guid": "b96bc08c-84e7-4c44-92e8-73a9488ed212",
|
18
|
+
"ForeignId": null,
|
19
|
+
"ForeignGuid": null,
|
20
|
+
"ForeignKey": null
|
21
|
+
}
|
22
|
+
]
|
data/spec/support/rock_mock.rb
CHANGED
@@ -25,6 +25,7 @@ class RockMock < Sinatra::Base
|
|
25
25
|
transaction: 'FinancialTransactions/:id',
|
26
26
|
transactions: 'FinancialTransactions',
|
27
27
|
families: 'Groups/GetFamilies/:id',
|
28
|
+
gateways: 'FinancialGateways',
|
28
29
|
group: 'Groups/:id',
|
29
30
|
groups: 'Groups',
|
30
31
|
payment_methods: 'FinancialPaymentDetails',
|
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: 3.
|
4
|
+
version: 3.6.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: 2018-03-
|
11
|
+
date: 2018-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/rock_rms/resources/batch.rb
|
188
188
|
- lib/rock_rms/resources/campus.rb
|
189
189
|
- lib/rock_rms/resources/fund.rb
|
190
|
+
- lib/rock_rms/resources/gateway.rb
|
190
191
|
- lib/rock_rms/resources/group.rb
|
191
192
|
- lib/rock_rms/resources/group_member.rb
|
192
193
|
- lib/rock_rms/resources/payment_method.rb
|
@@ -201,6 +202,7 @@ files:
|
|
201
202
|
- lib/rock_rms/response/batch.rb
|
202
203
|
- lib/rock_rms/response/campus.rb
|
203
204
|
- lib/rock_rms/response/fund.rb
|
205
|
+
- lib/rock_rms/response/gateway.rb
|
204
206
|
- lib/rock_rms/response/group.rb
|
205
207
|
- lib/rock_rms/response/group_location.rb
|
206
208
|
- lib/rock_rms/response/location.rb
|
@@ -218,6 +220,7 @@ files:
|
|
218
220
|
- spec/rock_rms/error_spec.rb
|
219
221
|
- spec/rock_rms/resources/batch_spec.rb
|
220
222
|
- spec/rock_rms/resources/campus_spec.rb
|
223
|
+
- spec/rock_rms/resources/gateway_spec.rb
|
221
224
|
- spec/rock_rms/resources/group_member_spec.rb
|
222
225
|
- spec/rock_rms/resources/group_spec.rb
|
223
226
|
- spec/rock_rms/resources/payment_method_spec.rb
|
@@ -252,6 +255,7 @@ files:
|
|
252
255
|
- spec/support/fixtures/create_refund.json
|
253
256
|
- spec/support/fixtures/create_transaction.json
|
254
257
|
- spec/support/fixtures/families.json
|
258
|
+
- spec/support/fixtures/gateways.json
|
255
259
|
- spec/support/fixtures/group.json
|
256
260
|
- spec/support/fixtures/group_locations.json
|
257
261
|
- spec/support/fixtures/groups.json
|