Sha256: 3bb94dd19e611ed13117a7d128e4ed7cd4809ef01bf94872370ecfbf5b71bd38
Contents?: true
Size: 444 Bytes
Versions: 17
Compression:
Stored size: 444 Bytes
Contents
class DiscoApp::RecurringApplicationCharge < ApplicationRecord belongs_to :shop belongs_to :subscription enum status: { pending: 0, accepted: 1, declined: 2, active: 3, cancelled: 4, expired: 5 } scope :active, -> { where status: statuses[:active] } def recurring? true end def activate_url DiscoApp::Engine.routes.url_helpers.activate_subscription_charge_url(subscription, self) end end
Version data entries
17 entries across 17 versions & 1 rubygems