rock_rms 5.10.0 → 5.14.0

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
2
  SHA256:
3
- metadata.gz: f705adcfa522406e73d9b58360dfd1281d482baee3b0c62ff0d583cd58aadc83
4
- data.tar.gz: a80754f004ef87d2ea78c0e8868e0cccb94b2aa62c72403e164def5e59066a91
3
+ metadata.gz: 6d6e5cdc46e8c8afcfc54b75b7e4ecf8e057e7c933975eb849dd6cf815a4fedf
4
+ data.tar.gz: 24bf2e6efd6cc45fe66c0da6ae219012f7220a7237aab44a1175ff35b4d8f119
5
5
  SHA512:
6
- metadata.gz: 53d8575a6fe4704f7e5421414f22c0290550012c5bc8f654ef19b49cf99b1c5c92b7e47b017d37f3f43a07f3f422f42c44414790db586bccdea4147378aa1243
7
- data.tar.gz: 7558483decd2edd69d23aaba0a2aa300131406dfa7232993c3d6b075a51c2bb78f343d0287f03b7a21ccc2ea934b204a41eb13c54a99112b46679a7f4ad7ad35
6
+ metadata.gz: c96edbd507f6513d133a638d454402db9ae33b3b7e4871e3a48d6c165f176b232fba6f7e3302a26b433813fa3dc7101a286132a0781d8e145076875a378f5799
7
+ data.tar.gz: 938b7c5549980dd11a7837cece05973a61eaca2bf9ed8b1788d40d45141d6d6e8dfefdeacd7884c51f2a8d7449562cdea110896de2d4ea7eafe867201337a15c
@@ -41,14 +41,15 @@ module RockRMS
41
41
  include RockRMS::Client::WorkflowActivityType
42
42
  include RockRMS::Client::WorkflowType
43
43
 
44
- attr_reader :url, :username, :password, :logger, :cookie, :connection, :adapter
44
+ attr_reader :url, :username, :password, :logger, :cookie, :connection, :adapter, :ssl
45
45
 
46
- def initialize(url:, username:, password:, logger: true, adapter: Faraday.default_adapter)
46
+ def initialize(url:, username:, password:, logger: true, adapter: Faraday.default_adapter, ssl: nil)
47
47
  @url = "#{url}/api/"
48
48
  @username = username
49
49
  @password = password
50
50
  @logger = logger
51
51
  @adapter = adapter
52
+ @ssl = ssl
52
53
  @cookie = auth['set-cookie']
53
54
  end
54
55
 
@@ -103,7 +104,14 @@ module RockRMS
103
104
 
104
105
  headers['Cookie'] = cookie if cookie
105
106
 
106
- Faraday.new(url: url, headers: headers) do |conn|
107
+ client_opts = {
108
+ url: url,
109
+ headers: headers
110
+ }
111
+
112
+ client_opts[:ssl] = ssl if ssl
113
+
114
+ Faraday.new(client_opts) do |conn|
107
115
  conn.request :json
108
116
  conn.response :logger if logger
109
117
  conn.response :oj
@@ -48,12 +48,14 @@ module RockRMS
48
48
  next_payment_date:,
49
49
  transaction_code: nil,
50
50
  payment_detail_id: nil,
51
- active: nil
51
+ active: nil,
52
+ frequency: nil
52
53
  )
53
54
  options = { 'NextPaymentDate' => next_payment_date }
54
55
  options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
55
56
  options['TransactionCode'] = transaction_code if transaction_code
56
57
  options['IsActive'] = active if !active.nil?
58
+ options['TransactionFrequencyValueId'] = RecurringFrequencies::RECURRING_FREQUENCIES[frequency] if !frequency.nil?
57
59
 
58
60
  patch(recurring_donation_path(id), options)
59
61
  end
@@ -45,7 +45,9 @@ module RockRMS
45
45
  apportion_refund_amount_over_accounts(details, transaction_amount, refund_amount).map do |dt|
46
46
  {
47
47
  'Amount' => -dt[:amount],
48
- 'AccountId' => dt[:fund_id]
48
+ 'AccountId' => dt[:fund_id],
49
+ 'EntityTypeId' => dt[:entity_type_id],
50
+ 'EntityId' => dt[:entity_id]
49
51
  }
50
52
  end
51
53
  end
@@ -14,6 +14,7 @@ module RockRMS
14
14
  start_date: 'StartDate',
15
15
  transaction_details: 'ScheduledTransactionDetails',
16
16
  transaction_code: 'TransactionCode',
17
+ transaction_type_id: 'TransactionTypeValueId',
17
18
  summary: 'Summary'
18
19
  }.freeze
19
20
 
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '5.10.0'.freeze
2
+ VERSION = '5.14.0'.freeze
3
3
  end
@@ -54,7 +54,20 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
54
54
  'FinancialGatewayId' => nil,
55
55
  'FinancialPaymentDetailId' => 156,
56
56
  'TransactionDateTime' => '2018-02-01',
57
- 'TransactionDetails' => [{"Amount"=>-10.0, "AccountId"=>23}, {"Amount"=>-90.0, "AccountId"=>24}],
57
+ 'TransactionDetails' => [
58
+ {
59
+ "Amount"=>-10.0,
60
+ "AccountId"=>23,
61
+ "EntityTypeId" => nil,
62
+ "EntityId" => nil
63
+ },
64
+ {
65
+ "Amount"=> -90.0,
66
+ "AccountId"=>24,
67
+ "EntityTypeId" => nil,
68
+ "EntityId" => nil
69
+ }
70
+ ],
58
71
  'TransactionTypeValueId' => 53,
59
72
  'TransactionCode' => nil
60
73
  }
@@ -93,7 +106,20 @@ RSpec.describe RockRMS::Client::Refund, type: :model do
93
106
  'FinancialGatewayId' => nil,
94
107
  'FinancialPaymentDetailId' => 156,
95
108
  'TransactionDateTime' => '2018-02-01',
96
- 'TransactionDetails' => [{"Amount"=>-7.56, "AccountId"=>23}, {"Amount"=>-67.99, "AccountId"=>24}],
109
+ 'TransactionDetails' => [
110
+ {
111
+ "Amount"=>-7.56,
112
+ "AccountId"=>23,
113
+ "EntityTypeId" => nil,
114
+ "EntityId" => nil
115
+ },
116
+ {
117
+ "Amount"=>-67.99,
118
+ "AccountId"=>24,
119
+ "EntityTypeId" => nil,
120
+ "EntityId" => nil
121
+ }
122
+ ],
97
123
  'TransactionTypeValueId' => 53,
98
124
  'TransactionCode' => nil
99
125
  }
@@ -27,6 +27,7 @@ RSpec.describe RockRMS::Response::RecurringDonation, type: :model do
27
27
  start_date
28
28
  transaction_details
29
29
  transaction_code
30
+ transaction_type_id
30
31
  summary
31
32
  ]
32
33
 
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.10.0
4
+ version: 5.14.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: 2021-04-27 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -339,7 +339,7 @@ homepage: https://github.com/taylorbrooks/rock_rms
339
339
  licenses:
340
340
  - MIT
341
341
  metadata: {}
342
- post_install_message:
342
+ post_install_message:
343
343
  rdoc_options: []
344
344
  require_paths:
345
345
  - lib
@@ -355,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
355
355
  version: '0'
356
356
  requirements: []
357
357
  rubygems_version: 3.1.4
358
- signing_key:
358
+ signing_key:
359
359
  specification_version: 4
360
360
  summary: A Ruby wrapper for the Rock RMS API
361
361
  test_files: []