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 @@ -8,7 +8,9 @@
from ...client import AuthenticatedClient, Client
from ...models.create_portfolio_block_request import CreatePortfolioBlockRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_envelope_portfolio_block_envelope import (
OperationEnvelopePortfolioBlockEnvelope,
)
from ...models.operation_error import OperationError
from ...types import UNSET, Response, Unset

Expand Down Expand Up @@ -40,9 +42,15 @@ def _get_kwargs(

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

return response_200

Expand Down Expand Up @@ -90,7 +98,9 @@ def _parse_response(

def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError
]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -105,7 +115,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: CreatePortfolioBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError
]:
"""Create Portfolio Block

Create a portfolio with optional initial positions in a single atomic envelope. Each position
Expand All @@ -130,7 +142,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | HTTPValidationError | OperationEnvelope | OperationError]
Response[Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError]
"""

kwargs = _get_kwargs(
Expand All @@ -152,7 +164,13 @@ def sync(
client: AuthenticatedClient,
body: CreatePortfolioBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
) -> (
Any
| HTTPValidationError
| OperationEnvelopePortfolioBlockEnvelope
| OperationError
| None
):
"""Create Portfolio Block

Create a portfolio with optional initial positions in a single atomic envelope. Each position
Expand All @@ -177,7 +195,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | HTTPValidationError | OperationEnvelope | OperationError
Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError
"""

return sync_detailed(
Expand All @@ -194,7 +212,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: CreatePortfolioBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError
]:
"""Create Portfolio Block

Create a portfolio with optional initial positions in a single atomic envelope. Each position
Expand All @@ -219,7 +239,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | HTTPValidationError | OperationEnvelope | OperationError]
Response[Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError]
"""

kwargs = _get_kwargs(
Expand All @@ -239,7 +259,13 @@ async def asyncio(
client: AuthenticatedClient,
body: CreatePortfolioBlockRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
) -> (
Any
| HTTPValidationError
| OperationEnvelopePortfolioBlockEnvelope
| OperationError
| None
):
"""Create Portfolio Block

Create a portfolio with optional initial positions in a single atomic envelope. Each position
Expand All @@ -264,7 +290,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | HTTPValidationError | OperationEnvelope | OperationError
Any | HTTPValidationError | OperationEnvelopePortfolioBlockEnvelope | OperationError
"""

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from ...client import AuthenticatedClient, Client
from ...models.create_security_request import CreateSecurityRequest
from ...models.http_validation_error import HTTPValidationError
from ...models.operation_envelope import OperationEnvelope
from ...models.operation_envelope_security_response import (
OperationEnvelopeSecurityResponse,
)
from ...models.operation_error import OperationError
from ...types import UNSET, Response, Unset

Expand Down Expand Up @@ -40,9 +42,11 @@ def _get_kwargs(

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

return response_200

Expand Down Expand Up @@ -90,7 +94,9 @@ def _parse_response(

def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError
]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -105,7 +111,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: CreateSecurityRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError
]:
"""Create Security

Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this
Expand All @@ -118,14 +126,19 @@ def sync_detailed(
Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateSecurityRequest):
body (CreateSecurityRequest): CQRS body for `POST /operations/create-security`.

Mints a new security as Master Data — referenced by positions, never
created inline by portfolio operations. The `terms` blob carries
instrument-specific shape (liquidation preference, strike price,
vesting) used by future waterfall-distribution modeling.

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[Any | HTTPValidationError | OperationEnvelope | OperationError]
Response[Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError]
"""

kwargs = _get_kwargs(
Expand All @@ -147,7 +160,9 @@ def sync(
client: AuthenticatedClient,
body: CreateSecurityRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
) -> (
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError | None
):
"""Create Security

Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this
Expand All @@ -160,14 +175,19 @@ def sync(
Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateSecurityRequest):
body (CreateSecurityRequest): CQRS body for `POST /operations/create-security`.

Mints a new security as Master Data — referenced by positions, never
created inline by portfolio operations. The `terms` blob carries
instrument-specific shape (liquidation preference, strike price,
vesting) used by future waterfall-distribution modeling.

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:
Any | HTTPValidationError | OperationEnvelope | OperationError
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError
"""

return sync_detailed(
Expand All @@ -184,7 +204,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: CreateSecurityRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Response[Any | HTTPValidationError | OperationEnvelope | OperationError]:
) -> Response[
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError
]:
"""Create Security

Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this
Expand All @@ -197,14 +219,19 @@ async def asyncio_detailed(
Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateSecurityRequest):
body (CreateSecurityRequest): CQRS body for `POST /operations/create-security`.

Mints a new security as Master Data — referenced by positions, never
created inline by portfolio operations. The `terms` blob carries
instrument-specific shape (liquidation preference, strike price,
vesting) used by future waterfall-distribution modeling.

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[Any | HTTPValidationError | OperationEnvelope | OperationError]
Response[Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError]
"""

kwargs = _get_kwargs(
Expand All @@ -224,7 +251,9 @@ async def asyncio(
client: AuthenticatedClient,
body: CreateSecurityRequest,
idempotency_key: None | str | Unset = UNSET,
) -> Any | HTTPValidationError | OperationEnvelope | OperationError | None:
) -> (
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError | None
):
"""Create Security

Register a security (common stock, preferred stock, warrant, convertible note, etc.) owned by this
Expand All @@ -237,14 +266,19 @@ async def asyncio(
Args:
graph_id (str):
idempotency_key (None | str | Unset):
body (CreateSecurityRequest):
body (CreateSecurityRequest): CQRS body for `POST /operations/create-security`.

Mints a new security as Master Data — referenced by positions, never
created inline by portfolio operations. The `terms` blob carries
instrument-specific shape (liquidation preference, strike price,
vesting) used by future waterfall-distribution modeling.

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:
Any | HTTPValidationError | OperationEnvelope | OperationError
Any | HTTPValidationError | OperationEnvelopeSecurityResponse | OperationError
"""

return (
Expand Down
Loading
Loading