Skip to content

FAS-COM-ORD-05Purchased benefits

Markdown

FAS-COM-ORD-05

Purchased benefits

Markdown
  • DocumentProposed
  • Product intentProposed

Planning

Feature
FEAT-COM-ORD-05
Capabilities
CAP-COM-ORD-013
Executed by
TST-COM-ORD-061, TST-COM-ORD-066

Product areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision1

Read atservices-commerce c8b66a98macroservice-libraries 54536a44react-console baf6dae3

Scenarios

5 scenarios proving FEAT-COM-ORD-05 as a whole.

01 A purchased allowance supports replay-safe use behaviour test
Exercises
CAP-COM-ORD-013
Relies on
ATS-COM-ORD-013-01 ATS-COM-ORD-013-05
Preconditions
A single-copy e-book purchase carries a two-use download grant.
Steps
[object Object]
Expected
The replay leaves one use available; the second distinct draw exhausts the grant and another draw is refused.
Data
An isolated workspace with the records, permissions and controlled outcomes named above.
Bound to
Source
services-commerce:modules/entitlements/tests/e2e/entitlements.e2e.spec.js#gives the member a link and consumes one use per Idempotency-Key (the retry free), then refuses the third 409 insufficient_entitlement
02 Cancellation ends availability without erasing use interaction proposed
Exercises
CAP-COM-ORD-013 CAP-COM-ORD-014
Relies on
ATS-COM-ORD-013-08 ATS-COM-ORD-014-04
Preconditions
A delivered grant has one recorded use.
Steps
[object Object]
Expected
The right is revoked, consumption remains recorded and download is refused.
Data
An isolated workspace with the records, permissions and controlled outcomes named above.
Source
services-commerce:modules/entitlements/tests/e2e/entitlements.e2e.spec.js#revokes the line’s grant with the reason, refuses the download 409 entitlement_not_active, and writes the history
03 Restoration and expiry preserve the use trail lifecycle proposed
Exercises
CAP-COM-ORD-013
Relies on
ATS-COM-ORD-013-06 ATS-COM-ORD-013-09
Preconditions
A finite grant has a consumed use and a future validity end.
Steps
[object Object]
Expected
Restoration occurs once and elapsed availability ends without deleting history.
Data
An isolated workspace with the records, permissions and controlled outcomes named above.
Source
ATS-COM-ORD-013-06,ATS-COM-ORD-013-09
04 Holder reads do not confer intervention authority permissionnegative proposed
Exercises
CAP-COM-ORD-013 CAP-COM-ORD-011
Relies on
ATS-COM-ORD-013-10 ATS-COM-ORD-011-03
Preconditions
A holder and a stranger each have linked contacts.
Steps
[object Object]
Expected
Only the holder’s read succeeds and staff interventions are refused.
Data
An isolated workspace with the records, permissions and controlled outcomes named above.
Source
ATS-COM-ORD-013-10,ATS-COM-ORD-011-03
05 Racing draws cannot spend the last allowance twice regressionnegative test
Exercises
CAP-COM-ORD-013
Relies on
ATS-COM-ORD-013-12
Preconditions
A finite grant has two uses left and two competing consumers.
Steps
[object Object]
Expected
The first draw consumes both remaining uses; the waiting one-use draw is refused and the grant records two used units.
Data
An isolated workspace with the records, permissions and controlled outcomes named above.
Bound to
Source
services-commerce:modules/entitlements/tests/integration/services/persistence/entitlements.integration.spec.js#lets the first draw the two left,services-commerce:modules/entitlements/tests/integration/services/persistence/entitlements.integration.spec.js#refuses the second once the first committed, and the ledger holds exactly the first’s uses

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.