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.324.0"
".": "0.325.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 217
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94d559b14c3611637885b103aa75adb26dff816369b1fdb758440e288d1ea83b.yml
openapi_spec_hash: 4e257b20b410526bc54fd6ced9db3a5d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0099e03e7fa522327e05de8b00e0d0f8873c9267bbb39a29d22b2aa6bb571d16.yml
openapi_spec_hash: 8691ea0b11ed2570986fadb52e6b87db
config_hash: e1885b38eded054b77308a024c5d80cc
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.325.0 (2025-09-12)

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

### Features

* **api:** api update ([4d74fb5](https://github.com/Increase/increase-python/commit/4d74fb50da7ea6b50e77f102ca70797c8dab6a4a))


### Chores

* **tests:** simplify `get_platform` test ([c5dd673](https://github.com/Increase/increase-python/commit/c5dd673abe2362ddd84632c2ba047d8b36d728a1))

## 0.324.0 (2025-09-09)

Full Changelog: [v0.323.0...v0.324.0](https://github.com/Increase/increase-python/compare/v0.323.0...v0.324.0)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.324.0"
version = "0.325.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -56,7 +56,6 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0",
"pytest-xdist>=3.6.1",
]

Expand Down
1 change: 0 additions & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ multidict==6.4.4
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
nest-asyncio==1.6.0
nodeenv==1.8.0
# via pyright
nox==2023.4.22
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.324.0" # x-release-please-version
__version__ = "0.325.0" # x-release-please-version
16 changes: 16 additions & 0 deletions src/increase/types/pending_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"SourceCardPushTransferInstruction",
"SourceCheckDepositInstruction",
"SourceCheckTransferInstruction",
"SourceFedNowTransferInstruction",
"SourceInboundFundsHold",
"SourceInboundWireTransferReversal",
"SourceRealTimePaymentsTransferInstruction",
Expand Down Expand Up @@ -662,6 +663,11 @@ class SourceCheckTransferInstruction(BaseModel):
"""The identifier of the Check Transfer that led to this Pending Transaction."""


class SourceFedNowTransferInstruction(BaseModel):
transfer_id: str
"""The identifier of the FedNow Transfer that led to this Pending Transaction."""


class SourceInboundFundsHold(BaseModel):
amount: int
"""The held amount in the minor unit of the account's currency.
Expand Down Expand Up @@ -794,6 +800,7 @@ class Source(BaseModel):
"card_authorization",
"check_deposit_instruction",
"check_transfer_instruction",
"fed_now_transfer_instruction",
"inbound_funds_hold",
"user_initiated_hold",
"real_time_payments_transfer_instruction",
Expand All @@ -818,6 +825,8 @@ class Source(BaseModel):
the `check_deposit_instruction` object.
- `check_transfer_instruction` - Check Transfer Instruction: details will be
under the `check_transfer_instruction` object.
- `fed_now_transfer_instruction` - FedNow Transfer Instruction: details will be
under the `fed_now_transfer_instruction` object.
- `inbound_funds_hold` - Inbound Funds Hold: details will be under the
`inbound_funds_hold` object.
- `user_initiated_hold` - User Initiated Hold: details will be under the
Expand Down Expand Up @@ -851,6 +860,13 @@ class Source(BaseModel):
equal to `check_transfer_instruction`.
"""

fed_now_transfer_instruction: Optional[SourceFedNowTransferInstruction] = None
"""A FedNow Transfer Instruction object.

This field will be present in the JSON response if and only if `category` is
equal to `fed_now_transfer_instruction`.
"""

inbound_funds_hold: Optional[SourceInboundFundsHold] = None
"""An Inbound Funds Hold object.

Expand Down
1 change: 1 addition & 0 deletions src/increase/types/pending_transaction_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class PendingTransactionListParams(TypedDict, total=False):
"card_authorization",
"check_deposit_instruction",
"check_transfer_instruction",
"fed_now_transfer_instruction",
"inbound_funds_hold",
"user_initiated_hold",
"real_time_payments_transfer_instruction",
Expand Down
18 changes: 18 additions & 0 deletions src/increase/types/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"SourceCheckDepositAcceptance",
"SourceCheckDepositReturn",
"SourceCheckTransferDeposit",
"SourceFedNowTransferAcknowledgement",
"SourceFeePayment",
"SourceInboundACHTransfer",
"SourceInboundACHTransferAddenda",
Expand Down Expand Up @@ -1869,6 +1870,11 @@ class SourceCheckTransferDeposit(BaseModel):
"""


class SourceFedNowTransferAcknowledgement(BaseModel):
transfer_id: str
"""The identifier of the FedNow Transfer that led to this Transaction."""


class SourceFeePayment(BaseModel):
amount: int
"""The amount in the minor unit of the transaction's currency.
Expand Down Expand Up @@ -2434,6 +2440,7 @@ class Source(BaseModel):
"card_revenue_payment",
"check_deposit_acceptance",
"check_deposit_return",
"fed_now_transfer_acknowledgement",
"check_transfer_deposit",
"fee_payment",
"inbound_ach_transfer",
Expand Down Expand Up @@ -2485,6 +2492,8 @@ class Source(BaseModel):
the `check_deposit_acceptance` object.
- `check_deposit_return` - Check Deposit Return: details will be under the
`check_deposit_return` object.
- `fed_now_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details
will be under the `fed_now_transfer_acknowledgement` object.
- `check_transfer_deposit` - Check Transfer Deposit: details will be under the
`check_transfer_deposit` object.
- `fee_payment` - Fee Payment: details will be under the `fee_payment` object.
Expand Down Expand Up @@ -2558,6 +2567,15 @@ class Source(BaseModel):
types of checks are not pre-registered.
"""

fed_now_transfer_acknowledgement: Optional[SourceFedNowTransferAcknowledgement] = None
"""A FedNow Transfer Acknowledgement object.

This field will be present in the JSON response if and only if `category` is
equal to `fed_now_transfer_acknowledgement`. A FedNow Transfer Acknowledgement
is created when a FedNow Transfer sent from Increase is acknowledged by the
receiving bank.
"""

fee_payment: Optional[SourceFeePayment] = None
"""A Fee Payment object.

Expand Down
1 change: 1 addition & 0 deletions src/increase/types/transaction_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class TransactionListParams(TypedDict, total=False):
"card_revenue_payment",
"check_deposit_acceptance",
"check_deposit_return",
"fed_now_transfer_acknowledgement",
"check_transfer_deposit",
"fee_payment",
"inbound_ach_transfer",
Expand Down
53 changes: 6 additions & 47 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
import os
import sys
import json
import time
import asyncio
import inspect
import subprocess
import tracemalloc
from typing import Any, Union, cast
from textwrap import dedent
from unittest import mock
from typing_extensions import Literal

Expand All @@ -23,14 +20,17 @@

from increase import Increase, AsyncIncrease, APIResponseValidationError
from increase._types import Omit
from increase._utils import asyncify
from increase._models import BaseModel, FinalRequestOptions
from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError
from increase._base_client import (
DEFAULT_TIMEOUT,
HTTPX_DEFAULT_TIMEOUT,
BaseClient,
OtherPlatform,
DefaultHttpxClient,
DefaultAsyncHttpxClient,
get_platform,
make_request_options,
)

Expand Down Expand Up @@ -1719,50 +1719,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

assert response.http_request.headers.get("x-stainless-retry-count") == "42"

def test_get_platform(self) -> None:
# A previous implementation of asyncify could leave threads unterminated when
# used with nest_asyncio.
#
# Since nest_asyncio.apply() is global and cannot be un-applied, this
# test is run in a separate process to avoid affecting other tests.
test_code = dedent("""
import asyncio
import nest_asyncio
import threading

from increase._utils import asyncify
from increase._base_client import get_platform

async def test_main() -> None:
result = await asyncify(get_platform)()
print(result)
for thread in threading.enumerate():
print(thread.name)

nest_asyncio.apply()
asyncio.run(test_main())
""")
with subprocess.Popen(
[sys.executable, "-c", test_code],
text=True,
) as process:
timeout = 10 # seconds

start_time = time.monotonic()
while True:
return_code = process.poll()
if return_code is not None:
if return_code != 0:
raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code")

# success
break

if time.monotonic() - start_time > timeout:
process.kill()
raise AssertionError("calling get_platform using asyncify resulted in a hung process")

time.sleep(0.1)
async def test_get_platform(self) -> None:
platform = await asyncify(get_platform)()
assert isinstance(platform, (str, OtherPlatform))

async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
Expand Down