Skip to content

feat(events): filter billing segments - #6296

Draft
tiagolupepic wants to merge 2 commits into
mainfrom
feat/billing-period-filter-product
Draft

feat(events): filter billing segments#6296
tiagolupepic wants to merge 2 commits into
mainfrom
feat/billing-period-filter-product

Conversation

@tiagolupepic

Copy link
Copy Markdown
Contributor

Context

Billing segment fee computation needs the billing period prefilter to work with product-catalog billing work items and product filters, while preserving the existing charge-backed path.

Description

Add a billing segment resolver and source adapter to the billing period filter service. Key segment-backed filter targets by product, support key-only product filter values in the shared matcher, and cover the new behavior with focused specs plus a charge filter regression.

## Context

Billing segment fee computation needs the billing period prefilter to work with product-catalog billing work items and product filters, while preserving the existing charge-backed path.

## Description

Add a billing segment resolver and source adapter to the billing period filter service. Key segment-backed filter targets by product, support key-only product filter values in the shared matcher, and cover the new behavior with focused specs plus a charge filter regression.
## Context

Charge and billing segment filter resolvers share the same raw event combination matching and target bucket merge logic.

## Description

Add a base billing period filter resolver and move shared event matching behavior into it. Make the charge and billing segment resolvers inherit from the base class while keeping their target-specific behavior in each subclass.
def event_store
@event_store ||= Events::Stores::StoreFactory.new_instance(
organization:,
subscription: contract,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is wrong and depends on this PR #6294

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.

1 participant