rock_rms 8.1.0 → 8.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_rms/client.rb +2 -0
- data/lib/rock_rms/resources/system_communication.rb +18 -0
- data/lib/rock_rms/resources/system_email.rb +18 -0
- data/lib/rock_rms/response/base.rb +1 -0
- data/lib/rock_rms/response/system_communication.rb +17 -0
- data/lib/rock_rms/response/system_email.rb +17 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/response/attribute_value_spec.rb +2 -1
- data/spec/rock_rms/response/defined_value_spec.rb +2 -1
- data/spec/rock_rms/response/recurring_donation_spec.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bdb02d5b368497d5daf3e93739ad54829e51a119019479fb0613bd17bfc2ace
|
4
|
+
data.tar.gz: b8b78b12624755e1c2fb25555dd981935f15b7838330e239b98dde822d8130fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87fb269749e58b6dd94846b58ea026bf848d91bbddeb58c967039085745cd3d6e0976f57f236c44536ea91b2093aaa2c5b4dbdcf28cf783088362aa1f3cc028
|
7
|
+
data.tar.gz: ca462b00b2d2888d029a6114274a027e99bc1a6638cb614002231ba7d55e6e9a4c6315c0d2d528bf742d3982fc4238f0e06a5b2d94e10293d9399ce677a568f7
|
data/lib/rock_rms/client.rb
CHANGED
@@ -35,6 +35,8 @@ module RockRMS
|
|
35
35
|
include RockRMS::Client::Registration
|
36
36
|
include RockRMS::Client::SavedPaymentMethod
|
37
37
|
include RockRMS::Client::ServiceJob
|
38
|
+
include RockRMS::Client::SystemCommunication
|
39
|
+
include RockRMS::Client::SystemEmail
|
38
40
|
include RockRMS::Client::Transaction
|
39
41
|
include RockRMS::Client::TransactionDetail
|
40
42
|
include RockRMS::Client::TransactionImage
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module SystemCommunication
|
4
|
+
def list_system_communications(options = {})
|
5
|
+
res = get('SystemCommunications', options)
|
6
|
+
Response::SystemCommunication.format(res)
|
7
|
+
end
|
8
|
+
|
9
|
+
def update_system_communcation(id, body:)
|
10
|
+
options = {
|
11
|
+
'Body' => body
|
12
|
+
}
|
13
|
+
|
14
|
+
patch("SystemCommunications/#{id}", options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module SystemEmail
|
4
|
+
def list_system_emails(options = {})
|
5
|
+
res = get('SystemEmails', options)
|
6
|
+
Response::SystemEmail.format(res)
|
7
|
+
end
|
8
|
+
|
9
|
+
def update_system_email(id, body:)
|
10
|
+
options = {
|
11
|
+
'Body' => body
|
12
|
+
}
|
13
|
+
|
14
|
+
patch("SystemEmails/#{id}", options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RockRMS
|
2
|
+
module Response
|
3
|
+
class SystemCommunication < Base
|
4
|
+
MAP = {
|
5
|
+
title: 'Title',
|
6
|
+
from: 'From',
|
7
|
+
subject: 'Subject',
|
8
|
+
body: 'Body',
|
9
|
+
foreign_key: 'ForeignKey'
|
10
|
+
}.freeze
|
11
|
+
|
12
|
+
def format_single(data)
|
13
|
+
to_h(MAP, data)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module RockRMS
|
2
|
+
module Response
|
3
|
+
class SystemEmail < Base
|
4
|
+
MAP = {
|
5
|
+
title: 'Title',
|
6
|
+
from: 'From',
|
7
|
+
subject: 'Subject',
|
8
|
+
body: 'Body',
|
9
|
+
foreign_key: 'ForeignKey'
|
10
|
+
}.freeze
|
11
|
+
|
12
|
+
def format_single(data)
|
13
|
+
to_h(MAP, data)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/rock_rms/version.rb
CHANGED
@@ -14,12 +14,13 @@ RSpec.describe RockRMS::Response::AttributeValue, type: :model do
|
|
14
14
|
|
15
15
|
it 'has the correct number keys' do
|
16
16
|
keys = result.first.keys
|
17
|
-
expect(keys.count).to eq(
|
17
|
+
expect(keys.count).to eq(10)
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'translates keys' do
|
21
21
|
result.zip(parsed) do |r, p|
|
22
22
|
expect(r[:id]).to eq(p['Id'])
|
23
|
+
expect(r[:guid]).to eq(p['Guid'])
|
23
24
|
expect(r[:value]).to eq(p['Value'])
|
24
25
|
expect(r[:value_as_number]).to eq(p['ValueAsNumeric'])
|
25
26
|
expect(r[:entity_id]).to eq(p['EntityId'])
|
@@ -14,13 +14,14 @@ RSpec.describe RockRMS::Response::DefinedValue, type: :model do
|
|
14
14
|
|
15
15
|
it 'has the correct number keys' do
|
16
16
|
keys = result.first.keys
|
17
|
-
expect(keys.count).to eq(
|
17
|
+
expect(keys.count).to eq(10)
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'translates keys' do
|
21
21
|
result.zip(parsed) do |r, p|
|
22
22
|
expect(r[:id]).to eq(p['Id'])
|
23
23
|
expect(r[:value]).to eq(p['Value'])
|
24
|
+
expect(r[:guid]).to eq(p['Guid'])
|
24
25
|
expect(r[:description]).to eq(p['Description'])
|
25
26
|
end
|
26
27
|
end
|
@@ -30,6 +30,7 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do
|
|
30
30
|
transaction_type_id
|
31
31
|
summary
|
32
32
|
id
|
33
|
+
guid
|
33
34
|
created_date_time
|
34
35
|
modified_date_time
|
35
36
|
attributes
|
@@ -42,6 +43,7 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do
|
|
42
43
|
it 'translates keys' do
|
43
44
|
result.zip(parsed) do |r, p|
|
44
45
|
expect(r[:id]).to eq(p['Id'])
|
46
|
+
expect(r[:guid]).to eq(p['Guid'])
|
45
47
|
expect(r[:active]).to eq(p['IsActive'])
|
46
48
|
expect(r[:financial_gateway_id]).to eq(p['FinancialGatewayId'])
|
47
49
|
expect(r[:gateway_schedule_id]).to eq(p['GatewayScheduleId'])
|
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.1
|
4
|
+
version: 8.2.1
|
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-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -226,6 +226,8 @@ files:
|
|
226
226
|
- lib/rock_rms/resources/registration.rb
|
227
227
|
- lib/rock_rms/resources/saved_payment_method.rb
|
228
228
|
- lib/rock_rms/resources/service_job.rb
|
229
|
+
- lib/rock_rms/resources/system_communication.rb
|
230
|
+
- lib/rock_rms/resources/system_email.rb
|
229
231
|
- lib/rock_rms/resources/transaction.rb
|
230
232
|
- lib/rock_rms/resources/transaction_detail.rb
|
231
233
|
- lib/rock_rms/resources/transaction_image.rb
|
@@ -259,6 +261,8 @@ files:
|
|
259
261
|
- lib/rock_rms/response/registration_instance.rb
|
260
262
|
- lib/rock_rms/response/saved_payment_method.rb
|
261
263
|
- lib/rock_rms/response/service_job.rb
|
264
|
+
- lib/rock_rms/response/system_communication.rb
|
265
|
+
- lib/rock_rms/response/system_email.rb
|
262
266
|
- lib/rock_rms/response/transaction.rb
|
263
267
|
- lib/rock_rms/response/transaction_detail.rb
|
264
268
|
- lib/rock_rms/response/user_login.rb
|