stbaldricks 10.10.2 → 10.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/stbaldricks/entities/config.rb +2 -2
- data/lib/stbaldricks/entities/donation.rb +6 -5
- data/lib/stbaldricks/entities/donation/payment_type.rb +7 -6
- data/lib/stbaldricks/entities/lib/base.rb +3 -1
- data/lib/stbaldricks/entities/lib/payment.rb +15 -6
- data/lib/stbaldricks/entities/recurring_gift.rb +11 -6
- data/lib/stbaldricks/log.rb +2 -2
- data/lib/stbaldricks/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a4b330177cd3d37a585adbd91fce1ca14453f333f1a9bf4f37f4bc15520273
|
4
|
+
data.tar.gz: a21476a2608c3810ff6eabc6ddef9a5f59730d54c7a20069667564e71a7bb5ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 945fa14a5b0cfd980354b5a6a97fc3acfdd0f160f34c515bb7d1c98b12e6bd8c1d5918b7ebae0bd96d9ee9480c742b4bd6f5b34761e77a8b418c2768d7e8788c
|
7
|
+
data.tar.gz: d44d57439be9c6de82f064aa986df3918445652f5c8e24557236ffbff9fd59226900236095215b30cb861fcb9c6e0c109fa08cf0fa289bb46c25690eff450e94
|
data/README.md
CHANGED
@@ -182,7 +182,7 @@ or the expected API response data for a successful request.
|
|
182
182
|
Tests are broken out into unit and integration tests. Test coverage thresholds are enforced and test additions or modifications are
|
183
183
|
required for nearly any client library change.
|
184
184
|
|
185
|
-
More detail on understanding and writing Rspec tests can be found in the [Rspec Guide](https://github.com/firespring/sbf/tree/master/documentation/guides/rspec).
|
185
|
+
More detail on understanding and writing Rspec tests can be found in the [Rspec Guide](https://github.com/firespring/sbf/tree/master/documentation/guides/training/rspec).
|
186
186
|
|
187
187
|
#### Running Tests
|
188
188
|
* use `rake client:ruby:test:all` to run all tests
|
@@ -22,7 +22,7 @@ module SBF
|
|
22
22
|
# NOTE: If you add another attribute, be sure to mock it out in `configure :test` of app.rb
|
23
23
|
|
24
24
|
# Attempts to call the method on the cached configuration object
|
25
|
-
# rubocop:disable Style/
|
25
|
+
# rubocop:disable Style/MissingRespondToMissing
|
26
26
|
def self.method_missing(method_name, *arguments, &block)
|
27
27
|
# The first time a missing method is called, call reload to make sure the instance has been populated
|
28
28
|
unless @_loaded
|
@@ -35,7 +35,7 @@ module SBF
|
|
35
35
|
|
36
36
|
super(method_name, *arguments, &block)
|
37
37
|
end
|
38
|
-
# rubocop:enable Style/
|
38
|
+
# rubocop:enable Style/MissingRespondToMissing
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -402,17 +402,18 @@ module SBF
|
|
402
402
|
multitype_attr_accessor(
|
403
403
|
:payment_details,
|
404
404
|
[
|
405
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::APPLEPAY }, 'SBF::Client::Payment::ApplepayDetails'],
|
405
406
|
[->(v) { v[:type] == SBF::Client::Payment::Type::CREDIT_CARD }, 'SBF::Client::Payment::CreditCardDetails'],
|
406
407
|
[->(v) { v[:type] == SBF::Client::Payment::Type::CASH }, 'SBF::Client::Payment::CashDetails'],
|
407
408
|
[->(v) { v[:type] == SBF::Client::Payment::Type::CHECK }, 'SBF::Client::Payment::CheckDetails'],
|
409
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::FACEBOOK }, 'SBF::Client::Payment::FacebookDetails'],
|
410
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::GOOGLEPAY }, 'SBF::Client::Payment::GooglePayDetails'],
|
408
411
|
[->(v) { v[:type] == SBF::Client::Payment::Type::MONEY_ORDER }, 'SBF::Client::Payment::MoneyOrderDetails'],
|
409
412
|
[->(v) { v[:type] == SBF::Client::Payment::Type::NONCE }, 'SBF::Client::Payment::NonceDetails'],
|
410
|
-
[->(v) { v[:type] == SBF::Client::Payment::Type::WIRE_TRANSFER }, 'SBF::Client::Payment::WireTransferDetails'],
|
411
|
-
[->(v) { v[:type] == SBF::Client::Payment::Type::UNKNOWN }, 'SBF::Client::Payment::UnknownDetails'],
|
412
413
|
[->(v) { v[:type] == SBF::Client::Payment::Type::PAYPAL }, 'SBF::Client::Payment::PaypalDetails'],
|
413
|
-
[->(v) { v[:type] == SBF::Client::Payment::Type::
|
414
|
-
[->(v) { v[:type] == SBF::Client::Payment::Type::
|
415
|
-
[->(v) { v[:type] == SBF::Client::Payment::Type::
|
414
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::STRIPE }, 'SBF::Client::Payment::StripeDetails'],
|
415
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::UNKNOWN }, 'SBF::Client::Payment::UnknownDetails'],
|
416
|
+
[->(v) { v[:type] == SBF::Client::Payment::Type::WIRE_TRANSFER }, 'SBF::Client::Payment::WireTransferDetails']
|
416
417
|
]
|
417
418
|
)
|
418
419
|
entity_attr_accessor :tribute, 'SBF::Client::Donation::Tribute'
|
@@ -6,17 +6,18 @@ module SBF
|
|
6
6
|
module Client
|
7
7
|
class Donation < SBF::Client::TopLevelEntity
|
8
8
|
module PaymentType
|
9
|
-
|
10
|
-
CREDIT_CARD = 'credit_card'
|
11
|
-
CHECK = 'check'
|
9
|
+
APPLEPAY = 'applepay'
|
12
10
|
CASH = 'cash'
|
11
|
+
CHECK = 'check'
|
12
|
+
CREDIT_CARD = 'credit_card'
|
13
|
+
FACEBOOK = 'facebook'
|
14
|
+
GOOGLE_PAY = 'google_pay'
|
13
15
|
MONEY_ORDER = 'money_order'
|
14
|
-
WIRE_TRANSFER = 'wire_transfer'
|
15
16
|
PAYPAL = 'paypal'
|
16
17
|
STORED = 'stored'
|
17
|
-
FACEBOOK = 'facebook'
|
18
|
-
APPLEPAY = 'applepay'
|
19
18
|
STRIPE = 'stripe'
|
19
|
+
UNKNOWN = 'unknown'
|
20
|
+
WIRE_TRANSFER = 'wire_transfer'
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -390,7 +390,8 @@ module SBF
|
|
390
390
|
|
391
391
|
# Creates a private method which resolves the class type based on the class mappings and the value
|
392
392
|
# rubocop:disable Metrics/MethodLength
|
393
|
-
|
393
|
+
# rubocop:todo Metrics/PerceivedComplexity
|
394
|
+
def self.add_class_selector_method(attribute, class_mappings) # rubocop:todo Metrics/CyclomaticComplexity
|
394
395
|
method_name = :"select_#{attribute}_class"
|
395
396
|
|
396
397
|
define_singleton_method(method_name) do |value|
|
@@ -451,6 +452,7 @@ module SBF
|
|
451
452
|
|
452
453
|
private_class_method method_name
|
453
454
|
end
|
455
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
454
456
|
# rubocop:enable Metrics/MethodLength
|
455
457
|
private_class_method :add_class_selector_method
|
456
458
|
|
@@ -5,17 +5,18 @@ module SBF
|
|
5
5
|
module Client
|
6
6
|
class Payment
|
7
7
|
module Type
|
8
|
-
|
9
|
-
CREDIT_CARD = 'credit_card'.freeze
|
10
|
-
CHECK = 'check'.freeze
|
8
|
+
APPLEPAY = 'applepay'.freeze
|
11
9
|
CASH = 'cash'.freeze
|
10
|
+
CHECK = 'check'.freeze
|
11
|
+
CREDIT_CARD = 'credit_card'.freeze
|
12
|
+
FACEBOOK = 'facebook'.freeze
|
13
|
+
GOOGLEPAY = 'google_pay'.freeze
|
12
14
|
MONEY_ORDER = 'money_order'.freeze
|
13
15
|
NONCE = 'nonce'.freeze
|
14
|
-
WIRE_TRANSFER = 'wire_transfer'.freeze
|
15
16
|
PAYPAL = 'paypal'.freeze
|
16
|
-
FACEBOOK = 'facebook'.freeze
|
17
|
-
APPLEPAY = 'applepay'.freeze
|
18
17
|
STRIPE = 'stripe'.freeze
|
18
|
+
UNKNOWN = 'unknown'.freeze
|
19
|
+
WIRE_TRANSFER = 'wire_transfer'.freeze
|
19
20
|
end
|
20
21
|
|
21
22
|
module Gateway
|
@@ -123,6 +124,14 @@ module SBF
|
|
123
124
|
SBF::Client::Payment::Type::STRIPE
|
124
125
|
end
|
125
126
|
end
|
127
|
+
|
128
|
+
class GooglePayDetails < SBF::Client::Payment::Details
|
129
|
+
attr_accessor :gateway
|
130
|
+
|
131
|
+
def type
|
132
|
+
SBF::Client::Payment::Type::GOOGLEPAY
|
133
|
+
end
|
134
|
+
end
|
126
135
|
end
|
127
136
|
end
|
128
137
|
end
|
@@ -53,6 +53,7 @@ module SBF
|
|
53
53
|
module FundingType
|
54
54
|
APPLEPAY = 'applepay'.freeze
|
55
55
|
CREDIT_CARD = 'credit_card'.freeze
|
56
|
+
GOOGLE_PAY = 'google_pay'.freeze
|
56
57
|
PAYPAL = 'paypal'.freeze
|
57
58
|
end
|
58
59
|
|
@@ -203,20 +204,24 @@ module SBF
|
|
203
204
|
:payment_details,
|
204
205
|
[
|
205
206
|
[
|
206
|
-
->(v) { v[:type] == SBF::Client::Payment::Type::
|
207
|
-
'SBF::Client::Payment::
|
207
|
+
->(v) { v[:type] == SBF::Client::Payment::Type::APPLEPAY },
|
208
|
+
'SBF::Client::Payment::ApplepayDetails'
|
208
209
|
],
|
209
210
|
[
|
210
211
|
->(v) { v[:type] == SBF::Client::Payment::Type::CREDIT_CARD },
|
211
212
|
'SBF::Client::Payment::SubscriptionCreditCardDetails'
|
212
213
|
],
|
213
214
|
[
|
214
|
-
->(v) { v[:type] == SBF::Client::Payment::Type::
|
215
|
-
'SBF::Client::Payment::
|
215
|
+
->(v) { v[:type] == SBF::Client::Payment::Type::GOOGLEPAY },
|
216
|
+
'SBF::Client::Payment::GooglePayDetails'
|
216
217
|
],
|
217
218
|
[
|
218
|
-
->(v) { v[:type] == SBF::Client::Payment::Type::
|
219
|
-
'SBF::Client::Payment::
|
219
|
+
->(v) { v[:type] == SBF::Client::Payment::Type::NONCE },
|
220
|
+
'SBF::Client::Payment::NonceDetails'
|
221
|
+
],
|
222
|
+
[
|
223
|
+
->(v) { v[:type] == SBF::Client::Payment::Type::PAYPAL },
|
224
|
+
'SBF::Client::Payment::PaypalDetails'
|
220
225
|
]
|
221
226
|
]
|
222
227
|
)
|
data/lib/stbaldricks/log.rb
CHANGED
@@ -10,11 +10,11 @@ module SBF
|
|
10
10
|
REQUIRED_METHODS = %i(debug info warn error fatal unknown add level)
|
11
11
|
# rubocop:enable Style/MutableConstant
|
12
12
|
|
13
|
-
# rubocop:disable Style/
|
13
|
+
# rubocop:disable Style/MissingRespondToMissing
|
14
14
|
def self.method_missing(sym, *args, &block)
|
15
15
|
SBF::Client::Configuration.logger.send(sym, *args, &block)
|
16
16
|
end
|
17
|
-
# rubocop:enable Style/
|
17
|
+
# rubocop:enable Style/MissingRespondToMissing
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/lib/stbaldricks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stbaldricks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -224,16 +224,16 @@ dependencies:
|
|
224
224
|
name: rubocop
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
229
|
+
version: 0.93.1
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- - "
|
234
|
+
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
236
|
+
version: 0.93.1
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: rubocop-performance
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -539,11 +539,11 @@ files:
|
|
539
539
|
- spec/factories/treatment_status.rb
|
540
540
|
- spec/factories/user.rb
|
541
541
|
- spec/factories/venue.rb
|
542
|
-
homepage:
|
542
|
+
homepage:
|
543
543
|
licenses:
|
544
544
|
- MIT
|
545
545
|
metadata: {}
|
546
|
-
post_install_message:
|
546
|
+
post_install_message:
|
547
547
|
rdoc_options: []
|
548
548
|
require_paths:
|
549
549
|
- lib
|
@@ -558,8 +558,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
558
558
|
- !ruby/object:Gem::Version
|
559
559
|
version: '0'
|
560
560
|
requirements: []
|
561
|
-
rubygems_version: 3.0.3
|
562
|
-
signing_key:
|
561
|
+
rubygems_version: 3.0.3.1
|
562
|
+
signing_key:
|
563
563
|
specification_version: 4
|
564
564
|
summary: St. Baldrick's Foundation Ruby Client Library
|
565
565
|
test_files:
|