Period commands: close, lock, recognize
The Period Verbs close, lock, recognize as CLI commands, with inputs, result, refusals and an example.
Reference for Period, one group of Period commands.
Period.close
Close ends a month’s books once every Entry in the Period is reconciled, and makes its statements final. Verb page.
npx startup-builder do Period.close --json '<input>' [--try | --send | --do]Emits Period.closed.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
period | Period | required | The open Period. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
period | Period | required | The closed Period. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
npx startup-builder do Period.close --json '{"period": "period_VEVuYACTsH"}'Period.lock
Lock seals a closed Period, so any later correction posts to the next open Period. Verb page.
npx startup-builder do Period.lock --json '<input>' [--try | --send | --do]Emits Period.locked.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
period | Period | required | The closed Period. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
period | Period | required | The locked Period. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
npx startup-builder do Period.lock --json '{"period": "period_VEVuYACTsH"}'Period.recognize
Recognize moves the revenue a Period earned out of deferred revenue, by the Startup’s revenue-recognition Policy. Verb page.
npx startup-builder do Period.recognize --json '<input>' [--try | --send | --do]Emits Period.recognized.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
period | Period | required | The open Period to recognize. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
entries | list of Entry | required | The recognition Entries it posted. |
period | Period | required | The Period whose revenue was recognized. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
npx startup-builder do Period.recognize --json '{"period": "period_VEVuYACTsH"}'