Sha256: 79a8de048d0726604aa6be28210e098ec2da7bdcedb7b2603b11834b3336fbf0
Contents?: true
Size: 565 Bytes
Versions: 17
Compression:
Stored size: 565 Bytes
Contents
## ## Not used. _vp_ 2023-09-07 ## Just replicating the Stripe structure. ## class Wco::Price include Mongoid::Document include Mongoid::Timestamps belongs_to :product, class_name: '::Wco::Product', inverse_of: :prices has_many :subscriptions, class_name: '::Wco::Subscription', inverse_of: :price, foreign_key: :wco_price_id field :amount_cents, type: Integer INTERVALS = [ nil, 'day', 'week', 'month', 'year' ] field :interval, type: String field :price_id # stripe def name "$#{ amount_cents.to_f/100 } / #{interval}" end end
Version data entries
17 entries across 17 versions & 1 rubygems