Skip to content

Commit

Permalink
[#330] renamed account state from spent_free_limit to trial_quota_exc…
Browse files Browse the repository at this point in the history
…eeded
  • Loading branch information
Aleksey Stepanov committed Dec 1, 2022
1 parent 88d589a commit 3a4dc7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/app/lib/uffizzi_core/concerns/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ module UffizziCore::Concerns::Models::Account

aasm(:state) do
state :trial, initial: true
state :spent_free_limit
state :trial_quota_exceeded
state :active
state :payment_issue
state :disabled

event :activate do
transitions from: [:payment_issue, :disabled, :spent_free_limit, :trial], to: :active
transitions from: [:payment_issue, :disabled, :trial_quota_exceeded, :trial], to: :active
end

event :disable_trial do
transitions from: [:trial], to: :spent_free_limit
transitions from: [:trial], to: :trial_quota_exceeded
end

event :raise_payment_issue, before_success: :update_payment_issue_date do
transitions from: [:active, :disabled], to: :payment_issue
end

event :disable, after: :disable_projects do
transitions from: [:active, :payment_issue, :trial, :spent_free_limit], to: :disabled
transitions from: [:active, :payment_issue, :trial, :trial_quota_exceeded], to: :disabled
end
end

Expand Down

0 comments on commit 3a4dc7c

Please sign in to comment.