Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.create_schedule_request import CreateScheduleRequest
from ...models.create_information_block_request import CreateInformationBlockRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_error import OperationError
Expand All @@ -16,7 +16,7 @@
def _get_kwargs(
graph_id: str,
*,
body: CreateScheduleRequest,
body: CreateInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
Expand All @@ -25,7 +25,7 @@ def _get_kwargs(

_kwargs: dict[str, Any] = {
"method": "post",
"url": "/extensions/roboledger/{graph_id}/operations/create-schedule".format(
"url": "/extensions/roboledger/{graph_id}/operations/create-information-block".format(
graph_id=quote(str(graph_id), safe=""),
),
}
Expand Down Expand Up @@ -103,21 +103,30 @@ def sync_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateScheduleRequest,
body: CreateInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Schedule
"""Create Information Block

Create a schedule and pre-generate monthly amortization facts spanning the period range.
`entry_template` defines the debit/credit elements used by `create-closing-entry` each period.
Generic Information Block construction entry. `block_type` selects the registered block type;
`payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the
existing Schedule machinery; statement block types raise 501 (use create-report instead).

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateScheduleRequest):
body (CreateInformationBlockRequest): Generic create request — discriminator + typed-at-
dispatch payload.

``block_type`` selects the registry entry. ``payload`` is validated
against ``BlockTypeRegistryEntry.create_request_model`` (e.g.
:class:`CreateScheduleRequest` for ``block_type='schedule'``) by the
command dispatcher. Chosen over a Pydantic discriminated union on the
top-level request so adding a block type is one registry line, not a
union-arm edit at the request-model layer.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -144,21 +153,30 @@ def sync(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateScheduleRequest,
body: CreateInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Schedule
"""Create Information Block

Create a schedule and pre-generate monthly amortization facts spanning the period range.
`entry_template` defines the debit/credit elements used by `create-closing-entry` each period.
Generic Information Block construction entry. `block_type` selects the registered block type;
`payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the
existing Schedule machinery; statement block types raise 501 (use create-report instead).

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateScheduleRequest):
body (CreateInformationBlockRequest): Generic create request — discriminator + typed-at-
dispatch payload.

``block_type`` selects the registry entry. ``payload`` is validated
against ``BlockTypeRegistryEntry.create_request_model`` (e.g.
:class:`CreateScheduleRequest` for ``block_type='schedule'``) by the
command dispatcher. Chosen over a Pydantic discriminated union on the
top-level request so adding a block type is one registry line, not a
union-arm edit at the request-model layer.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -180,21 +198,30 @@ async def asyncio_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateScheduleRequest,
body: CreateInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Create Schedule
"""Create Information Block

Create a schedule and pre-generate monthly amortization facts spanning the period range.
`entry_template` defines the debit/credit elements used by `create-closing-entry` each period.
Generic Information Block construction entry. `block_type` selects the registered block type;
`payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the
existing Schedule machinery; statement block types raise 501 (use create-report instead).

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateScheduleRequest):
body (CreateInformationBlockRequest): Generic create request — discriminator + typed-at-
dispatch payload.

``block_type`` selects the registry entry. ``payload`` is validated
against ``BlockTypeRegistryEntry.create_request_model`` (e.g.
:class:`CreateScheduleRequest` for ``block_type='schedule'``) by the
command dispatcher. Chosen over a Pydantic discriminated union on the
top-level request so adding a block type is one registry line, not a
union-arm edit at the request-model layer.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -219,21 +246,30 @@ async def asyncio(
graph_id: str,
*,
client: AuthenticatedClient,
body: CreateScheduleRequest,
body: CreateInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Create Schedule
"""Create Information Block

Create a schedule and pre-generate monthly amortization facts spanning the period range.
`entry_template` defines the debit/credit elements used by `create-closing-entry` each period.
Generic Information Block construction entry. `block_type` selects the registered block type;
`payload` is validated against that type's creation schema at dispatch. Schedule dispatches to the
existing Schedule machinery; statement block types raise 501 (use create-report instead).

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateScheduleRequest):
body (CreateInformationBlockRequest): Generic create request — discriminator + typed-at-
dispatch payload.

``block_type`` selects the registry entry. ``payload`` is validated
against ``BlockTypeRegistryEntry.create_request_model`` (e.g.
:class:`CreateScheduleRequest` for ``block_type='schedule'``) by the
command dispatcher. Chosen over a Pydantic discriminated union on the
top-level request so adding a block type is one registry line, not a
union-arm edit at the request-model layer.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.delete_schedule_request import DeleteScheduleRequest
from ...models.delete_information_block_request import DeleteInformationBlockRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_error import OperationError
Expand All @@ -16,7 +16,7 @@
def _get_kwargs(
graph_id: str,
*,
body: DeleteScheduleRequest,
body: DeleteInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
Expand All @@ -25,7 +25,7 @@ def _get_kwargs(

_kwargs: dict[str, Any] = {
"method": "post",
"url": "/extensions/roboledger/{graph_id}/operations/delete-schedule".format(
"url": "/extensions/roboledger/{graph_id}/operations/delete-information-block".format(
graph_id=quote(str(graph_id), safe=""),
),
}
Expand Down Expand Up @@ -103,26 +103,26 @@ def sync_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: DeleteScheduleRequest,
body: DeleteInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Delete Schedule
"""Delete Information Block

Permanently delete a schedule, cascading through facts and associations. For ending a schedule early
without removing history, use truncate-schedule instead.
Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id /
block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and
surface 501.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (DeleteScheduleRequest): Delete a schedule — cascades through facts and associations.
body (DeleteInformationBlockRequest): Generic delete request — mirrors
:class:`CreateInformationBlockRequest`.

Hard deletes the Structure, all Facts tied to it, and all
Associations tied to it. This is a permanent, irreversible
operation. For ending a schedule early without removing history,
use truncate-schedule instead.
Validated against the registry entry's ``delete_request_model``.
Block types that don't support deletion raise ``NotImplementedError``.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -149,26 +149,26 @@ def sync(
graph_id: str,
*,
client: AuthenticatedClient,
body: DeleteScheduleRequest,
body: DeleteInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Delete Schedule
"""Delete Information Block

Permanently delete a schedule, cascading through facts and associations. For ending a schedule early
without removing history, use truncate-schedule instead.
Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id /
block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and
surface 501.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (DeleteScheduleRequest): Delete a schedule — cascades through facts and associations.
body (DeleteInformationBlockRequest): Generic delete request — mirrors
:class:`CreateInformationBlockRequest`.

Hard deletes the Structure, all Facts tied to it, and all
Associations tied to it. This is a permanent, irreversible
operation. For ending a schedule early without removing history,
use truncate-schedule instead.
Validated against the registry entry's ``delete_request_model``.
Block types that don't support deletion raise ``NotImplementedError``.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -190,26 +190,26 @@ async def asyncio_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
body: DeleteScheduleRequest,
body: DeleteInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
"""Delete Schedule
"""Delete Information Block

Permanently delete a schedule, cascading through facts and associations. For ending a schedule early
without removing history, use truncate-schedule instead.
Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id /
block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and
surface 501.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (DeleteScheduleRequest): Delete a schedule — cascades through facts and associations.
body (DeleteInformationBlockRequest): Generic delete request — mirrors
:class:`CreateInformationBlockRequest`.

Hard deletes the Structure, all Facts tied to it, and all
Associations tied to it. This is a permanent, irreversible
operation. For ending a schedule early without removing history,
use truncate-schedule instead.
Validated against the registry entry's ``delete_request_model``.
Block types that don't support deletion raise ``NotImplementedError``.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -234,26 +234,26 @@ async def asyncio(
graph_id: str,
*,
client: AuthenticatedClient,
body: DeleteScheduleRequest,
body: DeleteInformationBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
"""Delete Schedule
"""Delete Information Block

Permanently delete a schedule, cascading through facts and associations. For ending a schedule early
without removing history, use truncate-schedule instead.
Generic Information Block deletion entry. Returns a thin confirmation (deleted / structure_id /
block_type / name). Block types whose Structures are library-seeded cannot be deleted per tenant and
surface 501.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours
return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (DeleteScheduleRequest): Delete a schedule — cascades through facts and associations.
body (DeleteInformationBlockRequest): Generic delete request — mirrors
:class:`CreateInformationBlockRequest`.

Hard deletes the Structure, all Facts tied to it, and all
Associations tied to it. This is a permanent, irreversible
operation. For ending a schedule early without removing history,
use truncate-schedule instead.
Validated against the registry entry's ``delete_request_model``.
Block types that don't support deletion raise ``NotImplementedError``.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
Loading
Loading