Class: Effective::Subscription

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/effective/subscription.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



34
35
36
# File 'app/models/effective/subscription.rb', line 34

def <=>(other)
  name.to_s <=> other&.name.to_s
end

#plan ⇒ Object



30
31
32
# File 'app/models/effective/subscription.rb', line 30

def plan
  EffectiveOrders.stripe_plans[stripe_plan_id]
end

#to_s ⇒ Object



26
27
28
# File 'app/models/effective/subscription.rb', line 26

def to_s
  name || 'New Subscription'
end