Class: Susply::Subscription
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Susply::Subscription
- Defined in:
- app/models/susply/subscription.rb
Instance Method Summary collapse
Instance Method Details
#active? ⇒ Boolean
19 20 21 |
# File 'app/models/susply/subscription.rb', line 19 def active? deactivated_at.nil? end |
#allowed_to_renew? ⇒ Boolean
27 28 29 |
# File 'app/models/susply/subscription.rb', line 27 def allowed_to_renew? active? && expired? end |
#expired? ⇒ Boolean
23 24 25 |
# File 'app/models/susply/subscription.rb', line 23 def expired? current_period_end < Time.zone.now end |
#name ⇒ Object
11 12 13 |
# File 'app/models/susply/subscription.rb', line 11 def name plan.name end |
#price ⇒ Object
15 16 17 |
# File 'app/models/susply/subscription.rb', line 15 def price plan.price end |