Sha256: 0def4fa0aa2b0a3ba096d97a23c937c598e5facdefb9ce551abc6e3c376377b0

Contents?: true

Size: 670 Bytes

Versions: 36

Compression:

Stored size: 670 Bytes

Contents

class Wco::Subscription
  include Mongoid::Document
  include Mongoid::Timestamps

  field :customer_id, type: :string # stripe
  field :price_id,    type: :string # stripe

  field :leadset_id
  def leadset
    Leadset.find leadset_id
  end

  field :quantity, type: :integer

  belongs_to :product, class_name: '::Wco::Product', inverse_of: :subscriptions
  belongs_to :price,   class_name: '::Wco::Price',   inverse_of: :subscriptions, foreign_key: :wco_price_id

  ## This was for ACL on wco dashboard? Should that be the same class?
  ## @TODO: optional ?!
  belongs_to :profile, class_name: '::Ish::UserProfile', inverse_of: :subscriptions, optional: true

end


Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ish_models-3.0.0.1 lib/wco/subscription.rb
ish_models-0.0.33.304 lib/wco/subscription.rb
ish_models-0.0.33.303 lib/wco/subscription.rb
ish_models-0.0.33.302 lib/wco/subscription.rb
ish_models-0.0.33.301 lib/wco/subscription.rb
ish_models-0.0.33.300 lib/wco/subscription.rb
ish_models-0.0.33.299 lib/wco/subscription.rb
ish_models-0.0.33.298 lib/wco/subscription.rb
ish_models-0.0.33.297 lib/wco/subscription.rb
ish_models-0.0.33.296 lib/wco/subscription.rb
ish_models-0.0.33.295 lib/wco/subscription.rb
ish_models-0.0.33.294 lib/wco/subscription.rb
ish_models-0.0.33.293 lib/wco/subscription.rb
ish_models-0.0.33.292 lib/wco/subscription.rb
ish_models-0.0.33.291 lib/wco/subscription.rb
ish_models-0.0.33.287 lib/wco/subscription.rb
ish_models-0.0.33.286 lib/wco/subscription.rb
ish_models-0.0.33.285 lib/wco/subscription.rb
ish_models-0.0.33.284 lib/wco/subscription.rb
ish_models-0.0.33.283 lib/wco/subscription.rb