stbaldricks 10.10.1 → 10.11.1.alpha.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
2
  SHA256:
3
- metadata.gz: 443ed0baebb669698471fd40ec7402a3b6140413868949185c067c0caad94a23
4
- data.tar.gz: 50d4ecb85a779af9cf6dc6e34cd736270b4aacd4a6fb8264a58b4ca1f5d9853b
3
+ metadata.gz: 517fce1bf0fb4038fe7d08b2981511fed2c2898ffa16c1ae2c5a112db9223be8
4
+ data.tar.gz: 750c388ee491616593c115874086517e669ad6ddef7419d14eb789d29bffbfe2
5
5
  SHA512:
6
- metadata.gz: a0586f77cc00f363aa189bf7354a2251a368df531f52ce7d12b04e10fe8f15c6fbde09ad45139673352de47919f4127000b0cccf8a0195cf3c1eafd98131f59b
7
- data.tar.gz: da502b8739690bd0b2c2fde38d074a6bc74d29dbcbe314122817d0ed7b1a3e11440a586a24195ccdb97cda56e79b77870054bf1a86bc2a36fff6b00854795101
6
+ metadata.gz: 2a9e1be0d49736baa28b3bf8dd63ff439b79fa3bf88dac8f7e75700c52a077a2b40ff0f38d7968cca43eec909b74ca34e7b38491e4a30c9a7919edb09498081d
7
+ data.tar.gz: 48ca05594ccf57e41667fabca890df76613c6d3f1e5303b3a9e5e5985472df28eb58455b8531446080057026ed9d9b2a44c8219488ce9f3994f99877d8cbe5da
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/MethodMissingSuper, Style/MissingRespondToMissing
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/MethodMissingSuper, Style/MissingRespondToMissing
38
+ # rubocop:enable Style/MissingRespondToMissing
39
39
  end
40
40
  end
41
41
  end
@@ -402,16 +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::FACEBOOK }, 'SBF::Client::Payment::FacebookDetails'],
414
- [->(v) { v[:type] == SBF::Client::Payment::Type::APPLEPAY }, 'SBF::Client::Payment::ApplepayDetails']
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']
415
417
  ]
416
418
  )
417
419
  entity_attr_accessor :tribute, 'SBF::Client::Donation::Tribute'
@@ -6,16 +6,18 @@ module SBF
6
6
  module Client
7
7
  class Donation < SBF::Client::TopLevelEntity
8
8
  module PaymentType
9
- UNKNOWN = 'unknown'
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'
18
+ STRIPE = 'stripe'
19
+ UNKNOWN = 'unknown'
20
+ WIRE_TRANSFER = 'wire_transfer'
19
21
  end
20
22
  end
21
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
- def self.add_class_selector_method(attribute, class_mappings)
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,16 +5,18 @@ module SBF
5
5
  module Client
6
6
  class Payment
7
7
  module Type
8
- UNKNOWN = 'unknown'.freeze
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
17
+ STRIPE = 'stripe'.freeze
18
+ UNKNOWN = 'unknown'.freeze
19
+ WIRE_TRANSFER = 'wire_transfer'.freeze
18
20
  end
19
21
 
20
22
  module Gateway
@@ -116,6 +118,20 @@ module SBF
116
118
  SBF::Client::Payment::Type::APPLEPAY
117
119
  end
118
120
  end
121
+
122
+ class StripeDetails < SBF::Client::Payment::Details
123
+ def type
124
+ SBF::Client::Payment::Type::STRIPE
125
+ end
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
119
135
  end
120
136
  end
121
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::NONCE },
207
- 'SBF::Client::Payment::NonceDetails'
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::PAYPAL },
215
- 'SBF::Client::Payment::PaypalDetails'
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::APPLEPAY },
219
- 'SBF::Client::Payment::ApplepayDetails'
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
  )
@@ -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/MethodMissingSuper, Style/MissingRespondToMissing
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/MethodMissingSuper, Style/MissingRespondToMissing
17
+ # rubocop:enable Style/MissingRespondToMissing
18
18
  end
19
19
  end
20
20
  end
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '10.10.1'.freeze
3
+ VERSION = '10.11.1.alpha.1'.freeze
4
4
  end
5
5
  end
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.10.1
4
+ version: 10.11.1.alpha.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-03-22 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.4.3
19
+ version: 5.2.4.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.4.3
26
+ version: 5.2.4.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: htmlentities
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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: '0'
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: '0'
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
@@ -554,109 +554,109 @@ required_ruby_version: !ruby/object:Gem::Requirement
554
554
  version: '0'
555
555
  required_rubygems_version: !ruby/object:Gem::Requirement
556
556
  requirements:
557
- - - ">="
557
+ - - ">"
558
558
  - !ruby/object:Gem::Version
559
- version: '0'
559
+ version: 1.3.1
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:
566
566
  - lib/stbaldricks_factories.rb
567
- - spec/factories/photo.rb
568
- - spec/factories/participant.rb
569
- - spec/factories/search_team.rb
570
- - spec/factories/fund.rb
567
+ - spec/factories/organization/addresses.rb
568
+ - spec/factories/organization/email_addresses.rb
569
+ - spec/factories/organization/phone_numbers.rb
570
+ - spec/factories/payment.rb
571
+ - spec/factories/fundraising_page.rb
572
+ - spec/factories/donation/participant.rb
573
+ - spec/factories/challenge.rb
571
574
  - spec/factories/kid_institution.rb
572
- - spec/factories/phone.rb
573
- - spec/factories/diagnosis.rb
574
- - spec/factories/location.rb
575
- - spec/factories/event_application.rb
576
- - spec/factories/search_event.rb
577
- - spec/factories/shave_schedule/time_selection_permissions.rb
578
- - spec/factories/collection.rb
579
- - spec/factories/event.rb
580
- - spec/factories/challenger.rb
581
- - spec/factories/campaign/totals.rb
582
- - spec/factories/kid_honor.rb
583
- - spec/factories/response.rb
584
- - spec/factories/grant_institution.rb
585
- - spec/factories/organization.rb
575
+ - spec/factories/memorial/totals.rb
576
+ - spec/factories/memorial/photos.rb
577
+ - spec/factories/memorial/tribute.rb
578
+ - spec/factories/search_kid.rb
579
+ - spec/factories/contact.rb
586
580
  - spec/factories/researcher.rb
587
- - spec/factories/treatment_status.rb
588
- - spec/factories/event/totals.rb
589
- - spec/factories/event/contacts.rb
590
- - spec/factories/event/photos.rb
591
- - spec/factories/event/venue/location.rb
592
- - spec/factories/event/venue/social.rb
593
- - spec/factories/event/coach_tracking.rb
594
- - spec/factories/event/venue.rb
595
- - spec/factories/event/coach_tracking/coaching_interactions.rb
596
- - spec/factories/event/coach_tracking/proceeds.rb
597
- - spec/factories/event/coach_tracking/plaque.rb
598
- - spec/factories/event/contacts/name_pieces.rb
599
- - spec/factories/event/contacts/contact.rb
600
- - spec/factories/fundraiser/totals.rb
601
- - spec/factories/fundraiser/policies.rb
602
- - spec/factories/fundraiser/photos.rb
603
- - spec/factories/shave_schedule.rb
604
- - spec/factories/event_supporter.rb
605
- - spec/factories/participant/totals.rb
581
+ - spec/factories/photos.rb
582
+ - spec/factories/challenger.rb
583
+ - spec/factories/name_pieces.rb
584
+ - spec/factories/milestone.rb
585
+ - spec/factories/person/policies.rb
586
+ - spec/factories/person/addresses.rb
587
+ - spec/factories/person/email_addresses.rb
588
+ - spec/factories/person/phone_numbers.rb
606
589
  - spec/factories/participant/policies.rb
607
- - spec/factories/participant/roles/role.rb
590
+ - spec/factories/participant/totals.rb
608
591
  - spec/factories/participant/photos.rb
609
- - spec/factories/participant/rankings.rb
592
+ - spec/factories/participant/roles/role.rb
610
593
  - spec/factories/participant/rankings/ranking.rb
594
+ - spec/factories/participant/rankings.rb
611
595
  - spec/factories/participant/roles.rb
612
- - spec/factories/error.rb
613
- - spec/factories/recurring_gift.rb
614
- - spec/factories/challenge.rb
615
- - spec/factories/address.rb
616
- - spec/factories/kid/custom_institution.rb
617
- - spec/factories/person.rb
596
+ - spec/factories/donation.rb
597
+ - spec/factories/third_party_media.rb
598
+ - spec/factories/search_team.rb
599
+ - spec/factories/permissions.rb
600
+ - spec/factories/photo.rb
601
+ - spec/factories/collection.rb
602
+ - spec/factories/campaign.rb
603
+ - spec/factories/grant.rb
604
+ - spec/factories/location.rb
605
+ - spec/factories/email_address.rb
606
+ - spec/factories/disease.rb
607
+ - spec/factories/participant.rb
608
+ - spec/factories/kid.rb
618
609
  - spec/factories/search_participant.rb
619
- - spec/factories/milestone.rb
620
- - spec/factories/fundraising_page.rb
621
- - spec/factories/photos.rb
610
+ - spec/factories/event_supporter.rb
611
+ - spec/factories/page.rb
612
+ - spec/factories/message.rb
613
+ - spec/factories/response.rb
614
+ - spec/factories/search_event.rb
615
+ - spec/factories/event_application.rb
616
+ - spec/factories/fundraiser.rb
617
+ - spec/factories/team.rb
618
+ - spec/factories/memorial.rb
619
+ - spec/factories/diagnosis.rb
622
620
  - spec/factories/team/totals.rb
623
621
  - spec/factories/team/photos.rb
624
- - spec/factories/team/rankings.rb
625
622
  - spec/factories/team/rankings/ranking.rb
626
- - spec/factories/donation.rb
627
- - spec/factories/memorial.rb
628
- - spec/factories/institution.rb
629
- - spec/factories/memorial/totals.rb
630
- - spec/factories/memorial/tribute.rb
631
- - spec/factories/memorial/photos.rb
632
- - spec/factories/person/policies.rb
633
- - spec/factories/person/addresses.rb
634
- - spec/factories/person/phone_numbers.rb
635
- - spec/factories/person/email_addresses.rb
623
+ - spec/factories/team/rankings.rb
624
+ - spec/factories/newsletter_recipient.rb
625
+ - spec/factories/shave_schedule.rb
626
+ - spec/factories/organization.rb
627
+ - spec/factories/campaign/totals.rb
628
+ - spec/factories/lib/helpers.rb
629
+ - spec/factories/lib/faker_patch.rb
630
+ - spec/factories/error.rb
636
631
  - spec/factories/donor.rb
637
- - spec/factories/kid.rb
638
- - spec/factories/name_pieces.rb
639
- - spec/factories/team.rb
640
- - spec/factories/user.rb
641
- - spec/factories/disease.rb
642
- - spec/factories/search_kid.rb
643
- - spec/factories/page.rb
632
+ - spec/factories/contact_group.rb
633
+ - spec/factories/recurring_gift.rb
634
+ - spec/factories/person.rb
635
+ - spec/factories/treatment_status.rb
636
+ - spec/factories/fundraiser/policies.rb
637
+ - spec/factories/fundraiser/totals.rb
638
+ - spec/factories/fundraiser/photos.rb
644
639
  - spec/factories/venue.rb
645
- - spec/factories/organization/addresses.rb
646
- - spec/factories/organization/phone_numbers.rb
647
- - spec/factories/organization/email_addresses.rb
648
- - spec/factories/lib/faker_patch.rb
649
- - spec/factories/lib/helpers.rb
650
- - spec/factories/newsletter_recipient.rb
651
- - spec/factories/payment.rb
652
- - spec/factories/contact.rb
653
- - spec/factories/message.rb
654
640
  - spec/factories/search_fundraiser.rb
655
- - spec/factories/third_party_media.rb
656
- - spec/factories/donation/participant.rb
657
- - spec/factories/grant.rb
658
- - spec/factories/fundraiser.rb
659
- - spec/factories/contact_group.rb
660
- - spec/factories/email_address.rb
661
- - spec/factories/permissions.rb
662
- - spec/factories/campaign.rb
641
+ - spec/factories/institution.rb
642
+ - spec/factories/grant_institution.rb
643
+ - spec/factories/address.rb
644
+ - spec/factories/phone.rb
645
+ - spec/factories/event/totals.rb
646
+ - spec/factories/event/photos.rb
647
+ - spec/factories/event/contacts/contact.rb
648
+ - spec/factories/event/contacts/name_pieces.rb
649
+ - spec/factories/event/coach_tracking/coaching_interactions.rb
650
+ - spec/factories/event/coach_tracking/proceeds.rb
651
+ - spec/factories/event/coach_tracking/plaque.rb
652
+ - spec/factories/event/coach_tracking.rb
653
+ - spec/factories/event/venue/location.rb
654
+ - spec/factories/event/venue/social.rb
655
+ - spec/factories/event/contacts.rb
656
+ - spec/factories/event/venue.rb
657
+ - spec/factories/fund.rb
658
+ - spec/factories/event.rb
659
+ - spec/factories/kid/custom_institution.rb
660
+ - spec/factories/shave_schedule/time_selection_permissions.rb
661
+ - spec/factories/user.rb
662
+ - spec/factories/kid_honor.rb