feat: add tax_included to the price type - #691
Open
YanisMtcr wants to merge 1 commit into
Open
Conversation
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.
Context: #256 (LATAM pricing) raised the same class of issue. This scopes it to the catalog price marker.
tax_includedis a new optional field on thepricetype: a boolean stating whether the amount includes tax (VAT, GST, etc.). A catalog price already carriesamountandcurrency; today it never says whether tax is in it, so an agent has to infer that from the buyer's country. This makes the price self-describing, mirroring howcurrencyis already explicit, rather than adding new machinery.What it looks like
A tax-inclusive EU catalog price:
{ "amount": 12000, "currency": "EUR", "tax_included": true }A US catalog price omits it (or sets
false); tax is added downstream. The itemized tax breakdown stays in checkouttotals; this field only disambiguates the displayed price.Optional and backward-compatible: when absent, behavior is unchanged; agents that ignore it fall back to today's inference, agents that read it drop the guesswork.
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Checklist
ucp-schemaand super-linter not run locally (no cargo/docker); relying on CI.