rock_rms 9.14.0 → 9.16.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 +1 -0
- data/lib/rock_rms/parse_oj.rb +7 -0
- data/lib/rock_rms/resources/content_channel.rb +1 -1
- data/lib/rock_rms/resources/entity_type.rb +23 -0
- data/lib/rock_rms/resources/recurring_donation.rb +2 -0
- data/lib/rock_rms/resources/registration.rb +6 -0
- data/lib/rock_rms/response/entity_type.rb +18 -0
- data/lib/rock_rms/version.rb +1 -1
- data/rock_rms.gemspec +2 -0
- data/spec/rock_rms/resources/content_channel_spec.rb +1 -1
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d1bb6b2cd54d3ddf3110097578447e3729c5bcbe40af7a8ae2ed6690bf4d0f4
|
4
|
+
data.tar.gz: 77fa5f74b2735d8fc6adf13459e5f16a2b1556a6be211928f707bc3199479b7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6d03f184c6acba240b0c81c761dbdb3e0e57c91a3f066181688438465a8daf92ce27294a800b491a59f959d193b86cfc87af0b438fe5ceffc8c08e2c5a4a5c7
|
7
|
+
data.tar.gz: 51475c453bf766306acbaf91dd49a3d7069860902bfe4dcb168af52f66ee2b5ef7a5b0817c1694f3a8056c087fe58c1898da4cb1f3370d6f354a00551e00d6bf
|
data/lib/rock_rms/client.rb
CHANGED
@@ -25,6 +25,7 @@ module RockRMS
|
|
25
25
|
include RockRMS::Client::ContentChannelItem
|
26
26
|
include RockRMS::Client::DefinedType
|
27
27
|
include RockRMS::Client::DefinedValue
|
28
|
+
include RockRMS::Client::EntityType
|
28
29
|
include RockRMS::Client::ExceptionLog
|
29
30
|
include RockRMS::Client::Gateway
|
30
31
|
include RockRMS::Client::Group
|
data/lib/rock_rms/parse_oj.rb
CHANGED
@@ -7,6 +7,9 @@ module FaradayMiddleware
|
|
7
7
|
env[:body] = nil
|
8
8
|
elsif html_body?(env[:body])
|
9
9
|
env[:body] = env[:body]
|
10
|
+
elsif gzip_body?(env[:response_headers])
|
11
|
+
uncompressed_body = Zlib::GzipReader.new(StringIO.new(env[:body])).read
|
12
|
+
env[:body] = Oj.load(uncompressed_body, mode: :compat)
|
10
13
|
else
|
11
14
|
env[:body] = Oj.load(env[:body], mode: :compat)
|
12
15
|
end
|
@@ -14,6 +17,10 @@ module FaradayMiddleware
|
|
14
17
|
|
15
18
|
private
|
16
19
|
|
20
|
+
def gzip_body?(headers)
|
21
|
+
headers['content-type'] == 'application/gzip'
|
22
|
+
end
|
23
|
+
|
17
24
|
def html_body?(body)
|
18
25
|
/(<!DOCTYPE html>)|(<html>)/ =~ body
|
19
26
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module EntityType
|
4
|
+
PATH = 'EntityTypes'.freeze
|
5
|
+
|
6
|
+
def list_entity_types(options = {})
|
7
|
+
res = get(entity_type_path, options)
|
8
|
+
Response::EntityType.format(res)
|
9
|
+
end
|
10
|
+
|
11
|
+
def find_entity_type(id)
|
12
|
+
res = get(entity_type_path(id))
|
13
|
+
Response::EntityType.format(res)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def entity_type_path(id = nil)
|
19
|
+
id ? "#{PATH}/#{id}" : PATH
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -62,6 +62,7 @@ module RockRMS
|
|
62
62
|
payment_detail_id: nil,
|
63
63
|
active: nil,
|
64
64
|
frequency: nil,
|
65
|
+
number_of_payments: nil,
|
65
66
|
end_date: nil,
|
66
67
|
summary: nil,
|
67
68
|
status: nil,
|
@@ -72,6 +73,7 @@ module RockRMS
|
|
72
73
|
options['TransactionCode'] = transaction_code if transaction_code
|
73
74
|
options['IsActive'] = active if !active.nil?
|
74
75
|
options['TransactionFrequencyValueId'] = RecurringFrequencies::RECURRING_FREQUENCIES[frequency] if !frequency.nil?
|
76
|
+
options['NumberOfPayments'] = number_of_payments if !number_of_payments.nil?
|
75
77
|
options['EndDate'] = end_date if end_date
|
76
78
|
options['Summary'] = summary if summary
|
77
79
|
options['Status'] = status if status
|
@@ -13,6 +13,12 @@ module RockRMS
|
|
13
13
|
Response::Registration.format(res)
|
14
14
|
end
|
15
15
|
|
16
|
+
def update_registration(id, scheduled_transaction_id: nil)
|
17
|
+
options = {}
|
18
|
+
options['PaymentPlanFinancialScheduledTransactionId'] = scheduled_transaction_id if scheduled_transaction_id
|
19
|
+
patch(registration_path(id), options)
|
20
|
+
end
|
21
|
+
|
16
22
|
def delete_registration(id)
|
17
23
|
delete(registration_path(id))
|
18
24
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RockRMS
|
2
|
+
module Response
|
3
|
+
class EntityType < Base
|
4
|
+
MAP = {
|
5
|
+
name: 'Name',
|
6
|
+
friendly_name: 'FriendlyName',
|
7
|
+
is_entity: 'IsEntity',
|
8
|
+
is_secured: 'IsSecured'
|
9
|
+
}.freeze
|
10
|
+
|
11
|
+
def format_single(data)
|
12
|
+
response = to_h(MAP, data)
|
13
|
+
response[:blocks] = Block.format(response[:blocks])
|
14
|
+
response
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/rock_rms/version.rb
CHANGED
data/rock_rms.gemspec
CHANGED
@@ -22,6 +22,8 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'faraday', '> 2.0'
|
24
24
|
s.add_runtime_dependency 'faraday-multipart'
|
25
|
+
s.add_runtime_dependency 'zlib'
|
26
|
+
s.add_runtime_dependency 'stringio'
|
25
27
|
s.add_runtime_dependency 'json'
|
26
28
|
s.add_runtime_dependency 'oj'
|
27
29
|
|
@@ -40,7 +40,7 @@ RSpec.describe RockRMS::Client::ContentChannel, type: :model do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'sends a patch request' do
|
43
|
-
expect(client).to receive(:patch).with('ContentChannels/123', {
|
43
|
+
expect(client).to receive(:patch).with('ContentChannels/123', { 'ForeignKey' => 3925 })
|
44
44
|
client.update_content_channel(id: 123, foreign_key: 3925)
|
45
45
|
end
|
46
46
|
end
|
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.16.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: 2025-
|
11
|
+
date: 2025-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: zlib
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: stringio
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: json
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +228,7 @@ files:
|
|
200
228
|
- lib/rock_rms/resources/content_channel_type.rb
|
201
229
|
- lib/rock_rms/resources/defined_type.rb
|
202
230
|
- lib/rock_rms/resources/defined_value.rb
|
231
|
+
- lib/rock_rms/resources/entity_type.rb
|
203
232
|
- lib/rock_rms/resources/exception_log.rb
|
204
233
|
- lib/rock_rms/resources/fund.rb
|
205
234
|
- lib/rock_rms/resources/gateway.rb
|
@@ -241,6 +270,7 @@ files:
|
|
241
270
|
- lib/rock_rms/response/content_channel_type.rb
|
242
271
|
- lib/rock_rms/response/defined_type.rb
|
243
272
|
- lib/rock_rms/response/defined_value.rb
|
273
|
+
- lib/rock_rms/response/entity_type.rb
|
244
274
|
- lib/rock_rms/response/exception_log.rb
|
245
275
|
- lib/rock_rms/response/fund.rb
|
246
276
|
- lib/rock_rms/response/gateway.rb
|