Skip to content

Commit b311d5c

Browse files
committed
Refactor fiscal period closing logic in API documentation
- Updated the documentation for the `sync_detailed`, `sync`, `asyncio_detailed`, and `asyncio` functions to clarify that all mechanics are handled by `PeriodCloseService.close()`. - Removed detailed step-by-step descriptions of the closing process to streamline the documentation and focus on the endpoint's role in authentication and exception handling. These changes improve the clarity and conciseness of the API documentation related to closing fiscal periods.
1 parent 843f18f commit b311d5c

1 file changed

Lines changed: 12 additions & 32 deletions

File tree

‎robosystems_client/api/ledger/close_fiscal_period.py‎

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,9 @@ def sync_detailed(
7878
7979
Close a fiscal period — the final commit action.
8080
81-
In a single transaction:
82-
1. Validates closeable gates
83-
2. Transitions all draft entries in the period to 'posted'
84-
3. Verifies BS equation balances
85-
4. Transitions the FiscalPeriod to 'closed'
86-
5. Advances closed_through; auto-advances close_target if reached
87-
88-
This is synchronous in v1. With QB writeback (future) it will become async.
81+
All mechanics live in `PeriodCloseService.close()`. This endpoint just
82+
resolves auth + QB sync state, invokes the service, and translates
83+
domain exceptions into HTTP responses.
8984
9085
Args:
9186
graph_id (str):
@@ -124,14 +119,9 @@ def sync(
124119
125120
Close a fiscal period — the final commit action.
126121
127-
In a single transaction:
128-
1. Validates closeable gates
129-
2. Transitions all draft entries in the period to 'posted'
130-
3. Verifies BS equation balances
131-
4. Transitions the FiscalPeriod to 'closed'
132-
5. Advances closed_through; auto-advances close_target if reached
133-
134-
This is synchronous in v1. With QB writeback (future) it will become async.
122+
All mechanics live in `PeriodCloseService.close()`. This endpoint just
123+
resolves auth + QB sync state, invokes the service, and translates
124+
domain exceptions into HTTP responses.
135125
136126
Args:
137127
graph_id (str):
@@ -165,14 +155,9 @@ async def asyncio_detailed(
165155
166156
Close a fiscal period — the final commit action.
167157
168-
In a single transaction:
169-
1. Validates closeable gates
170-
2. Transitions all draft entries in the period to 'posted'
171-
3. Verifies BS equation balances
172-
4. Transitions the FiscalPeriod to 'closed'
173-
5. Advances closed_through; auto-advances close_target if reached
174-
175-
This is synchronous in v1. With QB writeback (future) it will become async.
158+
All mechanics live in `PeriodCloseService.close()`. This endpoint just
159+
resolves auth + QB sync state, invokes the service, and translates
160+
domain exceptions into HTTP responses.
176161
177162
Args:
178163
graph_id (str):
@@ -209,14 +194,9 @@ async def asyncio(
209194
210195
Close a fiscal period — the final commit action.
211196
212-
In a single transaction:
213-
1. Validates closeable gates
214-
2. Transitions all draft entries in the period to 'posted'
215-
3. Verifies BS equation balances
216-
4. Transitions the FiscalPeriod to 'closed'
217-
5. Advances closed_through; auto-advances close_target if reached
218-
219-
This is synchronous in v1. With QB writeback (future) it will become async.
197+
All mechanics live in `PeriodCloseService.close()`. This endpoint just
198+
resolves auth + QB sync state, invokes the service, and translates
199+
domain exceptions into HTTP responses.
220200
221201
Args:
222202
graph_id (str):

0 commit comments

Comments
 (0)