rock_rms 5.14.0 → 5.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/rock_rms/client.rb +1 -0
- data/lib/rock_rms/resources/fund.rb +5 -0
- data/lib/rock_rms/resources/person.rb +7 -2
- data/lib/rock_rms/resources/recurring_donation.rb +7 -1
- data/lib/rock_rms/resources/registration.rb +27 -0
- data/lib/rock_rms/response/base.rb +1 -0
- data/lib/rock_rms/response/fund.rb +2 -1
- data/lib/rock_rms/response/recurring_donation.rb +1 -0
- data/lib/rock_rms/response/registration.rb +22 -0
- data/lib/rock_rms/response/registration_instance.rb +18 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/response/recurring_donation_spec.rb +1 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d38cb217370fdd9d6a717b2e1e9beaccfaf19984f87292caed41c5e3d6ddb6b
|
4
|
+
data.tar.gz: deedae759828e2ec7f31a759773ee75310eb415ae3df5cb78592be7d39c9c53d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c422bf568147f352726190aa9471869a1e6246d8742b5ad94a90e222bde9e9624a31700f395fdffb16198131ef44638119f3474932ef62e4904c8c23a6adc90e
|
7
|
+
data.tar.gz: 15106868e69595ecf30e705172a75ae65d16dfcfca1c7ed8b85d23952515e8e2163a20321718cc8689f2858ac901156afef2f27cb969980b49c12d1cb52dc61a
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.4
|
data/lib/rock_rms/client.rb
CHANGED
@@ -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
|
@@ -35,7 +35,7 @@ module RockRMS
|
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
-
def create_person(first_name:, last_name:, email:, connection_status_value_id: nil, record_status_value_id: nil)
|
38
|
+
def create_person(first_name:, last_name:, email:, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
|
39
39
|
options = {
|
40
40
|
'IsSystem' => false,
|
41
41
|
'FirstName' => first_name,
|
@@ -43,8 +43,13 @@ module RockRMS
|
|
43
43
|
'Email' => email,
|
44
44
|
'Gender' => 1,
|
45
45
|
'ConnectionStatusValueId' => connection_status_value_id,
|
46
|
-
'RecordStatusValueId' => record_status_value_id
|
46
|
+
'RecordStatusValueId' => record_status_value_id,
|
47
|
+
'RecordTypeValueId' => record_type_value_id,
|
47
48
|
}
|
49
|
+
|
50
|
+
# RecordTypeValueId 1 = Person
|
51
|
+
# RecordTypeValueId 2 = Business
|
52
|
+
|
48
53
|
post(people_path, options)
|
49
54
|
end
|
50
55
|
|
@@ -17,6 +17,7 @@ module RockRMS
|
|
17
17
|
foreign_key: nil,
|
18
18
|
frequency:,
|
19
19
|
funds:,
|
20
|
+
end_date: nil,
|
20
21
|
gateway_id: nil,
|
21
22
|
gateway_schedule_id: nil,
|
22
23
|
next_payment_date:,
|
@@ -40,6 +41,9 @@ module RockRMS
|
|
40
41
|
'SourceTypeValueId' => source_type_id,
|
41
42
|
'ForeignKey' => foreign_key
|
42
43
|
}
|
44
|
+
|
45
|
+
options['EndDate'] = end_date if end_date
|
46
|
+
|
43
47
|
post(recurring_donation_path, options)
|
44
48
|
end
|
45
49
|
|
@@ -49,13 +53,15 @@ module RockRMS
|
|
49
53
|
transaction_code: nil,
|
50
54
|
payment_detail_id: nil,
|
51
55
|
active: nil,
|
52
|
-
frequency: nil
|
56
|
+
frequency: nil,
|
57
|
+
end_date: nil
|
53
58
|
)
|
54
59
|
options = { 'NextPaymentDate' => next_payment_date }
|
55
60
|
options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
|
56
61
|
options['TransactionCode'] = transaction_code if transaction_code
|
57
62
|
options['IsActive'] = active if !active.nil?
|
58
63
|
options['TransactionFrequencyValueId'] = RecurringFrequencies::RECURRING_FREQUENCIES[frequency] if !frequency.nil?
|
64
|
+
options['EndDate'] = end_date if end_date
|
59
65
|
|
60
66
|
patch(recurring_donation_path(id), options)
|
61
67
|
end
|
@@ -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
|
@@ -7,6 +7,7 @@ module RockRMS
|
|
7
7
|
financial_gateway_id: 'FinancialGatewayId',
|
8
8
|
foreign_key: 'ForeignKey',
|
9
9
|
frequency: 'TransactionFrequencyValueId',
|
10
|
+
end_date: 'EndDate',
|
10
11
|
gateway_schedule_id: 'GatewayScheduleId',
|
11
12
|
next_payment_date: 'NextPaymentDate',
|
12
13
|
payment_details: 'FinancialPaymentDetail',
|
@@ -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
|
data/lib/rock_rms/version.rb
CHANGED
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.
|
4
|
+
version: 5.18.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: 2022-01-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
|
@@ -354,7 +357,7 @@ 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.
|
360
|
+
rubygems_version: 3.1.6
|
358
361
|
signing_key:
|
359
362
|
specification_version: 4
|
360
363
|
summary: A Ruby wrapper for the Rock RMS API
|