CLI command

skarbiec subscription refuse

Record that the provider refused the grant a subscription holds now, which makes the grant due a sign-in.

Invocation#

Shell
skarbiec subscription refuse <item-id> --reason <the provider's words>

Purpose#

Record that the provider refused the grant a subscription holds now, which makes the grant due a sign-in.

Required inputs and options#

  • One subscription item and --reason, the provider's own answer. A consumer that met the refusal sends it as POST /v1/subscriptions/refused with provider, subscription_id and reason (the subscription as its brama:provider: and brama:id: tags name it) and the capability report:subscriptions, which covers every subscription item as it is created; the operator route POST /v1/operator/subscriptions/refuse takes item and reason.

Output and state effects#

  • Writes refused (at, reason, by, revision) on the subscription's record in the vault document, journals subscription-refused and prints the subscription as list shows it with recorded new, or unchanged when the same reason was already recorded against the same revision: a refusal restated keeps the moment it was first recorded, so it buys no second sign-in. The refusal applies to the grant the item holds now; once a sign-in writes a new revision it no longer applies.

Refusals#

  • No item, or more than one, exits 2 (item-argument); no --reason exits 2 (reason-missing). An item that is not a live subscription is refused naming the subscriptions (not-subscription). On a replica the write is refused naming the source. Over HTTP: a consumer without report:subscriptions is 403 (report-not-granted); a body without provider, subscription_id or reason is 400 naming it; a grant_sha256 that is not 64 hexadecimal digits is 400 (report-grant-malformed); no item carrying them is 404 (report-unknown); two items carrying them is 409 naming both (report-ambiguous); a grant_sha256 naming another grant than the item holds is 409 (report-stale), recording nothing, since a sign-in already replaced the refused grant. A grant issued with report:<anything but subscriptions> is refused at grant issue naming report:subscriptions.