rock_rms 5.16.0 → 6.0.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: 4d0a0e39eb6d9110441554494776848001292e154c9d8292fc9d9630735320b7
4
- data.tar.gz: f35d764bd6269201cfeb03959483dc0c6394c95fd5f0bb3f2390869d5db731dc
3
+ metadata.gz: 77961a94f240d9f4a1ed89dcc7d2aab06201f9eddc0c93a99d03a752c1360fb1
4
+ data.tar.gz: 6fe1e861679fca33ff4a290ad01830f8e49f388d1384add3da83205bed61b69f
5
5
  SHA512:
6
- metadata.gz: cdbb6ec3dcfcba4d57c9f5dc517fb82d65f3f8e7b7e5d95e8c0d41814b916cc079a1796737c0295ecd26f97fcfdb8adbb839642de5fbf1ff88997cb62701f2d3
7
- data.tar.gz: bbb22c3d624928f5b157bcce8a0e5207b1f36e14b52bc9d1b897dd471cadaa45eba98f4acc57e3af1946e9c826fb938d62161d886a085c43dc8cd4f05a79f8af
6
+ metadata.gz: 1d7ab5b4e247dcd9a157871b203d7aafce5363116f9eca4f76cfd601dfed00e4ec42f3047e8ec4e87b5004497608a0ee4cbc31ec92c6d1007544b3da1d8aa3fb
7
+ data.tar.gz: f4db4f7623c5d75d0c4b49b76a1f165c98965420068f50d90d25c0ba189ebe396408414c847be36750c581613645f3690928bf63b3d6bbd3045c54ca2b2d17e3
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.4
@@ -31,6 +31,7 @@ module RockRMS
31
31
  include RockRMS::Client::RecurringDonationDetail
32
32
  include RockRMS::Client::Refund
33
33
  include RockRMS::Client::RefundReason
34
+ include RockRMS::Client::Registration
34
35
  include RockRMS::Client::SavedPaymentMethod
35
36
  include RockRMS::Client::ServiceJob
36
37
  include RockRMS::Client::Transaction
@@ -1,5 +1,6 @@
1
1
  module RockRMS
2
2
  class Error < StandardError; end
3
+ class BadGateway < Error; end
3
4
  class BadRequest < Error; end
4
5
  class Forbidden < Error; end
5
6
  class GatewayTimeout < Error; end
@@ -26,6 +27,8 @@ module FaradayMiddleware
26
27
  raise RockRMS::NotFound, error_message(env)
27
28
  when 500
28
29
  raise RockRMS::InternalServerError, error_message(env)
30
+ when 502
31
+ raise RockRMS::BadGateway, error_message(env)
29
32
  when 503
30
33
  raise RockRMS::ServiceUnavailable, error_message(env)
31
34
  when 504
@@ -6,6 +6,11 @@ module RockRMS
6
6
  Response::Fund.format(res)
7
7
  end
8
8
 
9
+ def find_fund(id)
10
+ res = get(fund_path(id))
11
+ Response::Fund.format(res)
12
+ end
13
+
9
14
  private
10
15
 
11
16
  def fund_path(id = nil)
@@ -0,0 +1,27 @@
1
+ module RockRMS
2
+ class Client
3
+ module Registration
4
+ PATH = 'Registrations'.freeze
5
+
6
+ def list_registrations(options = {})
7
+ res = get(registration_path, options)
8
+ Response::Registration.format(res)
9
+ end
10
+
11
+ def find_registration(id)
12
+ res = get(registration_path(id))
13
+ Response::Registration.format(res)
14
+ end
15
+
16
+ def delete_registration(id)
17
+ delete(registration_path(id))
18
+ end
19
+
20
+ private
21
+
22
+ def registration_path(id = nil)
23
+ id ? "#{PATH}/#{id}" : PATH
24
+ end
25
+ end
26
+ end
27
+ end
@@ -21,6 +21,7 @@ module RockRMS
21
21
 
22
22
  def to_h(dict, data)
23
23
  return {} if data.nil?
24
+
24
25
  dict.each_with_object({}) do |(l, r), object|
25
26
  object[l] = data[r]
26
27
  end
@@ -4,7 +4,8 @@ module RockRMS
4
4
  MAP = {
5
5
  id: 'Id',
6
6
  campus_id: 'CampusId',
7
- name: 'Name'
7
+ name: 'Name',
8
+ gl_code: 'GlCode'
8
9
  }.freeze
9
10
 
10
11
  def format_single(data)
@@ -0,0 +1,22 @@
1
+ module RockRMS
2
+ module Response
3
+ class Registration < Base
4
+ MAP = {
5
+ id: 'Id',
6
+ first_name: 'FirstName',
7
+ last_name: 'LastName',
8
+ confirmation_email: 'ConfirmationEmail',
9
+ person_alias_id: 'PersonAliasId',
10
+ registration_instance_id: 'RegistrationInstanceId',
11
+ registration_instance: 'RegistrationInstance',
12
+ registrants: 'Registrants'
13
+ }.freeze
14
+
15
+ def format_single(data)
16
+ response = to_h(MAP, data)
17
+ response[:registration_instance] = RegistrationInstance.format(response[:registration_instance])
18
+ response
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+ module RockRMS
2
+ module Response
3
+ class RegistrationInstance < Base
4
+ MAP = {
5
+ id: 'Id',
6
+ name: 'Name',
7
+ start_date: 'StartDateTime',
8
+ end_date: 'EndDateTime',
9
+ fund_id: 'AccountId'
10
+ }.freeze
11
+
12
+ def format_single(data)
13
+ response = to_h(MAP, data)
14
+ response
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '5.16.0'.freeze
2
+ VERSION = '6.0.0'.freeze
3
3
  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: 5.16.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-04 00:00:00.000000000 Z
11
+ date: 2022-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -206,6 +206,7 @@ files:
206
206
  - lib/rock_rms/resources/recurring_donation_detail.rb
207
207
  - lib/rock_rms/resources/refund.rb
208
208
  - lib/rock_rms/resources/refund_reason.rb
209
+ - lib/rock_rms/resources/registration.rb
209
210
  - lib/rock_rms/resources/saved_payment_method.rb
210
211
  - lib/rock_rms/resources/service_job.rb
211
212
  - lib/rock_rms/resources/transaction.rb
@@ -236,6 +237,8 @@ files:
236
237
  - lib/rock_rms/response/phone_number.rb
237
238
  - lib/rock_rms/response/recurring_donation.rb
238
239
  - lib/rock_rms/response/recurring_donation_details.rb
240
+ - lib/rock_rms/response/registration.rb
241
+ - lib/rock_rms/response/registration_instance.rb
239
242
  - lib/rock_rms/response/saved_payment_method.rb
240
243
  - lib/rock_rms/response/service_job.rb
241
244
  - lib/rock_rms/response/transaction.rb
@@ -339,7 +342,7 @@ homepage: https://github.com/taylorbrooks/rock_rms
339
342
  licenses:
340
343
  - MIT
341
344
  metadata: {}
342
- post_install_message:
345
+ post_install_message:
343
346
  rdoc_options: []
344
347
  require_paths:
345
348
  - lib
@@ -354,8 +357,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
354
357
  - !ruby/object:Gem::Version
355
358
  version: '0'
356
359
  requirements: []
357
- rubygems_version: 3.1.4
358
- signing_key:
360
+ rubygems_version: 3.1.6
361
+ signing_key:
359
362
  specification_version: 4
360
363
  summary: A Ruby wrapper for the Rock RMS API
361
364
  test_files: []