feat: Add coupon extraction functionality and update related tests#259
Merged
feat: Add coupon extraction functionality and update related tests#259
Conversation
- Introduced `extractCouponsFromItem` function to extract coupon entities from price items and their components. - Updated `extractPricingEntitiesBySlug` to include coupon relations in the returned result. - Added new test cases to validate coupon extraction in `extractPricingEntitiesBySlug`. - Updated exports in `index.ts` and added new sample data in `price.samples.ts` for testing.
paulofph
approved these changes
Jan 23, 2026
- Added `extractCouponsFromItem` to extract coupon details from price items. - Updated `extractPricingEntitiesBySlug` to include redeemed promo codes for coupons that require them. - Introduced new test cases to validate the updated coupon extraction logic. - Updated exports in `index.ts` and added new coupon sample data in `coupon.fixtures.ts` for testing.
This reverts commit 9457d09.
- Included `extractCouponsFromItem` in the exports of `index.ts`. - Updated test file to reflect the addition of `extractCouponsFromItem` in the expected named exports.
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.
extractCouponsFromItemfunction to extract coupon entities from price items and their components.extractPricingEntitiesBySlugto include coupon relations in the returned result.extractPricingEntitiesBySlug.index.tsand added new sample data inprice.samples.tsfor testing.