Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added event for subsidy redemption reversal on the bus #227

Closed
wants to merge 1 commit into from

Conversation

irfanuddinahmad
Copy link
Contributor

@irfanuddinahmad irfanuddinahmad commented Apr 2, 2024

Description

This PR adds an event on the event bus whenever a redemption reversal signal is received from the ledger.

JIRA: ENT-8487

Related PR openedx/enterprise-access#434

Merge checklist

  • All reviewers approved
  • CI build is green
  • Documentation updated (not only docstrings)
  • Commits are squashed

@@ -28,6 +30,14 @@ def listen_for_transaction_reversal(sender, **kwargs):
raise ValueError(msg)
try:
EnterpriseApiClient().cancel_fulfillment(transaction.fulfillment_identifier)
subsidy_redemption = SubsidyRedemption(
subsidy_identifier=transaction.subsidy_access_policy_uuid,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, doesn't have to be addressed in this PR, but subsidy_identifier is a really confusing name for this key - as a casual reader of the code, I'd expect a key with that name to point to an instance of subsidy.models.Subsidy :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iloveagent57 the challenge was to come up with a reasonably generic identifier without injecting too much of our policy/budget/subsidy lingo into the event.

@iloveagent57
Copy link
Contributor

Closed in favor of: #244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants