Sha256: c5289bcdf4fcfd501b9312c56672d1b9d128c2a598b5c7b9ed5687537930885a

Contents?: true

Size: 799 Bytes

Versions: 18

Compression:

Stored size: 799 Bytes

Contents

module Caboose        
  class Subscription < ActiveRecord::Base
    self.table_name  = 'store_subscriptions'
    self.primary_key = 'id'

    belongs_to :site
    belongs_to :variant
    has_many :user_subscriptions
    attr_accessible :id    ,      
      :site_id             ,
      :name                ,
      :description         ,
      :variant_id          ,
      :interval            ,
      :prorate             ,
      :prorate_method      ,
      :prorate_flat_amount ,
      :prorate_function    ,
      :start_on_day        ,
      :start_day           ,
      :start_month

    INTERVAL_MONTHLY = 'monthly'
    INTERVAL_YEARLY  = 'yearly'
    
    PRORATE_METHOD_FLAT       = 'flat'
    PRORATE_METHOD_PERCENTAGE = 'percentage'
    PRORATE_METHOD_CUSTOM     = 'custom'

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
caboose-cms-0.8.78 app/models/caboose/subscription.rb
caboose-cms-0.8.77 app/models/caboose/subscription.rb
caboose-cms-0.8.76 app/models/caboose/subscription.rb
caboose-cms-0.8.75 app/models/caboose/subscription.rb
caboose-cms-0.8.74 app/models/caboose/subscription.rb
caboose-cms-0.8.73 app/models/caboose/subscription.rb
caboose-cms-0.8.72 app/models/caboose/subscription.rb
caboose-cms-0.8.71 app/models/caboose/subscription.rb
caboose-cms-0.8.69 app/models/caboose/subscription.rb
caboose-cms-0.8.68 app/models/caboose/subscription.rb
caboose-cms-0.8.67 app/models/caboose/subscription.rb
caboose-cms-0.8.66 app/models/caboose/subscription.rb
caboose-cms-0.8.65 app/models/caboose/subscription.rb
caboose-cms-0.8.64 app/models/caboose/subscription.rb
caboose-cms-0.8.63 app/models/caboose/subscription.rb
caboose-cms-0.8.62 app/models/caboose/subscription.rb
caboose-cms-0.8.61 app/models/caboose/subscription.rb
caboose-cms-0.8.60 app/models/caboose/subscription.rb