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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.262.0"
".": "0.263.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e25bdcd9c9cd987962f1507200b619dc7c32f91b940e5ca9110f24bdb294b14a.yml
openapi_spec_hash: 693a205b039e410d9a6b49a5b0ccc72c
config_hash: 97774f946585cecb19181a1817870d0b
configured_endpoints: 202
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7e0e17a385ddfb049d0fe4e5d05785901cf40f464c51399d7c2cd1f863696c0.yml
openapi_spec_hash: b4bca6edf466e9061a72c98207f92c6d
config_hash: a185e9a72778cc4658ea73fb3a7f1354
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.263.0 (2025-07-09)

Full Changelog: [v0.262.0...v0.263.0](https://github.com/Increase/increase-python/compare/v0.262.0...v0.263.0)

### Features

* **api:** api update ([2b55d1c](https://github.com/Increase/increase-python/commit/2b55d1cf2e50ac7462f61bbe33133df76cb94395))


### Bug Fixes

* **parsing:** correctly handle nested discriminated unions ([2c4b34f](https://github.com/Increase/increase-python/commit/2c4b34f5352fc8a3221dfd42bc5548f7f5fac84b))

## 0.262.0 (2025-07-08)

Full Changelog: [v0.261.0...v0.262.0](https://github.com/Increase/increase-python/compare/v0.261.0...v0.262.0)
Expand Down
6 changes: 6 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,12 @@ Methods:

- <code title="post /simulations/inbound_wire_transfers">client.simulations.inbound_wire_transfers.<a href="./src/increase/resources/simulations/inbound_wire_transfers.py">create</a>(\*\*<a href="src/increase/types/simulations/inbound_wire_transfer_create_params.py">params</a>) -> <a href="./src/increase/types/inbound_wire_transfer.py">InboundWireTransfer</a></code>

## WireDrawdownRequests

Methods:

- <code title="post /simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse">client.simulations.wire_drawdown_requests.<a href="./src/increase/resources/simulations/wire_drawdown_requests.py">refuse</a>(wire_drawdown_request_id) -> <a href="./src/increase/types/wire_drawdown_request.py">WireDrawdownRequest</a></code>

## InboundWireDrawdownRequests

Methods:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.262.0"
version = "0.263.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
13 changes: 8 additions & 5 deletions src/increase/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import os
import inspect
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
from datetime import date, datetime
from typing_extensions import (
List,
Unpack,
Literal,
ClassVar,
Expand Down Expand Up @@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
if type_ is None:
raise RuntimeError(f"Unexpected field type is None for {key}")

return construct_type(value=value, type_=type_)
return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))


def is_basemodel(type_: type) -> bool:
Expand Down Expand Up @@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
return cast(_T, construct_type(value=value, type_=type_))


def construct_type(*, value: object, type_: object) -> object:
def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
"""Loose coercion to the expected type with construction of nested values.

If the given value does not match the expected type then it is returned as-is.
Expand All @@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
type_ = type_.__value__ # type: ignore[unreachable]

# unwrap `Annotated[T, ...]` -> `T`
if is_annotated_type(type_):
meta: tuple[Any, ...] = get_args(type_)[1:]
if metadata is not None:
meta: tuple[Any, ...] = tuple(metadata)
elif is_annotated_type(type_):
meta = get_args(type_)[1:]
type_ = extract_type_arg(type_, 0)
else:
meta = tuple()
Expand Down
2 changes: 1 addition & 1 deletion src/increase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "increase"
__version__ = "0.262.0" # x-release-please-version
__version__ = "0.263.0" # x-release-please-version
10 changes: 10 additions & 0 deletions src/increase/resources/inbound_wire_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def list(
cursor: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN,
wire_drawdown_request_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -110,6 +111,9 @@ def list(
limit: Limit the size of the list that is returned. The default (and maximum) is 100
objects.

wire_drawdown_request_id: Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown
Request.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -134,6 +138,7 @@ def list(
"cursor": cursor,
"limit": limit,
"status": status,
"wire_drawdown_request_id": wire_drawdown_request_id,
},
inbound_wire_transfer_list_params.InboundWireTransferListParams,
),
Expand Down Expand Up @@ -262,6 +267,7 @@ def list(
cursor: str | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN,
wire_drawdown_request_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -282,6 +288,9 @@ def list(
limit: Limit the size of the list that is returned. The default (and maximum) is 100
objects.

wire_drawdown_request_id: Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown
Request.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -306,6 +315,7 @@ def list(
"cursor": cursor,
"limit": limit,
"status": status,
"wire_drawdown_request_id": wire_drawdown_request_id,
},
inbound_wire_transfer_list_params.InboundWireTransferListParams,
),
Expand Down
14 changes: 14 additions & 0 deletions src/increase/resources/simulations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@
InboundWireTransfersResourceWithStreamingResponse,
AsyncInboundWireTransfersResourceWithStreamingResponse,
)
from .wire_drawdown_requests import (
WireDrawdownRequestsResource,
AsyncWireDrawdownRequestsResource,
WireDrawdownRequestsResourceWithRawResponse,
AsyncWireDrawdownRequestsResourceWithRawResponse,
WireDrawdownRequestsResourceWithStreamingResponse,
AsyncWireDrawdownRequestsResourceWithStreamingResponse,
)
from .card_fuel_confirmations import (
CardFuelConfirmationsResource,
AsyncCardFuelConfirmationsResource,
Expand Down Expand Up @@ -328,6 +336,12 @@
"AsyncInboundWireTransfersResourceWithRawResponse",
"InboundWireTransfersResourceWithStreamingResponse",
"AsyncInboundWireTransfersResourceWithStreamingResponse",
"WireDrawdownRequestsResource",
"AsyncWireDrawdownRequestsResource",
"WireDrawdownRequestsResourceWithRawResponse",
"AsyncWireDrawdownRequestsResourceWithRawResponse",
"WireDrawdownRequestsResourceWithStreamingResponse",
"AsyncWireDrawdownRequestsResourceWithStreamingResponse",
"InboundWireDrawdownRequestsResource",
"AsyncInboundWireDrawdownRequestsResource",
"InboundWireDrawdownRequestsResourceWithRawResponse",
Expand Down
10 changes: 10 additions & 0 deletions src/increase/resources/simulations/inbound_wire_transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def create(
originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN,
originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN,
sender_reference: str | NotGiven = NOT_GIVEN,
wire_drawdown_request_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -122,6 +123,9 @@ def create(
sender_reference: The sending bank will set sender_reference in production. You can simulate any
value here.

wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is
fulfilling.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -153,6 +157,7 @@ def create(
"originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3,
"originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4,
"sender_reference": sender_reference,
"wire_drawdown_request_id": wire_drawdown_request_id,
},
inbound_wire_transfer_create_params.InboundWireTransferCreateParams,
),
Expand Down Expand Up @@ -207,6 +212,7 @@ async def create(
originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN,
originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN,
sender_reference: str | NotGiven = NOT_GIVEN,
wire_drawdown_request_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -268,6 +274,9 @@ async def create(
sender_reference: The sending bank will set sender_reference in production. You can simulate any
value here.

wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is
fulfilling.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -299,6 +308,7 @@ async def create(
"originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3,
"originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4,
"sender_reference": sender_reference,
"wire_drawdown_request_id": wire_drawdown_request_id,
},
inbound_wire_transfer_create_params.InboundWireTransferCreateParams,
),
Expand Down
32 changes: 32 additions & 0 deletions src/increase/resources/simulations/simulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@
InboundWireTransfersResourceWithStreamingResponse,
AsyncInboundWireTransfersResourceWithStreamingResponse,
)
from .wire_drawdown_requests import (
WireDrawdownRequestsResource,
AsyncWireDrawdownRequestsResource,
WireDrawdownRequestsResourceWithRawResponse,
AsyncWireDrawdownRequestsResourceWithRawResponse,
WireDrawdownRequestsResourceWithStreamingResponse,
AsyncWireDrawdownRequestsResourceWithStreamingResponse,
)
from .card_fuel_confirmations import (
CardFuelConfirmationsResource,
AsyncCardFuelConfirmationsResource,
Expand Down Expand Up @@ -293,6 +301,10 @@ def wire_transfers(self) -> WireTransfersResource:
def inbound_wire_transfers(self) -> InboundWireTransfersResource:
return InboundWireTransfersResource(self._client)

@cached_property
def wire_drawdown_requests(self) -> WireDrawdownRequestsResource:
return WireDrawdownRequestsResource(self._client)

@cached_property
def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource:
return InboundWireDrawdownRequestsResource(self._client)
Expand Down Expand Up @@ -422,6 +434,10 @@ def wire_transfers(self) -> AsyncWireTransfersResource:
def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource:
return AsyncInboundWireTransfersResource(self._client)

@cached_property
def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResource:
return AsyncWireDrawdownRequestsResource(self._client)

@cached_property
def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource:
return AsyncInboundWireDrawdownRequestsResource(self._client)
Expand Down Expand Up @@ -554,6 +570,10 @@ def wire_transfers(self) -> WireTransfersResourceWithRawResponse:
def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse:
return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers)

@cached_property
def wire_drawdown_requests(self) -> WireDrawdownRequestsResourceWithRawResponse:
return WireDrawdownRequestsResourceWithRawResponse(self._simulations.wire_drawdown_requests)

@cached_property
def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse:
return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests)
Expand Down Expand Up @@ -671,6 +691,10 @@ def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse:
def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse:
return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers)

@cached_property
def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse:
return AsyncWireDrawdownRequestsResourceWithRawResponse(self._simulations.wire_drawdown_requests)

@cached_property
def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse:
return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests)
Expand Down Expand Up @@ -788,6 +812,10 @@ def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse:
def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse:
return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers)

@cached_property
def wire_drawdown_requests(self) -> WireDrawdownRequestsResourceWithStreamingResponse:
return WireDrawdownRequestsResourceWithStreamingResponse(self._simulations.wire_drawdown_requests)

@cached_property
def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse:
return InboundWireDrawdownRequestsResourceWithStreamingResponse(
Expand Down Expand Up @@ -909,6 +937,10 @@ def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse:
def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse:
return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers)

@cached_property
def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse:
return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self._simulations.wire_drawdown_requests)

@cached_property
def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse:
return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(
Expand Down
Loading