Skip to content
Open
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 @@ -111,8 +111,8 @@ def sync_detailed(
to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes
nothing to it: the close posts nothing locally either, its drafts become shadowed expectations
compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a
choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no
connection to write to. This is the explicit operator opt-in for writing to your books of record.
choice here: it is what severing leaves, books kept in RoboSystems with no connection to write to.
This is the explicit operator opt-in for writing to your books of record.

Args:
graph_id (str):
Expand Down Expand Up @@ -157,8 +157,8 @@ def sync(
to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes
nothing to it: the close posts nothing locally either, its drafts become shadowed expectations
compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a
choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no
connection to write to. This is the explicit operator opt-in for writing to your books of record.
choice here: it is what severing leaves, books kept in RoboSystems with no connection to write to.
This is the explicit operator opt-in for writing to your books of record.

Args:
graph_id (str):
Expand Down Expand Up @@ -198,8 +198,8 @@ async def asyncio_detailed(
to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes
nothing to it: the close posts nothing locally either, its drafts become shadowed expectations
compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a
choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no
connection to write to. This is the explicit operator opt-in for writing to your books of record.
choice here: it is what severing leaves, books kept in RoboSystems with no connection to write to.
This is the explicit operator opt-in for writing to your books of record.

Args:
graph_id (str):
Expand Down Expand Up @@ -242,8 +242,8 @@ async def asyncio(
to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes
nothing to it: the close posts nothing locally either, its drafts become shadowed expectations
compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a
choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no
connection to write to. This is the explicit operator opt-in for writing to your books of record.
choice here: it is what severing leaves, books kept in RoboSystems with no connection to write to.
This is the explicit operator opt-in for writing to your books of record.

Args:
graph_id (str):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ def sync_detailed(
) -> Response[ErrorResponse | OperationEnvelopeDescribeFilingResponse]:
"""Describe Filing

How one filing is laid out: entity, periods, statements and disclosures by role, axes, and its text
— the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset `read-
text` pages from. On the SEC shared repository the filing is read from its public folder — its own
document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed by
`fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings release
and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand in for
the ticker). SEC only: a ledger files no document, and its sections read through `disclosures` and
`information-block`.
How one filing is laid out: entity, periods, statements by role and notes by name, axes, and its
text — the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset
`read-text` pages from. On the SEC shared repository the filing is read from its public folder — its
own document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed
by `fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings
release and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand
in for the ticker). SEC only: a ledger files no document, and its sections read through
`disclosures` and `information-block`.

**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 Down Expand Up @@ -161,14 +161,14 @@ def sync(
) -> ErrorResponse | OperationEnvelopeDescribeFilingResponse | None:
"""Describe Filing

How one filing is laid out: entity, periods, statements and disclosures by role, axes, and its text
— the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset `read-
text` pages from. On the SEC shared repository the filing is read from its public folder — its own
document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed by
`fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings release
and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand in for
the ticker). SEC only: a ledger files no document, and its sections read through `disclosures` and
`information-block`.
How one filing is laid out: entity, periods, statements by role and notes by name, axes, and its
text — the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset
`read-text` pages from. On the SEC shared repository the filing is read from its public folder — its
own document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed
by `fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings
release and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand
in for the ticker). SEC only: a ledger files no document, and its sections read through
`disclosures` and `information-block`.

**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 Down Expand Up @@ -204,14 +204,14 @@ async def asyncio_detailed(
) -> Response[ErrorResponse | OperationEnvelopeDescribeFilingResponse]:
"""Describe Filing

How one filing is laid out: entity, periods, statements and disclosures by role, axes, and its text
— the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset `read-
text` pages from. On the SEC shared repository the filing is read from its public folder — its own
document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed by
`fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings release
and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand in for
the ticker). SEC only: a ledger files no document, and its sections read through `disclosures` and
`information-block`.
How one filing is laid out: entity, periods, statements by role and notes by name, axes, and its
text — the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset
`read-text` pages from. On the SEC shared repository the filing is read from its public folder — its
own document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed
by `fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings
release and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand
in for the ticker). SEC only: a ledger files no document, and its sections read through
`disclosures` and `information-block`.

**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 Down Expand Up @@ -250,14 +250,14 @@ async def asyncio(
) -> ErrorResponse | OperationEnvelopeDescribeFilingResponse | None:
"""Describe Filing

How one filing is laid out: entity, periods, statements and disclosures by role, axes, and its text
— the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset `read-
text` pages from. On the SEC shared repository the filing is read from its public folder — its own
document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed by
`fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings release
and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand in for
the ticker). SEC only: a ledger files no document, and its sections read through `disclosures` and
`information-block`.
How one filing is laid out: entity, periods, statements by role and notes by name, axes, and its
text — the Items of a 10-K or 10-Q and its largest text blocks, each with the character offset
`read-text` pages from. On the SEC shared repository the filing is read from its public folder — its
own document, from any processed year — and a `ticker` picks it: the latest annual report, narrowed
by `fiscal_year` / `period_type`, or one `accession`, or with `form: 8-K` the latest earnings
release and its exhibits (`fiscal_year` is then the calendar year it was filed, and a CIK may stand
in for the ticker). SEC only: a ledger files no document, and its sections read through
`disclosures` and `information-block`.

**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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def sync_detailed(
the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to
'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed
is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of
record.
record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused.

**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 Down Expand Up @@ -175,7 +175,7 @@ def sync(
the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to
'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed
is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of
record.
record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused.

**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 Down Expand Up @@ -227,7 +227,7 @@ async def asyncio_detailed(
the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to
'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed
is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of
record.
record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused.

**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 Down Expand Up @@ -282,7 +282,7 @@ async def asyncio(
the QuickBooks ids per entry on event.metadata.qb_entry_ids and promotes the published entries to
'posted'; the event goes 'fulfilled' once no draft remains, or 'pending' on rejection (what landed
is kept). Native-policy events fast-path through with no QB write — RoboSystems is the system of
record.
record. Only the group parent's books are QuickBooks': an event on a subsidiary's books is refused.

**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 Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
from http import HTTPStatus
from typing import Any
from urllib.parse import quote

import httpx

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error_response import ErrorResponse
from ...models.graph_subscription_response import GraphSubscriptionResponse
from ...models.http_validation_error import HTTPValidationError
from ...types import Response


def _get_kwargs(
graph_id: str,
) -> dict[str, Any]:

_kwargs: dict[str, Any] = {
"method": "post",
"url": "/v1/graphs/{graph_id}/subscriptions/end-trial".format(
graph_id=quote(str(graph_id), safe=""),
),
}

return _kwargs


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
) -> ErrorResponse | GraphSubscriptionResponse | HTTPValidationError | None:
if response.status_code == 200:
response_200 = GraphSubscriptionResponse.from_dict(response.json())

return response_200

if response.status_code == 400:
response_400 = ErrorResponse.from_dict(response.json())

return response_400

if response.status_code == 401:
response_401 = ErrorResponse.from_dict(response.json())

return response_401

if response.status_code == 403:
response_403 = ErrorResponse.from_dict(response.json())

return response_403

if response.status_code == 404:
response_404 = ErrorResponse.from_dict(response.json())

return response_404

if response.status_code == 422:
response_422 = HTTPValidationError.from_dict(response.json())

return response_422

if response.status_code == 429:
response_429 = ErrorResponse.from_dict(response.json())

return response_429

if response.status_code == 500:
response_500 = ErrorResponse.from_dict(response.json())

return response_500

if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
) -> Response[ErrorResponse | GraphSubscriptionResponse | HTTPValidationError]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
headers=response.headers,
parsed=_parse_response(client=client, response=response),
)


def sync_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
) -> Response[ErrorResponse | GraphSubscriptionResponse | HTTPValidationError]:
"""End Repository Trial

End your free trial of a shared repository now and start the paid plan. The first period is charged
to the payment method on file; raw queries, the AI analyst and the plan's credits open once the
payment clears, usually within a minute. Returns 400 when the subscription is not on a trial.

Args:
graph_id (str): Repository name (e.g., 'sec')

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[ErrorResponse | GraphSubscriptionResponse | HTTPValidationError]
"""

kwargs = _get_kwargs(
graph_id=graph_id,
)

response = client.get_httpx_client().request(
**kwargs,
)

return _build_response(client=client, response=response)


def sync(
graph_id: str,
*,
client: AuthenticatedClient,
) -> ErrorResponse | GraphSubscriptionResponse | HTTPValidationError | None:
"""End Repository Trial

End your free trial of a shared repository now and start the paid plan. The first period is charged
to the payment method on file; raw queries, the AI analyst and the plan's credits open once the
payment clears, usually within a minute. Returns 400 when the subscription is not on a trial.

Args:
graph_id (str): Repository name (e.g., 'sec')

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
ErrorResponse | GraphSubscriptionResponse | HTTPValidationError
"""

return sync_detailed(
graph_id=graph_id,
client=client,
).parsed


async def asyncio_detailed(
graph_id: str,
*,
client: AuthenticatedClient,
) -> Response[ErrorResponse | GraphSubscriptionResponse | HTTPValidationError]:
"""End Repository Trial

End your free trial of a shared repository now and start the paid plan. The first period is charged
to the payment method on file; raw queries, the AI analyst and the plan's credits open once the
payment clears, usually within a minute. Returns 400 when the subscription is not on a trial.

Args:
graph_id (str): Repository name (e.g., 'sec')

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[ErrorResponse | GraphSubscriptionResponse | HTTPValidationError]
"""

kwargs = _get_kwargs(
graph_id=graph_id,
)

response = await client.get_async_httpx_client().request(**kwargs)

return _build_response(client=client, response=response)


async def asyncio(
graph_id: str,
*,
client: AuthenticatedClient,
) -> ErrorResponse | GraphSubscriptionResponse | HTTPValidationError | None:
"""End Repository Trial

End your free trial of a shared repository now and start the paid plan. The first period is charged
to the payment method on file; raw queries, the AI analyst and the plan's credits open once the
payment clears, usually within a minute. Returns 400 when the subscription is not on a trial.

Args:
graph_id (str): Repository name (e.g., 'sec')

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
ErrorResponse | GraphSubscriptionResponse | HTTPValidationError
"""

return (
await asyncio_detailed(
graph_id=graph_id,
client=client,
)
).parsed
Loading
Loading