rock_rms 8.7.0 → 8.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_rms/resources/recurring_donation.rb +8 -4
- data/lib/rock_rms/response/attribute_value.rb +5 -2
- data/lib/rock_rms/response/transaction.rb +1 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/client_spec.rb +1 -1
- data/spec/rock_rms/resources/recurring_donation_spec.rb +2 -1
- data/spec/rock_rms/response/attribute_value_spec.rb +13 -1
- data/spec/support/fixtures/attribute_values.json +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b88623e84f56232b51a5c3554e01a45e12d681ce751ae613746c1afcb439e1f4
|
4
|
+
data.tar.gz: 79d21480246debf6089213ad6918b69b5436158c5ac105f220f8e701d132e64f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e382ccd0c2015ff41173be3a106c457350adf54a5389f4f9341cb959f021f4489575579901f96286d2873e72ae1c6d897f07e8350e6b1b5b5f84d50a9af3bed
|
7
|
+
data.tar.gz: '08b38b7fd15dbb0caae012c59ecd75f64f707a694f809634e192c7c3810e351c5592e76be855c4abd43b30f76bfa743a09d211f4199f7d2e0fed3eaba328c29c'
|
@@ -24,7 +24,8 @@ module RockRMS
|
|
24
24
|
payment_detail_id: nil,
|
25
25
|
source_type_id: 10,
|
26
26
|
transaction_code: nil,
|
27
|
-
start_date
|
27
|
+
start_date:,
|
28
|
+
summary: nil
|
28
29
|
)
|
29
30
|
|
30
31
|
options = {
|
@@ -39,7 +40,8 @@ module RockRMS
|
|
39
40
|
'ScheduledTransactionDetails' => translate_funds(funds),
|
40
41
|
'GatewayScheduleId' => gateway_schedule_id,
|
41
42
|
'SourceTypeValueId' => source_type_id,
|
42
|
-
'ForeignKey' => foreign_key
|
43
|
+
'ForeignKey' => foreign_key,
|
44
|
+
'Summary' => summary
|
43
45
|
}
|
44
46
|
|
45
47
|
options['EndDate'] = end_date if end_date
|
@@ -54,14 +56,16 @@ module RockRMS
|
|
54
56
|
payment_detail_id: nil,
|
55
57
|
active: nil,
|
56
58
|
frequency: nil,
|
57
|
-
end_date: nil
|
59
|
+
end_date: nil,
|
60
|
+
summary: nil
|
58
61
|
)
|
59
62
|
options = { 'NextPaymentDate' => next_payment_date }
|
60
63
|
options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
|
61
64
|
options['TransactionCode'] = transaction_code if transaction_code
|
62
65
|
options['IsActive'] = active if !active.nil?
|
63
66
|
options['TransactionFrequencyValueId'] = RecurringFrequencies::RECURRING_FREQUENCIES[frequency] if !frequency.nil?
|
64
|
-
options['EndDate']
|
67
|
+
options['EndDate'] = end_date if end_date
|
68
|
+
options['Summary'] = summary if summary
|
65
69
|
|
66
70
|
patch(recurring_donation_path(id), options)
|
67
71
|
end
|
@@ -5,11 +5,14 @@ module RockRMS
|
|
5
5
|
value: 'Value',
|
6
6
|
value_as_number: 'ValueAsNumeric',
|
7
7
|
value_formatted: 'ValueFormatted',
|
8
|
-
entity_id: 'EntityId'
|
8
|
+
entity_id: 'EntityId',
|
9
|
+
attribute: 'Attribute'
|
9
10
|
}.freeze
|
10
11
|
|
11
12
|
def format_single(data)
|
12
|
-
to_h(MAP, data)
|
13
|
+
response = to_h(MAP, data)
|
14
|
+
response[:attribute] = Attribute.format(response[:attribute])
|
15
|
+
response
|
13
16
|
end
|
14
17
|
end
|
15
18
|
end
|
data/lib/rock_rms/version.rb
CHANGED
@@ -28,7 +28,7 @@ RSpec.describe RockRMS::Client do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'requries either `username` and `password` params or `authorization_token` param' do
|
31
|
-
expect { described_class.new(attrs_without_authentication) }
|
31
|
+
expect { described_class.new(**attrs_without_authentication) }
|
32
32
|
.to raise_error(ArgumentError, /username and password or authorization_token/)
|
33
33
|
end
|
34
34
|
|
@@ -145,7 +145,8 @@ RSpec.describe RockRMS::Client::RecurringDonation, type: :model do
|
|
145
145
|
'ScheduledTransactionDetails' => [{ 'Amount' => 450, 'AccountId' => 2, 'EntityId' => nil, 'EntityTypeId' => nil, 'FeeAmount' => nil, 'FeeCoverageAmount' => nil}],
|
146
146
|
'GatewayScheduleId' => nil,
|
147
147
|
'SourceTypeValueId' => 10,
|
148
|
-
'ForeignKey' => nil
|
148
|
+
'ForeignKey' => nil,
|
149
|
+
'Summary' => nil,
|
149
150
|
}
|
150
151
|
)
|
151
152
|
.and_call_original
|
@@ -14,7 +14,7 @@ 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(
|
17
|
+
expect(keys.count).to eq(11)
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'translates keys' do
|
@@ -24,6 +24,18 @@ RSpec.describe RockRMS::Response::AttributeValue, type: :model do
|
|
24
24
|
expect(r[:value]).to eq(p['Value'])
|
25
25
|
expect(r[:value_as_number]).to eq(p['ValueAsNumeric'])
|
26
26
|
expect(r[:entity_id]).to eq(p['EntityId'])
|
27
|
+
expect(r[:attribute]).to eq({
|
28
|
+
attribute_values: nil,
|
29
|
+
attributes: nil,
|
30
|
+
created_date_time: nil,
|
31
|
+
description: nil,
|
32
|
+
entity_type_id: 7,
|
33
|
+
guid: "abcd",
|
34
|
+
id: 22,
|
35
|
+
key: "JobPulse",
|
36
|
+
modified_date_time: nil,
|
37
|
+
name: "Job Pulse"
|
38
|
+
})
|
27
39
|
end
|
28
40
|
end
|
29
41
|
end
|
@@ -12,6 +12,14 @@
|
|
12
12
|
"ModifiedByPersonAliasId": 1,
|
13
13
|
"ModifiedAuditValuesAlreadyUpdated": false,
|
14
14
|
"Id": 11615,
|
15
|
-
"Guid": "70d06b09-97cd-4788-9667-6f0b11dcde70"
|
15
|
+
"Guid": "70d06b09-97cd-4788-9667-6f0b11dcde70",
|
16
|
+
"Attribute": {
|
17
|
+
"AbbreviatedName": "Job Pulse",
|
18
|
+
"EntityTypeId": 7,
|
19
|
+
"Key": "JobPulse",
|
20
|
+
"Name": "Job Pulse",
|
21
|
+
"Id": 22,
|
22
|
+
"Guid": "abcd"
|
23
|
+
}
|
16
24
|
}
|
17
25
|
]
|
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.
|
4
|
+
version: 8.9.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-
|
11
|
+
date: 2023-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|