Class: Susply::RenewsSubscription
- Inherits:
-
Object
- Object
- Susply::RenewsSubscription
- Defined in:
- app/services/susply/renews_subscription.rb
Class Method Summary collapse
Class Method Details
.call(owner) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/services/susply/renews_subscription.rb', line 3 def self.call(owner) active_subscription = owner.active_subscription if active_subscription && active_subscription.expired? Susply::CreatePayment.call(active_subscription, "plan_renovation") calculate_renewed_subscription(active_subscription) else nil end end |