Class: Gold::MarkAsDelinquentOp
- Inherits:
-
Object
- Object
- Gold::MarkAsDelinquentOp
- Includes:
- Outcomes
- Defined in:
- app/operations/gold/mark_as_delinquent_op.rb
Overview
Invoked when Helium suspends a merchant for violating ToS.
Constant Summary
Constants included from Outcomes
Outcomes::AcceptedCharge, Outcomes::AcceptedTerms, Outcomes::ActiveCharge, Outcomes::CannotApplyDiscount, Outcomes::CannotIssueCredit, Outcomes::CannotProcessCharge, Outcomes::CannotSelectTier, Outcomes::ChargeNeeded, Outcomes::ChargeNotNeeded, Outcomes::DeclinedCharge, Outcomes::DeclinedTerms, Outcomes::ExpiredCharge, Outcomes::FrozenCharge, Outcomes::MismatchCharge, Outcomes::MissingCharge, Outcomes::PendingCharge, Outcomes::SameDiscount, Outcomes::SameTier, Outcomes::TierApplied, Outcomes::TierNotFound, Outcomes::Uninstalled
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(billing) ⇒ MarkAsDelinquentOp
constructor
A new instance of MarkAsDelinquentOp.
Constructor Details
#initialize(billing) ⇒ MarkAsDelinquentOp
Returns a new instance of MarkAsDelinquentOp.
6 7 8 |
# File 'app/operations/gold/mark_as_delinquent_op.rb', line 6 def initialize(billing) @billing = billing end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/operations/gold/mark_as_delinquent_op.rb', line 10 def call @billing.transition_to_or_stay_in!(:marked_as_delinquent) # Communicate delinquency to the merchant. BillingMailer.delinquent(@billing).deliver_now @billing.transition_to!(:delinquent) Success.new end |