Skip to content

DOM-COM-CAT-001Checkout Policy

Markdown

DOM-COM-CAT-001

Checkout Policy

Markdown
  • DocumentDraft
  • ImplementationObserved

Planning

Specified by
CON-COM-CAT-001

Design

Owned by
SVC-COM-CAT-configuration

KindDomain objectProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Relationships

ToCardinalityOwnershipCrosses a serviceOn archive or delete
DOM-COM-CAT-002one policy to many storesStores retain the policy reference and prevent its removal while they use it.no
DOM-COM-CAT-004one policy to every price of a salePricing obtains the sale currency from the policy without storing prices on it.no
DOM-COM-CAT-005informationalSample promotion assessment uses the selected policy’s unit and currency.no

Invariants

InvariantProtectsEnforced atProvenance
INV-DOM-COM-CAT-001-01
The save requires an Accounting unit and one of that unit’s currencies.
api, servicetest
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 currency_not_supported_by_business_unit to a currency the business unit does not transact in
INV-DOM-COM-CAT-001-02
After the first policy is created through the service, the workspace retains one active default policy.
service, databasetest
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes a second profile no default, and one stating is_tenant_default the default in place of the first, in one transaction
INV-DOM-COM-CAT-001-03
Policies referenced by workspace or application defaults cannot be deactivated or removed.
servicetest
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses making an application default inactive, 409 profile_is_default naming the application, and deactivates it once no default names it (D31)
INV-DOM-COM-CAT-001-04
Saving defaults requires active policies belonging to the same workspace.
servicetest
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#refuses a document naming an inactive or an unknown profile, 400, the document unchanged
INV-DOM-COM-CAT-001-05
Retained store, checkout, order and default references block policy removal.
databasetest
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 409 naming the store while a store sells under the profile, then 200 once the store is gone
INV-DOM-COM-CAT-001-06
A policy keeps its original key, and reserved keys are rejected.
api, service, databasetest
services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-rules.spec.js#refuses a reserved id whatever its case and surrounding spaces
INV-DOM-COM-CAT-001-07
Card-range mode requires ordered bounds; other card modes retain no bounds.
api, databasetest
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a within_range acceptance without its minimum, naming card_minimum_total_minor, with or without the maximum (0755)
INV-DOM-COM-CAT-001-08
Payment timing accepts a window of one minute through seven days.
databasetest
services-commerce:modules/configuration/tests/integration/db/configuration-records.table.integration.spec.js#refuses a tender window outside one minute to a week, by ordering_profiles_tender_window_minutes_check
INV-DOM-COM-CAT-001-09
Placed orders retain a snapshot of their settlement, card, invoice and fee-product settings despite later policy changes.
servicetest
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.queries.integration.spec.js#snapshotOf freezes the settlement, card, invoicing, fee-product and quote rules an order carries (22 §9), nothing else
INV-DOM-COM-CAT-001-10
Zone writes include their rate entries, and rates use integer basis points within the supported limit.
api, service, databasetest
services-commerce:modules/configuration/tests/e2e/tax-zones.e2e.spec.js#deletes a zone with its rates, after which it reads 404; deleting it again is 404

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.