Skip to content

Commit

Permalink
feat(wallet): Refresh wallet ongoing balance on subscription termination
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Dec 4, 2024
1 parent 10d265b commit e10fcef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/services/subscriptions/terminate_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def call
# NOTE: We should bill subscription and generate invoice for all cases except for the upgrade
# For upgrade we will create only one invoice for termination charges and for in advance charges
# It is handled in subscriptions/create_service.rb
bill_subscription unless upgrade
unless upgrade
bill_subscription
Wallets::Balance::RefreshOngoingService.call(
wallet: subscription.customer.wallets.active.first
)
end
end

# NOTE: Pending next subscription should be canceled as well
Expand Down

0 comments on commit e10fcef

Please sign in to comment.