Class: Munificent::StripePaymentSweeper
- Inherits:
-
Object
- Object
- Munificent::StripePaymentSweeper
- Defined in:
- app/sweepers/munificent/stripe_payment_sweeper.rb
Class Method Summary collapse
Class Method Details
.run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/sweepers/munificent/stripe_payment_sweeper.rb', line 4 def run Stripe::PaymentIntent.list.auto_paging_each do |payment_intent| next unless payment_intent.status == "succeeded" Payment.create_and_assign( amount: payment_intent.amount, currency: payment_intent.currency, stripe_payment_intent_id: payment_intent.id, ) end end |