lib/pay/stripe.rb in pay-2.6.11 vs lib/pay/stripe.rb in pay-2.7.0
- old
+ new
@@ -2,12 +2,14 @@
module Stripe
autoload :Billable, "pay/stripe/billable"
autoload :Charge, "pay/stripe/charge"
autoload :Subscription, "pay/stripe/subscription"
autoload :Error, "pay/stripe/error"
+ autoload :Merchant, "pay/stripe/merchant"
module Webhooks
+ autoload :AccountUpdated, "pay/stripe/webhooks/account_updated"
autoload :ChargeRefunded, "pay/stripe/webhooks/charge_refunded"
autoload :ChargeSucceeded, "pay/stripe/webhooks/charge_succeeded"
autoload :CustomerDeleted, "pay/stripe/webhooks/customer_deleted"
autoload :CustomerUpdated, "pay/stripe/webhooks/customer_updated"
autoload :PaymentActionRequired, "pay/stripe/webhooks/payment_action_required"
@@ -79,9 +81,12 @@
# If a customer's payment source was deleted in Stripe, we should update as well
events.subscribe "stripe.payment_method.attached", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
events.subscribe "stripe.payment_method.updated", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
events.subscribe "stripe.payment_method.card_automatically_updated", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
events.subscribe "stripe.payment_method.detached", Pay::Stripe::Webhooks::PaymentMethodUpdated.new
+
+ # If an account is updated in stripe, we should update it as well
+ events.subscribe "stripe.account.updated", Pay::Stripe::Webhooks::AccountUpdated.new
end
end
end
end