rock_rms 9.13.0 → 9.14.0
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/client.rb +2 -0
- data/lib/rock_rms/resources/block_action.rb +15 -0
- data/lib/rock_rms/resources/registration_session.rb +23 -0
- data/lib/rock_rms/response/registration_session.rb +20 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/response/registration_session_spec.rb +54 -0
- data/spec/support/fixtures/registration_sessions.json +18 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 274d3a23dca493a53c6ee7ec84fc292d4045490030db6c48fa0c12cbbe70c3a8
|
4
|
+
data.tar.gz: 51edb238bd2942bb9dd6682da597a259b0759cf4c273092219fa114fc9db7711
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32127f517586ff26fcaa09bef1e996dd8076a0dec8ed639a747f0c2aa121c43449b0f307363fcab62e5b0828d61c8d1cd464ff9d7935f3512acb2e24904cba5c
|
7
|
+
data.tar.gz: ebcace863675ccc12411f4b52ecad69acc658caa1bb14557c03514ad2d3e134e610c2c040b2fd4b3fb1ef33a749ba22e0f25f7efad18fb2b671e919deb954cb2
|
data/lib/rock_rms/client.rb
CHANGED
@@ -16,6 +16,7 @@ module RockRMS
|
|
16
16
|
include RockRMS::Client::Batch
|
17
17
|
include RockRMS::Client::BinaryFile
|
18
18
|
include RockRMS::Client::Block
|
19
|
+
include RockRMS::Client::BlockAction
|
19
20
|
include RockRMS::Client::BlockType
|
20
21
|
include RockRMS::Client::Fund
|
21
22
|
include RockRMS::Client::Campus
|
@@ -39,6 +40,7 @@ module RockRMS
|
|
39
40
|
include RockRMS::Client::Refund
|
40
41
|
include RockRMS::Client::RefundReason
|
41
42
|
include RockRMS::Client::Registration
|
43
|
+
include RockRMS::Client::RegistrationSession
|
42
44
|
include RockRMS::Client::SavedPaymentMethod
|
43
45
|
include RockRMS::Client::ServiceJob
|
44
46
|
include RockRMS::Client::SystemCommunication
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module BlockAction
|
4
|
+
def create_block_action(page_guid:, block_guid:, action_name:, body:)
|
5
|
+
post(block_action_path(page_guid, block_guid, action_name), body)
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def block_action_path(page_guid, block_guid, action_name)
|
11
|
+
"v2/BlockActions/#{page_guid}/#{block_guid}/#{action_name}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module RegistrationSession
|
4
|
+
PATH = 'RegistrationSessions'.freeze
|
5
|
+
|
6
|
+
def list_registration_sessions(options = {})
|
7
|
+
res = get(registration_session_path, options)
|
8
|
+
Response::RegistrationSession.format(res)
|
9
|
+
end
|
10
|
+
|
11
|
+
def find_registration_session(id)
|
12
|
+
res = get(registration_session_path(id))
|
13
|
+
Response::RegistrationSession.format(res)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def registration_session_path(id = nil)
|
19
|
+
id ? "#{PATH}/#{id}" : PATH
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module RockRMS
|
2
|
+
module Response
|
3
|
+
class RegistrationSession < Base
|
4
|
+
MAP = {
|
5
|
+
registration_instance_id: 'RegistrationInstanceId',
|
6
|
+
registration_data: 'RegistrationData',
|
7
|
+
session_start_date_time: 'SessionStartDateTime',
|
8
|
+
expiration_date_time: 'ExpirationDateTime',
|
9
|
+
client_ip_address: 'ClientIpAddress',
|
10
|
+
payment_gateway_reference: 'PaymentGatewayReference',
|
11
|
+
session_status: 'SessionStatus',
|
12
|
+
registration_id: 'RegistrationId'
|
13
|
+
}.freeze
|
14
|
+
|
15
|
+
def format_single(data)
|
16
|
+
to_h(MAP, data)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/rock_rms/version.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe RockRMS::Response::RegistrationSession, type: :model do
|
4
|
+
let(:parsed) { JSON.parse(FixturesHelper.read('registration_sessions.json')) }
|
5
|
+
|
6
|
+
describe '.format' do
|
7
|
+
subject(:result) { described_class.format(parsed) }
|
8
|
+
|
9
|
+
context 'when response is array' do
|
10
|
+
it 'returns an array' do
|
11
|
+
expect(described_class.format([])).to be_a(Array)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'has the following keys' do
|
16
|
+
response = result.first
|
17
|
+
expected_keys = %i[
|
18
|
+
registration_instance_id
|
19
|
+
registration_data
|
20
|
+
session_start_date_time
|
21
|
+
expiration_date_time
|
22
|
+
client_ip_address
|
23
|
+
payment_gateway_reference
|
24
|
+
session_status
|
25
|
+
registration_id
|
26
|
+
id
|
27
|
+
guid
|
28
|
+
created_date_time
|
29
|
+
modified_date_time
|
30
|
+
created_by_person_alias_id
|
31
|
+
attributes
|
32
|
+
attribute_values
|
33
|
+
foreign_key
|
34
|
+
]
|
35
|
+
|
36
|
+
expect(response.keys).to eq(expected_keys)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'translates keys' do
|
40
|
+
result.zip(parsed) do |r, p|
|
41
|
+
expect(r[:id]).to eq(p['Id'])
|
42
|
+
expect(r[:guid]).to eq(p['Guid'])
|
43
|
+
expect(r[:registration_instance_id]).to eq(p['RegistrationInstanceId'])
|
44
|
+
expect(r[:registration_data]).to eq(p['RegistrationData'])
|
45
|
+
expect(r[:session_start_date_time]).to eq(p['SessionStartDateTime'])
|
46
|
+
expect(r[:expiration_date_time]).to eq(p['ExpirationDateTime'])
|
47
|
+
expect(r[:client_ip_address]).to eq(p['ClientIpAddress'])
|
48
|
+
expect(r[:payment_gateway_reference]).to eq(p['PaymentGatewayReference'])
|
49
|
+
expect(r[:session_status]).to eq(p['SessionStatus'])
|
50
|
+
expect(r[:registration_id]).to eq(p['RegistrationId'])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"Id": 1,
|
4
|
+
"Guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
5
|
+
"RegistrationInstanceId": 123,
|
6
|
+
"RegistrationData": "{\"SomeData\":\"Value\"}",
|
7
|
+
"SessionStartDateTime": "2025-03-09T12:00:00.000Z",
|
8
|
+
"ExpirationDateTime": "2025-03-10T12:00:00.000Z",
|
9
|
+
"ClientIpAddress": "192.168.1.1",
|
10
|
+
"PaymentGatewayReference": "ref123456",
|
11
|
+
"SessionStatus": 1,
|
12
|
+
"RegistrationId": 456,
|
13
|
+
"CreatedDateTime": "2025-03-09T12:00:00.000Z",
|
14
|
+
"ModifiedDateTime": "2025-03-09T12:00:00.000Z",
|
15
|
+
"CreatedByPersonAliasId": 789,
|
16
|
+
"ForeignKey": null
|
17
|
+
}
|
18
|
+
]
|
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: 9.
|
4
|
+
version: 9.14.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:
|
11
|
+
date: 2025-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -192,6 +192,7 @@ files:
|
|
192
192
|
- lib/rock_rms/resources/batch.rb
|
193
193
|
- lib/rock_rms/resources/binary_file.rb
|
194
194
|
- lib/rock_rms/resources/block.rb
|
195
|
+
- lib/rock_rms/resources/block_action.rb
|
195
196
|
- lib/rock_rms/resources/block_type.rb
|
196
197
|
- lib/rock_rms/resources/campus.rb
|
197
198
|
- lib/rock_rms/resources/content_channel.rb
|
@@ -215,6 +216,7 @@ files:
|
|
215
216
|
- lib/rock_rms/resources/refund.rb
|
216
217
|
- lib/rock_rms/resources/refund_reason.rb
|
217
218
|
- lib/rock_rms/resources/registration.rb
|
219
|
+
- lib/rock_rms/resources/registration_session.rb
|
218
220
|
- lib/rock_rms/resources/saved_payment_method.rb
|
219
221
|
- lib/rock_rms/resources/service_job.rb
|
220
222
|
- lib/rock_rms/resources/system_communication.rb
|
@@ -256,6 +258,7 @@ files:
|
|
256
258
|
- lib/rock_rms/response/recurring_donation_details.rb
|
257
259
|
- lib/rock_rms/response/registration.rb
|
258
260
|
- lib/rock_rms/response/registration_instance.rb
|
261
|
+
- lib/rock_rms/response/registration_session.rb
|
259
262
|
- lib/rock_rms/response/saved_payment_method.rb
|
260
263
|
- lib/rock_rms/response/service_job.rb
|
261
264
|
- lib/rock_rms/response/system_communication.rb
|
@@ -312,6 +315,7 @@ files:
|
|
312
315
|
- spec/rock_rms/response/phone_number_spec.rb
|
313
316
|
- spec/rock_rms/response/recurring_donation_details_spec.rb
|
314
317
|
- spec/rock_rms/response/recurring_donation_spec.rb
|
318
|
+
- spec/rock_rms/response/registration_session_spec.rb
|
315
319
|
- spec/rock_rms/response/transaction_detail_spec.rb
|
316
320
|
- spec/rock_rms/response/transaction_spec.rb
|
317
321
|
- spec/rock_rms/response/workflow_action_type_spec.rb
|
@@ -365,6 +369,7 @@ files:
|
|
365
369
|
- spec/support/fixtures/recurring_donation.json
|
366
370
|
- spec/support/fixtures/recurring_donation_details.json
|
367
371
|
- spec/support/fixtures/recurring_donations.json
|
372
|
+
- spec/support/fixtures/registration_sessions.json
|
368
373
|
- spec/support/fixtures/saved_payment_methods.json
|
369
374
|
- spec/support/fixtures/transaction.json
|
370
375
|
- spec/support/fixtures/transaction_detail.json
|