rock_rms 5.3.0 → 5.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 51e6aa9b250e280fa54b35cb1f50d6f83f026f2b
4
- data.tar.gz: 96c37781f972993358e889ad59503df9fb42a80c
2
+ SHA256:
3
+ metadata.gz: '0285c478d37f3866307aa15c573a900a76c1ba1e502767b0adf4ad8a772bacf0'
4
+ data.tar.gz: c93c50ffa1405ed6120ff4c316f1426ec6a37ee53fc26048365d0a1ab021d295
5
5
  SHA512:
6
- metadata.gz: 027cd76d8170b90a0be40e3f95a5decebc3d080d1c867f59c4c4fdad2e7b4dc2971774487ebeb9d13a1f3920195097d1f56b51965036485e5ca41dd74004a9db
7
- data.tar.gz: fa9d2ba0f8c3ba25294b73ed037556b3bdb7e41513987e147e75b58648f52fef96d2b4f771240e61c076e12284b78095c7e89dd6d84133a7e21f6f12ace79cac
6
+ metadata.gz: 94abb5223e5ff1a6da0c7ac2b2612e426416594b8346defae8dfb2f7ee072c17aa1caad97a4e768eedc80fa96a0db8a4bba2fb8c54d3f942e502875c1e9cb33e
7
+ data.tar.gz: cf8b5521d733ce280698bd3f60288f1a3d7af575c2ca36c1c1f195f5ab86f8d212e427bd2d3a450a4ddaa74e8ce386d790e988403dd178fe1d1591370751ee9c
@@ -1 +1 @@
1
- 2.3.6
1
+ 2.7.2
@@ -22,6 +22,7 @@ module RockRMS
22
22
  include RockRMS::Client::Gateway
23
23
  include RockRMS::Client::Group
24
24
  include RockRMS::Client::GroupMember
25
+ include RockRMS::Client::History
25
26
  include RockRMS::Client::Page
26
27
  include RockRMS::Client::PaymentDetail
27
28
  include RockRMS::Client::Person
@@ -31,6 +32,7 @@ module RockRMS
31
32
  include RockRMS::Client::Refund
32
33
  include RockRMS::Client::RefundReason
33
34
  include RockRMS::Client::SavedPaymentMethod
35
+ include RockRMS::Client::ServiceJob
34
36
  include RockRMS::Client::Transaction
35
37
  include RockRMS::Client::TransactionDetail
36
38
  include RockRMS::Client::UserLogin
@@ -0,0 +1,10 @@
1
+ module RockRMS
2
+ class Client
3
+ module History
4
+ def list_history(options = {})
5
+ res = get('Histories', options)
6
+ Response::History.format(res)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -58,6 +58,16 @@ module RockRMS
58
58
  patch(recurring_donation_path(id), options)
59
59
  end
60
60
 
61
+ def launch_scheduled_transaction_workflow(
62
+ id,
63
+ workflow_type_id:,
64
+ workflow_name:,
65
+ attributes: {}
66
+ )
67
+ query_string = "?workflowTypeId=#{workflow_type_id}&workflowName=#{workflow_name}"
68
+ post(recurring_donation_path + "/LaunchWorkflow/#{id}#{query_string}", attributes)
69
+ end
70
+
61
71
  private
62
72
 
63
73
  def translate_funds(funds)
@@ -9,7 +9,8 @@ module RockRMS
9
9
  reason_id:,
10
10
  transaction_id:,
11
11
  transaction_code: nil,
12
- amount: nil
12
+ amount: nil,
13
+ gateway_id: nil
13
14
  )
14
15
 
15
16
  old_transaction = list_transactions(
@@ -27,6 +28,7 @@ module RockRMS
27
28
  'FinancialTransaction' => {
28
29
  'AuthorizedPersonAliasId' => old_transaction[:person_id],
29
30
  'BatchId' => batch_id,
31
+ 'FinancialGatewayId' => gateway_id,
30
32
  'FinancialPaymentDetailId' => old_transaction[:payment_detail_id],
31
33
  'TransactionCode' => transaction_code,
32
34
  'TransactionDateTime' => date,
@@ -0,0 +1,18 @@
1
+ module RockRMS
2
+ class Client
3
+ module ServiceJob
4
+ def list_service_jobs(options = {})
5
+ res = get('ServiceJobs', options)
6
+ Response::ServiceJob.format(res)
7
+ end
8
+
9
+ def update_service_job(id, cron: nil)
10
+ options = {
11
+ 'CronExpression': cron
12
+ }
13
+
14
+ patch("ServiceJobs/#{id}", options)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -11,9 +11,10 @@ module RockRMS
11
11
  Response::TransactionDetail.format(res)
12
12
  end
13
13
 
14
- def update_transaction_detail(id, fund_id: nil, fee_amount: nil)
14
+ def update_transaction_detail(id, fund_id: nil, amount: nil, fee_amount: nil)
15
15
  options = {}
16
16
  options['AccountId'] = fund_id if fund_id
17
+ options['Amount'] = amount if amount
17
18
  options['FeeAmount'] = fee_amount if fee_amount
18
19
 
19
20
  patch(transaction_detail_path(id), options)
@@ -10,7 +10,8 @@ module RockRMS
10
10
  end_date: 'BatchEndDateTime',
11
11
  campus_id: 'CampusId',
12
12
  is_campus: 'Campus',
13
- status: 'Status'
13
+ status: 'Status',
14
+ foreign_key: 'ForeignKey'
14
15
  }.freeze
15
16
 
16
17
  def format_single(data)
@@ -0,0 +1,19 @@
1
+ module RockRMS
2
+ module Response
3
+ class History < Base
4
+ MAP = {
5
+ id: 'Id',
6
+ verb: 'Verb',
7
+ change_type: 'ChangeType',
8
+ value_name: 'ValueName',
9
+ old_value: 'OldValue',
10
+ new_value: 'NewValue',
11
+ alias_id: 'CreatedByPersonAliasId'
12
+ }.freeze
13
+
14
+ def format_single(data)
15
+ to_h(MAP, data)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ module RockRMS
2
+ module Response
3
+ class ServiceJob < Base
4
+ MAP = {
5
+ id: 'Id',
6
+ name: 'Name',
7
+ active: 'IsActive',
8
+ description: 'Description',
9
+ cron: 'CronExpression'
10
+ }.freeze
11
+
12
+ def format_single(data)
13
+ to_h(MAP, data)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '5.3.0'.freeze
2
+ VERSION = '5.7.1'.freeze
3
3
  end
@@ -51,6 +51,7 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
51
51
  'FinancialTransaction' => {
52
52
  'AuthorizedPersonAliasId' => 120,
53
53
  'BatchId' => 1,
54
+ 'FinancialGatewayId' => nil,
54
55
  'FinancialPaymentDetailId' => 156,
55
56
  'TransactionDateTime' => '2018-02-01',
56
57
  'TransactionDetails' => [{"Amount"=>-10.0, "AccountId"=>23}, {"Amount"=>-90.0, "AccountId"=>24}],
@@ -89,6 +90,7 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
89
90
  'FinancialTransaction' => {
90
91
  'AuthorizedPersonAliasId' => 120,
91
92
  'BatchId' => 1,
93
+ 'FinancialGatewayId' => nil,
92
94
  'FinancialPaymentDetailId' => 156,
93
95
  'TransactionDateTime' => '2018-02-01',
94
96
  'TransactionDetails' => [{"Amount"=>-7.56, "AccountId"=>23}, {"Amount"=>-67.99, "AccountId"=>24}],
@@ -99,9 +101,6 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
99
101
  .and_call_original
100
102
  resource
101
103
  end
102
-
103
104
  end
104
-
105
105
  end
106
-
107
106
  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.3.0
4
+ version: 5.7.1
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: 2020-07-20 00:00:00.000000000 Z
11
+ date: 2020-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -197,6 +197,7 @@ files:
197
197
  - lib/rock_rms/resources/gateway.rb
198
198
  - lib/rock_rms/resources/group.rb
199
199
  - lib/rock_rms/resources/group_member.rb
200
+ - lib/rock_rms/resources/history.rb
200
201
  - lib/rock_rms/resources/page.rb
201
202
  - lib/rock_rms/resources/payment_detail.rb
202
203
  - lib/rock_rms/resources/person.rb
@@ -206,6 +207,7 @@ files:
206
207
  - lib/rock_rms/resources/refund.rb
207
208
  - lib/rock_rms/resources/refund_reason.rb
208
209
  - lib/rock_rms/resources/saved_payment_method.rb
210
+ - lib/rock_rms/resources/service_job.rb
209
211
  - lib/rock_rms/resources/transaction.rb
210
212
  - lib/rock_rms/resources/transaction_detail.rb
211
213
  - lib/rock_rms/resources/user_login.rb
@@ -226,6 +228,7 @@ files:
226
228
  - lib/rock_rms/response/gateway.rb
227
229
  - lib/rock_rms/response/group.rb
228
230
  - lib/rock_rms/response/group_location.rb
231
+ - lib/rock_rms/response/history.rb
229
232
  - lib/rock_rms/response/location.rb
230
233
  - lib/rock_rms/response/page.rb
231
234
  - lib/rock_rms/response/payment_detail.rb
@@ -234,6 +237,7 @@ files:
234
237
  - lib/rock_rms/response/recurring_donation.rb
235
238
  - lib/rock_rms/response/recurring_donation_details.rb
236
239
  - lib/rock_rms/response/saved_payment_method.rb
240
+ - lib/rock_rms/response/service_job.rb
237
241
  - lib/rock_rms/response/transaction.rb
238
242
  - lib/rock_rms/response/transaction_detail.rb
239
243
  - lib/rock_rms/response/user_login.rb
@@ -334,7 +338,7 @@ homepage: https://github.com/taylorbrooks/rock_rms
334
338
  licenses:
335
339
  - MIT
336
340
  metadata: {}
337
- post_install_message:
341
+ post_install_message:
338
342
  rdoc_options: []
339
343
  require_paths:
340
344
  - lib
@@ -349,9 +353,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
353
  - !ruby/object:Gem::Version
350
354
  version: '0'
351
355
  requirements: []
352
- rubyforge_project:
353
- rubygems_version: 2.5.2.2
354
- signing_key:
356
+ rubygems_version: 3.1.4
357
+ signing_key:
355
358
  specification_version: 4
356
359
  summary: A Ruby wrapper for the Rock RMS API
357
360
  test_files: []