Class: Effective::Subscription
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Subscription
- Defined in:
- app/models/effective/subscription.rb
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
45 46 47 |
# File 'app/models/effective/subscription.rb', line 45 def <=>(other) (name || '') <=> (other.try(:name) || '') end |
#active? ⇒ Boolean
41 42 43 |
# File 'app/models/effective/subscription.rb', line 41 def active? status == 'active' end |
#plan ⇒ Object
37 38 39 |
# File 'app/models/effective/subscription.rb', line 37 def plan EffectiveOrders.stripe_plans[stripe_plan_id] end |
#to_s ⇒ Object
33 34 35 |
# File 'app/models/effective/subscription.rb', line 33 def to_s name.presence || 'New Subscription' end |