Test clock delete + fixture rewind, SDK31 discount source, transfer_lookup_key - #79
Merged
Merged
Conversation
… transfer_lookup_key
DELETE /v1/test_helpers/test_clocks/{id} removes a clock and detaches
its referenced customers and subscriptions (Stripe deletes the attached
objects; Billtap keeps them so fixture packs can re-seed against a
recreated clock reusing the same id). Re-applying a fixture pack now
recreates a clock that ran past the pack's declared frozen_time before
subscriptions re-seed, restoring a consumed premise such as an expired
trial instead of forcing a database rebuild (fixes #76).
Discount objects serialize the Stripe SDK 31 source.{coupon,
promotion_code} sub-object alongside the legacy top-level coupon, and
POST /v1/prices/{id} accepts transfer_lookup_key to move an in-use
lookup key, clearing it from the previous holder.
Ports the two items from #68 that had not landed through #70-#75.
OpenAPI inventory: 200/587 (34.1%) -> 201/587 (34.2%).
This was referenced Aug 30, 2026
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.
Summary
Fixes #76 and ports the two items from #68 that had not already landed through #70–#75.
DELETE /v1/test_helpers/test_clocks/{id}removes a clock and detaches (rather than deletes) the customers and subscriptions referencing it, so a fixture pack can re-seed against a recreated clock reusing the same id.frozen_timebefore subscriptions re-seed. The issue test clock reset/delete: fixture 재적용이 시계를 되돌리지 못해 trial 전제가 회차 간 소진된다 #76 round-trip — seedtrialing→ advance pasttrial_end(premise consumed) → re-apply — now restores both the clock and thetrialingpremise. Backwards advance stays rejected.source.{coupon,promotion_code}sub-object alongside the legacy top-levelcoupon.POST /v1/prices/{id}acceptstransfer_lookup_key: an in-use lookup key is cleared from its previous holder. Without the flag, the existing set-in-place semantics are unchanged.Verification
go test ./...green (full suite).TestTestClockDeleteDetachesReferences,TestFixtureReapplyRestoresAdvancedTrialClock(reproduces the issue scenario before the fixture-rewind path),TestDiscountSourceShape,TestPriceTransferLookupKey.operations=587 implemented=201 inventory_only=386 implemented_percent=34.2.Open risks
Gate status
No gate regressions; coverage baselines refreshed (201/587, 34.2%).