Class: StripeModelCallbacks::Customer::Subscription::UpdatedService
- Inherits:
-
BaseEventService
- Object
- BaseEventService
- StripeModelCallbacks::Customer::Subscription::UpdatedService
- Defined in:
- app/services/stripe_model_callbacks/customer/subscription/updated_service.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/services/stripe_model_callbacks/customer/subscription/updated_service.rb', line 2 def perform subscription.assign_from_stripe(object) subscription.deleted_at ||= Time.zone.now if event.type == "customer.subscription.deleted" if subscription.save create_activity succeed! else fail! subscription.errors. end end |