Repository navigation
Link initial orders to subscriptions via relatedResources.subscriptionId (0.1.0a3) - #3
Merged
Merged
Conversation
Require vatly-api-python==0.1.0a3 from PyPI and read lines[].relatedResources.subscriptionId in link_order and reconcile_checkout. Report unresolved signup lines separately from historical plan lines. Release 0.1.0a3. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1d5e3-961e-74df-837f-34c2eb0f5a62
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.
Vatlify Release 2 (#2910) adds
lines[].relatedResources.subscriptionIdto order lines.vatly-api-python0.1.0a3 exposes it asOrderLine.related_resources.subscription_id.vatly-api-python==0.1.0a3from PyPI and drop the vendored a2 wheel (scripts/check_package.pynow resolves the SDK from PyPI).link_order(used byorder.paidandcheckout.paidreactions andreconcile_checkout) links every subscription ID named byrelatedResources.subscriptionId, plussubscriptionrenewal product IDs. Plan product IDs are still never treated as subscription IDs.reconcile_checkoutfetches those subscriptions with the existing bounded 404 retries. It addsCheckoutResolution.unresolved_line_idsfor signup lines whosesubscriptionIdis still null (reconcile again later; may never resolve).legacy_plan_idsnow lists only plan lines withoutrelatedResources(historical orders).order.paidsnapshots can carry a nullsubscriptionId; explicit reconciliation reads the current order.Tests: the webhook out-of-order test and the reconcile test now use the real signup line shape (
subscription_plan+relatedResources), including null/omittedrelatedResourcesand{subscriptionId: null}. Both fail on the previous linkage code.