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.504.0"
".": "0.505.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: 237
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase/increase-bd2f5c49181098955f0dbdee1511e28d4a8b9d2a16433f747defd59430bb961f.yml
openapi_spec_hash: 206afcc5ec5f6294d1f185ee808d675c
config_hash: b4f1725275c973bb61f07d1bdc2b71d5
configured_endpoints: 238
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase/increase-f0841004cde131703a9fc63fec3ae9ce98b63f0e8fe8d4326d1d75142538eda3.yml
openapi_spec_hash: a5a1e052b6e09ba465311f8adfcf9429
config_hash: 060e036e1db198f2e908364c9df7096e
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.505.0 (2026-05-01)

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

### Features

* **api:** api update ([15fbe34](https://github.com/Increase/increase-python/commit/15fbe340cb30736c7ff9e9fca7f959d479f5585a))


### Chores

* **internal:** reformat pyproject.toml ([2a79116](https://github.com/Increase/increase-python/commit/2a7911612faff9b184125af63a7b262b9f999070))

## 0.504.0 (2026-04-30)

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

- <code title="post /simulations/inbound_mail_items">client.simulations.inbound_mail_items.<a href="./src/increase/resources/simulations/inbound_mail_items.py">create</a>(\*\*<a href="src/increase/types/simulations/inbound_mail_item_create_params.py">params</a>) -> <a href="./src/increase/types/inbound_mail_item.py">InboundMailItem</a></code>

## Entities

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>

## EntityOnboardingSessions

Methods:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.504.0"
version = "0.505.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -169,7 +169,7 @@ show_error_codes = true
#
# We also exclude our `tests` as mypy doesn't always infer
# types correctly and Pyright will still catch any type errors.
exclude = ['src/increase/_files.py', '_dev/.*.py', 'tests/.*']
exclude = ["src/increase/_files.py", "_dev/.*.py", "tests/.*"]

strict_equality = true
implicit_reexport = true
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.504.0" # x-release-please-version
__version__ = "0.505.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/increase/resources/simulations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
ExportsResourceWithStreamingResponse,
AsyncExportsResourceWithStreamingResponse,
)
from .entities import (
EntitiesResource,
AsyncEntitiesResource,
EntitiesResourceWithRawResponse,
AsyncEntitiesResourceWithRawResponse,
EntitiesResourceWithStreamingResponse,
AsyncEntitiesResourceWithStreamingResponse,
)
from .programs import (
ProgramsResource,
AsyncProgramsResource,
Expand Down Expand Up @@ -456,6 +464,12 @@
"AsyncInboundMailItemsResourceWithRawResponse",
"InboundMailItemsResourceWithStreamingResponse",
"AsyncInboundMailItemsResourceWithStreamingResponse",
"EntitiesResource",
"AsyncEntitiesResource",
"EntitiesResourceWithRawResponse",
"AsyncEntitiesResourceWithRawResponse",
"EntitiesResourceWithStreamingResponse",
"AsyncEntitiesResourceWithStreamingResponse",
"EntityOnboardingSessionsResource",
"AsyncEntityOnboardingSessionsResource",
"EntityOnboardingSessionsResourceWithRawResponse",
Expand Down
224 changes: 224 additions & 0 deletions src/increase/resources/simulations/entities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal

import httpx

from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
from ...types.entity import Entity
from ...types.simulations import entity_validation_params

__all__ = ["EntitiesResource", "AsyncEntitiesResource"]


class EntitiesResource(SyncAPIResource):
@cached_property
def with_raw_response(self) -> EntitiesResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
"""
return EntitiesResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
"""
return EntitiesResourceWithStreamingResponse(self)

def validation(
self,
entity_id: str,
*,
issues: Iterable[entity_validation_params.Issue],
status: Literal["valid", "invalid", "pending"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Entity:
"""
Simulates setting an [Entity](#entities)'s validation under the managed
compliance regime. Any existing managed compliance validation on the Entity will
be marked as no longer current.

Args:
entity_id: The identifier of the Entity to set the validation on.

issues: The issues to attach to the new managed compliance validation.

status: The status to set on the new managed compliance validation.

- `valid` - The submitted data is valid.
- `invalid` - Additional information is required to validate the data.
- `pending` - The submitted data is being validated.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
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,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Entity,
)


class AsyncEntitiesResource(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
"""
return AsyncEntitiesResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
"""
return AsyncEntitiesResourceWithStreamingResponse(self)

async def validation(
self,
entity_id: str,
*,
issues: Iterable[entity_validation_params.Issue],
status: Literal["valid", "invalid", "pending"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> Entity:
"""
Simulates setting an [Entity](#entities)'s validation under the managed
compliance regime. Any existing managed compliance validation on the Entity will
be marked as no longer current.

Args:
entity_id: The identifier of the Entity to set the validation on.

issues: The issues to attach to the new managed compliance validation.

status: The status to set on the new managed compliance validation.

- `valid` - The submitted data is valid.
- `invalid` - Additional information is required to validate the data.
- `pending` - The submitted data is being validated.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds

idempotency_key: Specify a custom idempotency key for this request
"""
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),
body=await async_maybe_transform(
{
"issues": issues,
"status": status,
},
entity_validation_params.EntityValidationParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
idempotency_key=idempotency_key,
),
cast_to=Entity,
)


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

self.validation = to_raw_response_wrapper(
entities.validation,
)


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

self.validation = async_to_raw_response_wrapper(
entities.validation,
)


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

self.validation = to_streamed_response_wrapper(
entities.validation,
)


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

self.validation = async_to_streamed_response_wrapper(
entities.validation,
)
Loading