rock_rms 8.1.0 → 8.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b37d876903acf93e85ff71d01d81c5406688ac45cf6a5c1e55899a770e031ba
4
- data.tar.gz: a8c37e2ddc4f286036e9aeb488c5ff75973dc6cc2c32bd9a65ba1b9f8a47f0b4
3
+ metadata.gz: fac69e30ee6b72be431d98c6dc6df88aafbc9f27a8332c343922a3d7c4431f2c
4
+ data.tar.gz: 18f3cf68e4d5d2be88ced7ed03bc2478202ffc2c590f35c5637b1c266aba6a8a
5
5
  SHA512:
6
- metadata.gz: 2b7bea6c80b69ae6c1581429657da83adef0409bd303224fa73d82c79d5112b9d34976a6e375554301d2ff9d83ead37f7348ba33a406914836cf03db287152f3
7
- data.tar.gz: 4f5f8de485cf3bd4506870d6831352d2f315421f2492ec51a64926256e74f8865104ac035a8948c2c6843a44daaf4bb9f2ac919017d9de4f20f1b68cd5c18e0f
6
+ metadata.gz: 0d42efd1a6b63eb9159cdeecbafb5b8d0ca71321e9e2ae64112bd8ac98ca8de88d941417f55b2618f87d9366532feb74d030a905070abbf182e8eb0c329f9ccb
7
+ data.tar.gz: '01842b0d841ef8726aae867f18a86d9a6105d037c564e7fc60fa8d7a605bea3c679a99229cd545845e3ea98ad30be7ce718f92f48d64415ac2b2298d16d595c7'
@@ -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
@@ -5,6 +5,7 @@ module RockRMS
5
5
 
6
6
  BASE_MAPPING = {
7
7
  id: 'Id',
8
+ guid: 'Guid',
8
9
  created_date_time: 'CreatedDateTime',
9
10
  modified_date_time: 'ModifiedDateTime',
10
11
  attributes: 'Attributes',
@@ -0,0 +1,16 @@
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
+ }.freeze
10
+
11
+ def format_single(data)
12
+ to_h(MAP, data)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
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
+ }.freeze
10
+
11
+ def format_single(data)
12
+ to_h(MAP, data)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '8.1.0'.freeze
2
+ VERSION = '8.2.0'.freeze
3
3
  end
@@ -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(9)
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(9)
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.0
4
+ version: 8.2.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: 2023-01-14 00:00:00.000000000 Z
11
+ date: 2023-02-10 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