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
22 changes: 21 additions & 1 deletion robosystems_client/models/available_extension.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from collections.abc import Mapping
from typing import Any, TypeVar
from typing import Any, TypeVar, cast

from attrs import define as _attrs_define
from attrs import field as _attrs_field
Expand All @@ -17,11 +17,13 @@ class AvailableExtension:
Attributes:
name (str):
description (str):
display_name (None | str | Unset):
enabled (bool | Unset): Default: False.
"""

name: str
description: str
display_name: None | str | Unset = UNSET
enabled: bool | Unset = False
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

Expand All @@ -30,6 +32,12 @@ def to_dict(self) -> dict[str, Any]:

description = self.description

display_name: None | str | Unset
if isinstance(self.display_name, Unset):
display_name = UNSET
else:
display_name = self.display_name

enabled = self.enabled

field_dict: dict[str, Any] = {}
Expand All @@ -40,6 +48,8 @@ def to_dict(self) -> dict[str, Any]:
"description": description,
}
)
if display_name is not UNSET:
field_dict["display_name"] = display_name
if enabled is not UNSET:
field_dict["enabled"] = enabled

Expand All @@ -52,11 +62,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:

description = d.pop("description")

def _parse_display_name(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)

display_name = _parse_display_name(d.pop("display_name", UNSET))

enabled = d.pop("enabled", UNSET)

available_extension = cls(
name=name,
description=description,
display_name=display_name,
enabled=enabled,
)

Expand Down
5 changes: 3 additions & 2 deletions robosystems_client/models/event_block_envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class EventBlockEnvelope:
`adjustment`, `recognition`, `other`) or support (`control`, `approval`, `reconciliation`, `inquiry`).
status (str): Lifecycle state. One of: `captured` (raw, pre-classification), `classified` (handler ran, GL
pending), `committed` (GL entries posted), `pending` (committed but awaiting fulfillment of an obligation),
`fulfilled` (obligation discharged), `voided` (canceled — terminal), `superseded` (replaced by a corrected event
— terminal). See `UpdateEventBlockRequest.transition_to` for the valid transition graph.
`fulfilled` (obligation discharged — retractable while its ledger rows are still drafts), `voided` (canceled —
terminal), `superseded` (replaced by a corrected event — terminal). See `UpdateEventBlockRequest.transition_to`
for the valid transition graph.
occurred_at (datetime.datetime): When the event happened in the real world (UTC).
source (str): Capture source: `manual`, `system`, `schedule`, a connected provider name (e.g. `quickbooks`), or
a registered external source_name. Used for adapter routing.
Expand Down
6 changes: 4 additions & 2 deletions robosystems_client/models/update_event_block_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ class UpdateEventBlockRequest:
transition_to (None | Unset | UpdateEventBlockRequestTransitionToType0): Status transition. Valid moves depend
on current status: captured → committed | voided | superseded; classified → committed | pending | fulfilled |
voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided |
superseded. Terminal states (fulfilled, voided, superseded) accept no further transitions. Note: classified and
fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections.
superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any
status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries
instead. Note: classified and fulfilled are usually set by handlers, not by callers, but the transition is
allowed for corrections.
superseded_by_id (None | str | Unset): New event id that replaces this one. Required when
transition_to='superseded'.
description (None | str | Unset): Replacement free-text summary. Unset = unchanged; pass an empty string to
Expand Down