Sha256: 76aa3c246769847f27cb15c9f09c6d38cd8c43430f192f2bb6ddd31fd75fbbe2
Contents?: true
Size: 675 Bytes
Versions: 3
Compression:
Stored size: 675 Bytes
Contents
module Susply class Payment < ActiveRecord::Base belongs_to :owner, class_name: Susply.subscription_owner_class belongs_to :plan, class_name: 'Susply::Plan' belongs_to :subscription, class_name: 'Susply::Subscription' validates_presence_of :owner_id, :plan_id, :subscription_id, :period_start, :period_end, :amount, :status validates :amount, numericality: { only_integer: true, greater_than_or_equal_to: 0 } validates_inclusion_of :generated_type, in: %w(plan_renovation plan_change plan_close) validates_inclusion_of :status, in: %w(generated paid exonerated refunded) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
susply-1.0.0 | app/models/susply/payment.rb |
susply-0.0.2 | app/models/susply/payment.rb |
susply-0.0.1 | app/models/susply/payment.rb |