[Entitlement] Expose BCD_UPDATE and QUANTITY_UPDATE events in subscription event stream - #2254
Open
jutur wants to merge 2 commits into
Open
[Entitlement] Expose BCD_UPDATE and QUANTITY_UPDATE events in subscription event stream#2254jutur wants to merge 2 commits into
jutur wants to merge 2 commits into
Conversation
…ent stream SubscriptionEventOrdering.toEventTypes() fell through to the default (empty list) branch for BCD_CHANGE and QUANTITY_CHANGE transitions, so callers of Subscription.getSubscriptionEvents() never saw these events in the returned list — only PHASE, CHANGE, START_BILLING, and STOP_BILLING were mapped. Add explicit case branches for BCD_CHANGE -> BCD_UPDATE and QUANTITY_CHANGE -> QUANTITY_UPDATE, and register both new types under ENT_BILLING_SERVICE_NAME in EntitlementOrderingBase.getServiceName() consistent with PHASE and CHANGE which also affect billing. Also add UNDO_CHANGE to the explicit ignored-event list in the switch to make the intent clearer rather than falling through to default. Depends on killbill-api#<PR> which adds BCD_UPDATE and QUANTITY_UPDATE to SubscriptionEventType. Fixes killbill#2224
jutur
force-pushed
the
fix-bcd-update-subscription-events
branch
from
June 17, 2026 03:51
4eede85 to
12ba30e
Compare
Contributor
Author
|
CI is failing because this PR depends on killbill-api #124, which adds BCD_UPDATE and QUANTITY_UPDATE to SubscriptionEventType. The pom.xml here pins killbill-api.version to 0.54.1-SNAPSHOT (the local dev build of that change) — once killbill-api #124 is merged and 0.54.1 is released, I'll update the version here and CI should pass. |
…DATE types killbill-api PR killbill#124 has merged; point at the published snapshot for that commit instead of the stale local dev version.
Contributor
|
@jutur regarding this comment are you sure ci is failing due to #124? This seems like a very old ticket, and it is closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2224.
SubscriptionEventOrdering.toEventTypes()fell through to the default (empty list) branch forBCD_CHANGEandQUANTITY_CHANGEtransitions, so callers ofSubscription.getSubscriptionEvents()never saw these events in the returned list — onlyPHASE,CHANGE,START_BILLING, andSTOP_BILLINGwere mapped.Add explicit case branches for
BCD_CHANGE → BCD_UPDATEandQUANTITY_CHANGE → QUANTITY_UPDATE, and register both new types underENT_BILLING_SERVICE_NAMEinEntitlementOrderingBase.getServiceName(), consistent withPHASEandCHANGE.Also explicitly lists
UNDO_CHANGEin the ignored-event cases for clarity.Depends on: killbill/killbill-api# (adds
BCD_UPDATEandQUANTITY_UPDATEtoSubscriptionEventType)A test in
TestDefaultSubscriptionApiverifies that aBCD_UPDATEevent appears in the subscription event stream after callingupdateBCD().