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.510.0"
".": "0.511.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 238
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase/increase-6464f57d01144d16836903f5a060d86c8ea97b940c6093767fefde262291fa57.yml
openapi_spec_hash: 037ce7b3c2ddbd80f9d420e519ed924c
config_hash: 060e036e1db198f2e908364c9df7096e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase/increase-5753cd7d30cb546d3e2ff7408c24febe5f251f4a50017960a21746a50c9b7f67.yml
openapi_spec_hash: 0efa1759effd642f1f39107a0de6b5e7
config_hash: 20a19f4f8eba684f97ba7cdc0007f818
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.511.0 (2026-05-01)

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

### Features

* **api:** api update ([c6c0a11](https://github.com/Increase/increase-python/commit/c6c0a11ec3cc4f56c63b22289faad68591eb1b24))

## 0.510.0 (2026-05-01)

Full Changelog: [v0.509.0...v0.510.0](https://github.com/Increase/increase-python/compare/v0.509.0...v0.510.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ Methods:

Methods:

- <code title="post /simulations/entities/{entity_id}/validation">client.simulations.entities.<a href="./src/increase/resources/simulations/entities.py">validation</a>(entity_id, \*\*<a href="src/increase/types/simulations/entity_validation_params.py">params</a>) -> <a href="./src/increase/types/entity.py">Entity</a></code>
- <code title="post /simulations/entities/{entity_id}/update_validation">client.simulations.entities.<a href="./src/increase/resources/simulations/entities.py">update_validation</a>(entity_id, \*\*<a href="src/increase/types/simulations/entity_update_validation_params.py">params</a>) -> <a href="./src/increase/types/entity.py">Entity</a></code>

## EntityOnboardingSessions

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.510.0"
version = "0.511.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
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.510.0" # x-release-please-version
__version__ = "0.511.0" # x-release-please-version
79 changes: 29 additions & 50 deletions src/increase/resources/simulations/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal

import httpx

Expand All @@ -19,7 +18,7 @@
)
from ..._base_client import make_request_options
from ...types.entity import Entity
from ...types.simulations import entity_validation_params
from ...types.simulations import entity_update_validation_params

__all__ = ["EntitiesResource", "AsyncEntitiesResource"]

Expand All @@ -44,12 +43,11 @@ def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse:
"""
return EntitiesResourceWithStreamingResponse(self)

def validation(
def update_validation(
self,
entity_id: str,
*,
issues: Iterable[entity_validation_params.Issue],
status: Literal["valid", "invalid", "pending"],
issues: Iterable[entity_update_validation_params.Issue],
# 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 @@ -59,22 +57,18 @@ def validation(
idempotency_key: str | None = None,
) -> Entity:
"""
Set the status for an
Simulate updates to an
[Entity's validation](/documentation/api/entities#entity-object.validation). In
production, Know Your Customer validations
[run automatically](/documentation/entity-validation#entity-validation). While
developing, it can be helpful to override the behavior in Sandbox.
[run automatically](/documentation/entity-validation#entity-validation) for
eligible programs. While developing, use this API to simulate issues with
information submissions.

Args:
entity_id: The identifier of the Entity whose validation status to update.

issues: The validation issues to attach. Only allowed when `status` is `invalid`.

status: The validation status to set on the Entity.

- `valid` - The submitted data is valid.
- `invalid` - Additional information is required to validate the data.
- `pending` - The submitted data is being validated.
issues: The validation issues to attach. If no issues are provided, the validation
status will be set to `valid`.

extra_headers: Send extra headers

Expand All @@ -89,14 +83,8 @@ def validation(
if not entity_id:
raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}")
return self._post(
path_template("/simulations/entities/{entity_id}/validation", entity_id=entity_id),
body=maybe_transform(
{
"issues": issues,
"status": status,
},
entity_validation_params.EntityValidationParams,
),
path_template("/simulations/entities/{entity_id}/update_validation", entity_id=entity_id),
body=maybe_transform({"issues": issues}, entity_update_validation_params.EntityUpdateValidationParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -128,12 +116,11 @@ def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse:
"""
return AsyncEntitiesResourceWithStreamingResponse(self)

async def validation(
async def update_validation(
self,
entity_id: str,
*,
issues: Iterable[entity_validation_params.Issue],
status: Literal["valid", "invalid", "pending"],
issues: Iterable[entity_update_validation_params.Issue],
# 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 @@ -143,22 +130,18 @@ async def validation(
idempotency_key: str | None = None,
) -> Entity:
"""
Set the status for an
Simulate updates to an
[Entity's validation](/documentation/api/entities#entity-object.validation). In
production, Know Your Customer validations
[run automatically](/documentation/entity-validation#entity-validation). While
developing, it can be helpful to override the behavior in Sandbox.
[run automatically](/documentation/entity-validation#entity-validation) for
eligible programs. While developing, use this API to simulate issues with
information submissions.

Args:
entity_id: The identifier of the Entity whose validation status to update.

issues: The validation issues to attach. Only allowed when `status` is `invalid`.

status: The validation status to set on the Entity.

- `valid` - The submitted data is valid.
- `invalid` - Additional information is required to validate the data.
- `pending` - The submitted data is being validated.
issues: The validation issues to attach. If no issues are provided, the validation
status will be set to `valid`.

extra_headers: Send extra headers

Expand All @@ -173,13 +156,9 @@ async def validation(
if not entity_id:
raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}")
return await self._post(
path_template("/simulations/entities/{entity_id}/validation", entity_id=entity_id),
path_template("/simulations/entities/{entity_id}/update_validation", entity_id=entity_id),
body=await async_maybe_transform(
{
"issues": issues,
"status": status,
},
entity_validation_params.EntityValidationParams,
{"issues": issues}, entity_update_validation_params.EntityUpdateValidationParams
),
options=make_request_options(
extra_headers=extra_headers,
Expand All @@ -196,33 +175,33 @@ class EntitiesResourceWithRawResponse:
def __init__(self, entities: EntitiesResource) -> None:
self._entities = entities

self.validation = to_raw_response_wrapper(
entities.validation,
self.update_validation = to_raw_response_wrapper(
entities.update_validation,
)


class AsyncEntitiesResourceWithRawResponse:
def __init__(self, entities: AsyncEntitiesResource) -> None:
self._entities = entities

self.validation = async_to_raw_response_wrapper(
entities.validation,
self.update_validation = async_to_raw_response_wrapper(
entities.update_validation,
)


class EntitiesResourceWithStreamingResponse:
def __init__(self, entities: EntitiesResource) -> None:
self._entities = entities

self.validation = to_streamed_response_wrapper(
entities.validation,
self.update_validation = to_streamed_response_wrapper(
entities.update_validation,
)


class AsyncEntitiesResourceWithStreamingResponse:
def __init__(self, entities: AsyncEntitiesResource) -> None:
self._entities = entities

self.validation = async_to_streamed_response_wrapper(
entities.validation,
self.update_validation = async_to_streamed_response_wrapper(
entities.update_validation,
)
2 changes: 1 addition & 1 deletion src/increase/types/simulations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from .export_create_params import ExportCreateParams as ExportCreateParams
from .program_create_params import ProgramCreateParams as ProgramCreateParams
from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams
from .entity_validation_params import EntityValidationParams as EntityValidationParams
from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams
from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams
from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams
Expand All @@ -18,6 +17,7 @@
from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams
from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams
from .check_deposit_adjustment_params import CheckDepositAdjustmentParams as CheckDepositAdjustmentParams
from .entity_update_validation_params import EntityUpdateValidationParams as EntityUpdateValidationParams
from .inbound_mail_item_create_params import InboundMailItemCreateParams as InboundMailItemCreateParams
from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams
from .card_authentication_create_params import CardAuthenticationCreateParams as CardAuthenticationCreateParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

__all__ = ["EntityValidationParams", "Issue"]
__all__ = ["EntityUpdateValidationParams", "Issue"]


class EntityValidationParams(TypedDict, total=False):
class EntityUpdateValidationParams(TypedDict, total=False):
issues: Required[Iterable[Issue]]
"""The validation issues to attach. Only allowed when `status` is `invalid`."""
"""The validation issues to attach.

status: Required[Literal["valid", "invalid", "pending"]]
"""The validation status to set on the Entity.

- `valid` - The submitted data is valid.
- `invalid` - Additional information is required to validate the data.
- `pending` - The submitted data is being validated.
If no issues are provided, the validation status will be set to `valid`.
"""


Expand Down
40 changes: 16 additions & 24 deletions tests/api_resources/simulations/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@ class TestEntities:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])

@parametrize
def test_method_validation(self, client: Increase) -> None:
entity = client.simulations.entities.validation(
def test_method_update_validation(self, client: Increase) -> None:
entity = client.simulations.entities.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)
assert_matches_type(Entity, entity, path=["response"])

@parametrize
def test_raw_response_validation(self, client: Increase) -> None:
response = client.simulations.entities.with_raw_response.validation(
def test_raw_response_update_validation(self, client: Increase) -> None:
response = client.simulations.entities.with_raw_response.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)

assert response.is_closed is True
Expand All @@ -40,11 +38,10 @@ def test_raw_response_validation(self, client: Increase) -> None:
assert_matches_type(Entity, entity, path=["response"])

@parametrize
def test_streaming_response_validation(self, client: Increase) -> None:
with client.simulations.entities.with_streaming_response.validation(
def test_streaming_response_update_validation(self, client: Increase) -> None:
with client.simulations.entities.with_streaming_response.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -55,12 +52,11 @@ def test_streaming_response_validation(self, client: Increase) -> None:
assert cast(Any, response.is_closed) is True

@parametrize
def test_path_params_validation(self, client: Increase) -> None:
def test_path_params_update_validation(self, client: Increase) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"):
client.simulations.entities.with_raw_response.validation(
client.simulations.entities.with_raw_response.update_validation(
entity_id="",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)


Expand All @@ -70,20 +66,18 @@ class TestAsyncEntities:
)

@parametrize
async def test_method_validation(self, async_client: AsyncIncrease) -> None:
entity = await async_client.simulations.entities.validation(
async def test_method_update_validation(self, async_client: AsyncIncrease) -> None:
entity = await async_client.simulations.entities.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)
assert_matches_type(Entity, entity, path=["response"])

@parametrize
async def test_raw_response_validation(self, async_client: AsyncIncrease) -> None:
response = await async_client.simulations.entities.with_raw_response.validation(
async def test_raw_response_update_validation(self, async_client: AsyncIncrease) -> None:
response = await async_client.simulations.entities.with_raw_response.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)

assert response.is_closed is True
Expand All @@ -92,11 +86,10 @@ async def test_raw_response_validation(self, async_client: AsyncIncrease) -> Non
assert_matches_type(Entity, entity, path=["response"])

@parametrize
async def test_streaming_response_validation(self, async_client: AsyncIncrease) -> None:
async with async_client.simulations.entities.with_streaming_response.validation(
async def test_streaming_response_update_validation(self, async_client: AsyncIncrease) -> None:
async with async_client.simulations.entities.with_streaming_response.update_validation(
entity_id="entity_n8y8tnk2p9339ti393yi",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -107,10 +100,9 @@ async def test_streaming_response_validation(self, async_client: AsyncIncrease)
assert cast(Any, response.is_closed) is True

@parametrize
async def test_path_params_validation(self, async_client: AsyncIncrease) -> None:
async def test_path_params_update_validation(self, async_client: AsyncIncrease) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"):
await async_client.simulations.entities.with_raw_response.validation(
await async_client.simulations.entities.with_raw_response.update_validation(
entity_id="",
issues=[{"category": "entity_tax_identifier"}],
status="invalid",
)