fix(offers): show each offer price's territory and price point - #24
Conversation
The four offer price lists (IAP offer codes, subscription offer codes, promotional offers, win-back offers) returned entries with territory and price point empty. The mappers read them from relationship data, which Apple only sends when the request asks for it with include=. The requests now include territory and the price point. Verified live: a promotional offer priced in 175 territories lists all 175 with territory and the exact price point set, over CLI and REST. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughOffer price list requests now include territory and price-point relationships for in-app purchase offer codes, subscription offer codes, promotional offers, and win-back offers. Tests verify the include parameters, and the changelog records the update. ChangesOffer price relationship includes
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The offer price listings are ready to merge after normal checks; no unresolved issue is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
=======================================
Coverage 81.65% 81.65%
=======================================
Files 473 473
Lines 13834 13838 +4
=======================================
+ Hits 11296 11300 +4
Misses 2538 2538
🚀 New features to boost your workflow:
|
Stacked on #23. It touches the same four
listPricesfunctions, so merge #23 first. GitHub then retargets this PR tomain.Problem
iap-offer-codes,subscription-offer-codes,subscription-promotional-offersandwin-back-offersprices listreturned entries with onlyidand the offer ID.territoryand the price-point ID were empty, so you couldn't tell which territory each price was for. The mappers read both from relationship data, and Apple only sends that data when the request asks for it withinclude=. The unit-test fixtures included the data anyway, so tests passed while the live API returned empty fields.Fix
Each request now passes
include: [.territory, .<pricePoint>].Tests
include=territory,<pricePoint>. All four failed before the fix.swift testpasses.Live check
GET /api/v1/subscription-promotional-offers/:id/pricesboth returned 175 entries.🤖 Generated with Claude Code
Summary by CodeRabbit