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 @@ -113,16 +113,20 @@ def sync_detailed(
) -> Response[ErrorResponse | OperationEnvelopeOwnershipChangeResponse]:
"""Record Ownership Change

Record the parent buying more of a member consolidated in full from its outside owners: the share it
holds from a month (`ownership_pct`, staying 50 or more) and what it paid them in cents, with the
basis. It sets the member's share from that month and writes a draft in the consolidation entity,
dated the month's first day, that its close posts: ASC 810 makes it an equity transaction, so the
price above the book value of the capital bought goes against the investment, the share bought of
the member's results since it joined comes out of the outside owners' interest, and the difference
is the parent's equity, with no gain or loss. preview-consolidation-entries then reads the price as
part of the parent's investment and the new share from that month. Changes are recorded in order;
recording a month again replaces its draft, and a posted one is reversed first. A sale, or a change
across consolidation methods, is not supported yet.
Record the parent buying more of a member consolidated in full from its outside owners, or selling
some of it to them while keeping control: the share it holds from a month (`ownership_pct`, staying
50 or more) and the price in cents, with the basis. It sets the member's share from that month and
writes a draft in the consolidation entity, dated the month's first day, that its close posts: ASC
810 makes it an equity transaction with no gain or loss. Buying, the price above the book value of
the capital bought goes against the investment, the share bought of the member's results since it
joined comes out of the outside owners' interest, and the difference is the parent's equity.
Selling, the parent's own entry takes the proceeds against the carrying amount of the shares sold
and books its gain or loss; the draft reverses that gain, releases the parent's cost above book on
those shares, credits the outside owners their larger share of the member's results, and takes the
difference to the parent's equity. preview-consolidation-entries then reads the price paid, net of
what a sale released, as part of the parent's investment, and the new share from that month. Changes
are recorded in order; recording a month again replaces its draft, and a posted one is reversed
first. A change across consolidation methods is not supported yet.

**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.
Expand All @@ -131,9 +135,9 @@ def sync_detailed(
graph_id (str):
idempotency_key (None | str | Unset):
body (RecordOwnershipChangeRequest): The parent buys more of a member from its outside
owners, staying on the
same consolidation method: the share it holds from a month, and what it
paid. ASC 810 makes it an equity transaction, never a gain or loss.
owners, or sells some
of it to them while keeping control: the share it holds from a month, and
the price. ASC 810 makes it an equity transaction, never a gain or loss.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down Expand Up @@ -165,16 +169,20 @@ def sync(
) -> ErrorResponse | OperationEnvelopeOwnershipChangeResponse | None:
"""Record Ownership Change

Record the parent buying more of a member consolidated in full from its outside owners: the share it
holds from a month (`ownership_pct`, staying 50 or more) and what it paid them in cents, with the
basis. It sets the member's share from that month and writes a draft in the consolidation entity,
dated the month's first day, that its close posts: ASC 810 makes it an equity transaction, so the
price above the book value of the capital bought goes against the investment, the share bought of
the member's results since it joined comes out of the outside owners' interest, and the difference
is the parent's equity, with no gain or loss. preview-consolidation-entries then reads the price as
part of the parent's investment and the new share from that month. Changes are recorded in order;
recording a month again replaces its draft, and a posted one is reversed first. A sale, or a change
across consolidation methods, is not supported yet.
Record the parent buying more of a member consolidated in full from its outside owners, or selling
some of it to them while keeping control: the share it holds from a month (`ownership_pct`, staying
50 or more) and the price in cents, with the basis. It sets the member's share from that month and
writes a draft in the consolidation entity, dated the month's first day, that its close posts: ASC
810 makes it an equity transaction with no gain or loss. Buying, the price above the book value of
the capital bought goes against the investment, the share bought of the member's results since it
joined comes out of the outside owners' interest, and the difference is the parent's equity.
Selling, the parent's own entry takes the proceeds against the carrying amount of the shares sold
and books its gain or loss; the draft reverses that gain, releases the parent's cost above book on
those shares, credits the outside owners their larger share of the member's results, and takes the
difference to the parent's equity. preview-consolidation-entries then reads the price paid, net of
what a sale released, as part of the parent's investment, and the new share from that month. Changes
are recorded in order; recording a month again replaces its draft, and a posted one is reversed
first. A change across consolidation methods is not supported yet.

**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.
Expand All @@ -183,9 +191,9 @@ def sync(
graph_id (str):
idempotency_key (None | str | Unset):
body (RecordOwnershipChangeRequest): The parent buys more of a member from its outside
owners, staying on the
same consolidation method: the share it holds from a month, and what it
paid. ASC 810 makes it an equity transaction, never a gain or loss.
owners, or sells some
of it to them while keeping control: the share it holds from a month, and
the price. ASC 810 makes it an equity transaction, never a gain or loss.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -212,16 +220,20 @@ async def asyncio_detailed(
) -> Response[ErrorResponse | OperationEnvelopeOwnershipChangeResponse]:
"""Record Ownership Change

Record the parent buying more of a member consolidated in full from its outside owners: the share it
holds from a month (`ownership_pct`, staying 50 or more) and what it paid them in cents, with the
basis. It sets the member's share from that month and writes a draft in the consolidation entity,
dated the month's first day, that its close posts: ASC 810 makes it an equity transaction, so the
price above the book value of the capital bought goes against the investment, the share bought of
the member's results since it joined comes out of the outside owners' interest, and the difference
is the parent's equity, with no gain or loss. preview-consolidation-entries then reads the price as
part of the parent's investment and the new share from that month. Changes are recorded in order;
recording a month again replaces its draft, and a posted one is reversed first. A sale, or a change
across consolidation methods, is not supported yet.
Record the parent buying more of a member consolidated in full from its outside owners, or selling
some of it to them while keeping control: the share it holds from a month (`ownership_pct`, staying
50 or more) and the price in cents, with the basis. It sets the member's share from that month and
writes a draft in the consolidation entity, dated the month's first day, that its close posts: ASC
810 makes it an equity transaction with no gain or loss. Buying, the price above the book value of
the capital bought goes against the investment, the share bought of the member's results since it
joined comes out of the outside owners' interest, and the difference is the parent's equity.
Selling, the parent's own entry takes the proceeds against the carrying amount of the shares sold
and books its gain or loss; the draft reverses that gain, releases the parent's cost above book on
those shares, credits the outside owners their larger share of the member's results, and takes the
difference to the parent's equity. preview-consolidation-entries then reads the price paid, net of
what a sale released, as part of the parent's investment, and the new share from that month. Changes
are recorded in order; recording a month again replaces its draft, and a posted one is reversed
first. A change across consolidation methods is not supported yet.

**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.
Expand All @@ -230,9 +242,9 @@ async def asyncio_detailed(
graph_id (str):
idempotency_key (None | str | Unset):
body (RecordOwnershipChangeRequest): The parent buys more of a member from its outside
owners, staying on the
same consolidation method: the share it holds from a month, and what it
paid. ASC 810 makes it an equity transaction, never a gain or loss.
owners, or sells some
of it to them while keeping control: the share it holds from a month, and
the price. ASC 810 makes it an equity transaction, never a gain or loss.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down Expand Up @@ -262,16 +274,20 @@ async def asyncio(
) -> ErrorResponse | OperationEnvelopeOwnershipChangeResponse | None:
"""Record Ownership Change

Record the parent buying more of a member consolidated in full from its outside owners: the share it
holds from a month (`ownership_pct`, staying 50 or more) and what it paid them in cents, with the
basis. It sets the member's share from that month and writes a draft in the consolidation entity,
dated the month's first day, that its close posts: ASC 810 makes it an equity transaction, so the
price above the book value of the capital bought goes against the investment, the share bought of
the member's results since it joined comes out of the outside owners' interest, and the difference
is the parent's equity, with no gain or loss. preview-consolidation-entries then reads the price as
part of the parent's investment and the new share from that month. Changes are recorded in order;
recording a month again replaces its draft, and a posted one is reversed first. A sale, or a change
across consolidation methods, is not supported yet.
Record the parent buying more of a member consolidated in full from its outside owners, or selling
some of it to them while keeping control: the share it holds from a month (`ownership_pct`, staying
50 or more) and the price in cents, with the basis. It sets the member's share from that month and
writes a draft in the consolidation entity, dated the month's first day, that its close posts: ASC
810 makes it an equity transaction with no gain or loss. Buying, the price above the book value of
the capital bought goes against the investment, the share bought of the member's results since it
joined comes out of the outside owners' interest, and the difference is the parent's equity.
Selling, the parent's own entry takes the proceeds against the carrying amount of the shares sold
and books its gain or loss; the draft reverses that gain, releases the parent's cost above book on
those shares, credits the outside owners their larger share of the member's results, and takes the
difference to the parent's equity. preview-consolidation-entries then reads the price paid, net of
what a sale released, as part of the parent's investment, and the new share from that month. Changes
are recorded in order; recording a month again replaces its draft, and a posted one is reversed
first. A change across consolidation methods is not supported yet.

**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.
Expand All @@ -280,9 +296,9 @@ async def asyncio(
graph_id (str):
idempotency_key (None | str | Unset):
body (RecordOwnershipChangeRequest): The parent buys more of a member from its outside
owners, staying on the
same consolidation method: the share it holds from a month, and what it
paid. ASC 810 makes it an equity transaction, never a gain or loss.
owners, or sells some
of it to them while keeping control: the share it holds from a month, and
the price. ASC 810 makes it an equity transaction, never a gain or loss.

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand Down
2 changes: 2 additions & 0 deletions robosystems_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
GetOperationStatusResponseGetoperationstatus,
)
from .graph_capacity_response import GraphCapacityResponse
from .graph_freshness import GraphFreshness
from .graph_info import GraphInfo
from .graph_limits_response import GraphLimitsResponse
from .graph_member_list_response import GraphMemberListResponse
Expand Down Expand Up @@ -1503,6 +1504,7 @@
"GetFileInfoResponse",
"GetOperationStatusResponseGetoperationstatus",
"GraphCapacityResponse",
"GraphFreshness",
"GraphInfo",
"GraphLimitsResponse",
"GraphMemberListResponse",
Expand Down
34 changes: 34 additions & 0 deletions robosystems_client/models/financial_statement_analysis_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

if TYPE_CHECKING:
from ..models.analytical_statement_fact_row import AnalyticalStatementFactRow
from ..models.graph_freshness import GraphFreshness
from ..models.resolved_report_info import ResolvedReportInfo


Expand All @@ -28,6 +29,8 @@ class FinancialStatementAnalysisResponse:
ticker (None | str | Unset):
report_id (None | str | Unset):
resolved_report (None | ResolvedReportInfo | Unset):
graph_freshness (GraphFreshness | None | Unset): On a ledger's graph, whether the graph is current with the
books; null on shared repositories, which are not rebuilt from a ledger.
"""

graph_id: str
Expand All @@ -37,9 +40,11 @@ class FinancialStatementAnalysisResponse:
ticker: None | str | Unset = UNSET
report_id: None | str | Unset = UNSET
resolved_report: None | ResolvedReportInfo | Unset = UNSET
graph_freshness: GraphFreshness | None | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
from ..models.graph_freshness import GraphFreshness
from ..models.resolved_report_info import ResolvedReportInfo

graph_id = self.graph_id
Expand Down Expand Up @@ -73,6 +78,14 @@ def to_dict(self) -> dict[str, Any]:
else:
resolved_report = self.resolved_report

graph_freshness: dict[str, Any] | None | Unset
if isinstance(self.graph_freshness, Unset):
graph_freshness = UNSET
elif isinstance(self.graph_freshness, GraphFreshness):
graph_freshness = self.graph_freshness.to_dict()
else:
graph_freshness = self.graph_freshness

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
Expand All @@ -89,12 +102,15 @@ def to_dict(self) -> dict[str, Any]:
field_dict["report_id"] = report_id
if resolved_report is not UNSET:
field_dict["resolved_report"] = resolved_report
if graph_freshness is not UNSET:
field_dict["graph_freshness"] = graph_freshness

return field_dict

@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.analytical_statement_fact_row import AnalyticalStatementFactRow
from ..models.graph_freshness import GraphFreshness
from ..models.resolved_report_info import ResolvedReportInfo

d = dict(src_dict)
Expand Down Expand Up @@ -146,6 +162,23 @@ def _parse_resolved_report(data: object) -> None | ResolvedReportInfo | Unset:

resolved_report = _parse_resolved_report(d.pop("resolved_report", UNSET))

def _parse_graph_freshness(data: object) -> GraphFreshness | None | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
try:
if not isinstance(data, dict):
raise TypeError()
graph_freshness_type_0 = GraphFreshness.from_dict(data)

return graph_freshness_type_0
except (TypeError, ValueError, AttributeError, KeyError):
pass
return cast(GraphFreshness | None | Unset, data)

graph_freshness = _parse_graph_freshness(d.pop("graph_freshness", UNSET))

financial_statement_analysis_response = cls(
graph_id=graph_id,
statement_type=statement_type,
Expand All @@ -154,6 +187,7 @@ def _parse_resolved_report(data: object) -> None | ResolvedReportInfo | Unset:
ticker=ticker,
report_id=report_id,
resolved_report=resolved_report,
graph_freshness=graph_freshness,
)

financial_statement_analysis_response.additional_properties = d
Expand Down
Loading
Loading