Sha256: 6669385584c21406ccbca7fade2b9dc7c908e61eb25262f595b5cbf30755e0c6
Contents?: true
Size: 449 Bytes
Versions: 6
Compression:
Stored size: 449 Bytes
Contents
class Wco::Product include Mongoid::Document include Mongoid::Timestamps field :name field :product_id # stripe field :price_id # stripe field :price_cents, type: Integer INTERVALS = [ nil, 'day', 'week', 'month', 'year' ] field :interval, type: String has_many :subscriptions, class_name: '::Wco::Subscription', inverse_of: :subscription def self.list [ [nil,nil] ] + self.all.map { |i| [i.name, i.id] } end end
Version data entries
6 entries across 6 versions & 1 rubygems