diff --git a/.stats.yml b/.stats.yml index 97e2fbfc3..4bb27f8b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 131 +configured_endpoints: 133 diff --git a/api.md b/api.md index a78c2d087..7c74f39ea 100644 --- a/api.md +++ b/api.md @@ -388,9 +388,16 @@ Methods: ## SupplementalDocuments +Types: + +```python +from increase.types.entities import SupplementalDocument +``` + Methods: - client.entities.supplemental_documents.create(entity_id, \*\*params) -> Entity +- client.entities.supplemental_documents.list(\*\*params) -> SyncPage[SupplementalDocument] # InboundWireDrawdownRequests @@ -599,6 +606,12 @@ Methods: - client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit - client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit +## Programs + +Methods: + +- client.simulations.programs.create(\*\*params) -> Program + ## InboundWireDrawdownRequests Methods: diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 2cc8772d5..7ac5a7265 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -9,7 +9,6 @@ from typing import ( Any, Dict, - List, Type, Union, Generic, @@ -45,6 +44,7 @@ Timeout, NoneType, NotGiven, + ResponseT, Transport, AnyMapping, ProxiesTypes, @@ -61,6 +61,7 @@ validate_type, construct_type, ) +from ._streaming import Stream, AsyncStream from ._base_exceptions import ( APIStatusError, APITimeoutError, @@ -73,128 +74,23 @@ AsyncPageT = TypeVar("AsyncPageT", bound="BaseAsyncPage[Any]") -ResponseT = TypeVar( - "ResponseT", - bound=Union[ - str, - None, - BaseModel, - List[Any], - Dict[str, Any], - httpx.Response, - UnknownResponse, - ModelBuilderProtocol, - ], -) - _T = TypeVar("_T") _T_co = TypeVar("_T_co", covariant=True) +_StreamT = TypeVar("_StreamT", bound=Stream[Any]) +_AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any]) + + DEFAULT_TIMEOUT = Timeout(timeout=60.0, connect=5.0) DEFAULT_MAX_RETRIES = 2 DEFAULT_LIMITS = Limits(max_connections=100, max_keepalive_connections=20) -class StopStreaming(Exception): - """Raised internally when processing of a streamed response should be stopped.""" - - -class Stream(Generic[ResponseT]): - response: httpx.Response - - def __init__( - self, - *, - cast_to: type[ResponseT], - response: httpx.Response, - client: SyncAPIClient, - ) -> None: - self.response = response - self._cast_to = cast_to - self._client = client - self._iterator = self.__iter() - - def __next__(self) -> ResponseT: - return self._iterator.__next__() - - def __iter__(self) -> Iterator[ResponseT]: - for item in self._iterator: - yield item - - def __iter(self) -> Iterator[ResponseT]: - cast_to = self._cast_to - response = self.response - process_line = self._client._process_stream_line - process_data = self._client._process_response_data - - awaiting_ping_data = False - for raw_line in response.iter_lines(): - if not raw_line or raw_line == "\n": - continue - - if raw_line.startswith("event: ping"): - awaiting_ping_data = True - continue - if awaiting_ping_data: - awaiting_ping_data = False - continue - - try: - line = process_line(raw_line) - except StopStreaming: - # we are done! - break - - yield process_data(data=json.loads(line), cast_to=cast_to, response=response) - - -class AsyncStream(Generic[ResponseT]): - response: httpx.Response - - def __init__( - self, - *, - cast_to: type[ResponseT], - response: httpx.Response, - client: AsyncAPIClient, - ) -> None: - self.response = response - self._cast_to = cast_to - self._client = client - self._iterator = self.__iter() - - async def __anext__(self) -> ResponseT: - return await self._iterator.__anext__() - - async def __aiter__(self) -> AsyncIterator[ResponseT]: - async for item in self._iterator: - yield item - - async def __iter(self) -> AsyncIterator[ResponseT]: - cast_to = self._cast_to - response = self.response - process_line = self._client._process_stream_line - process_data = self._client._process_response_data - - awaiting_ping_data = False - async for raw_line in response.aiter_lines(): - if not raw_line or raw_line == "\n": - continue - - if raw_line.startswith("event: ping"): - awaiting_ping_data = True - continue - if awaiting_ping_data: - awaiting_ping_data = False - continue - - try: - line = process_line(raw_line) - except StopStreaming: - # we are done! - break - - yield process_data(data=json.loads(line), cast_to=cast_to, response=response) +class MissingStreamClassError(TypeError): + def __init__(self) -> None: + super().__init__( + "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `increase._streaming` for reference", + ) class PageInfo: @@ -635,16 +531,6 @@ def _process_response_data( return cast(ResponseT, construct_type(type_=cast_to, value=data)) - def _process_stream_line(self, contents: str) -> str: - """Pre-process an indiviudal line from a streaming response""" - if contents.startswith("data: [DONE]"): - raise StopStreaming() - - if contents.startswith("data: "): - return contents[6:] - - return contents - @property def qs(self) -> Querystring: return Querystring() @@ -756,6 +642,7 @@ def _idempotency_key(self) -> str: class SyncAPIClient(BaseClient): _client: httpx.Client + _default_stream_cls: type[Stream[Any]] | None = None def __init__( self, @@ -798,7 +685,8 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[True], - ) -> Stream[ResponseT]: + stream_cls: Type[_StreamT], + ) -> _StreamT: ... @overload @@ -820,7 +708,8 @@ def request( remaining_retries: Optional[int] = None, *, stream: bool = False, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: Type[_StreamT] | None = None, + ) -> ResponseT | _StreamT: ... def request( @@ -830,11 +719,13 @@ def request( remaining_retries: Optional[int] = None, *, stream: bool = False, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: type[_StreamT] | None = None, + ) -> ResponseT | _StreamT: return self._request( cast_to=cast_to, options=options, stream=stream, + stream_cls=stream_cls, remaining_retries=remaining_retries, ) @@ -845,7 +736,8 @@ def _request( options: FinalRequestOptions, remaining_retries: int | None, stream: bool, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: type[_StreamT] | None, + ) -> ResponseT | _StreamT: retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -854,7 +746,14 @@ def _request( response.raise_for_status() except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code if retries > 0 and self._should_retry(err.response): - return self._retry_request(options, cast_to, retries, err.response.headers, stream=stream) + return self._retry_request( + options, + cast_to, + retries, + err.response.headers, + stream=stream, + stream_cls=stream_cls, + ) # If the response is streamed then we need to explicitly read the response # to completion before attempting to access the response text. @@ -862,15 +761,18 @@ def _request( raise self._make_status_error_from_response(request, err.response) from None except httpx.TimeoutException as err: if retries > 0: - return self._retry_request(options, cast_to, retries, stream=stream) + return self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls) raise APITimeoutError(request=request) from err except Exception as err: if retries > 0: - return self._retry_request(options, cast_to, retries, stream=stream) + return self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls) raise APIConnectionError(request=request) from err if stream: - return Stream(cast_to=cast_to, response=response, client=self) + stream_cls = stream_cls or cast("type[_StreamT] | None", self._default_stream_cls) + if stream_cls is None: + raise MissingStreamClassError() + return stream_cls(cast_to=cast_to, response=response, client=self) try: rsp = self._process_response(cast_to=cast_to, options=options, response=response) @@ -887,7 +789,8 @@ def _retry_request( response_headers: Optional[httpx.Headers] = None, *, stream: bool, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: type[_StreamT] | None, + ) -> ResponseT | _StreamT: remaining = remaining_retries - 1 timeout = self._calculate_retry_timeout(remaining, options, response_headers) @@ -900,6 +803,7 @@ def _retry_request( cast_to=cast_to, remaining_retries=remaining, stream=stream, + stream_cls=stream_cls, ) def _request_api_list( @@ -951,7 +855,8 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[True], - ) -> Stream[ResponseT]: + stream_cls: type[_StreamT], + ) -> _StreamT: ... @overload @@ -964,7 +869,8 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: type[_StreamT] | None = None, + ) -> ResponseT | _StreamT: ... def post( @@ -976,9 +882,10 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool = False, - ) -> ResponseT | Stream[ResponseT]: + stream_cls: type[_StreamT] | None = None, + ) -> ResponseT | _StreamT: opts = FinalRequestOptions.construct(method="post", url=path, json_data=body, files=files, **options) - return cast(ResponseT, self.request(cast_to, opts, stream=stream)) + return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) def patch( self, @@ -1030,6 +937,7 @@ def get_api_list( class AsyncAPIClient(BaseClient): _client: httpx.AsyncClient + _default_stream_cls: type[AsyncStream[Any]] | None = None def __init__( self, @@ -1082,8 +990,9 @@ async def request( options: FinalRequestOptions, *, stream: Literal[True], + stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> AsyncStream[ResponseT]: + ) -> _AsyncStreamT: ... @overload @@ -1093,8 +1002,9 @@ async def request( options: FinalRequestOptions, *, stream: bool, + stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | AsyncStream[ResponseT]: + ) -> ResponseT | _AsyncStreamT: ... async def request( @@ -1103,12 +1013,14 @@ async def request( options: FinalRequestOptions, *, stream: bool = False, + stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | AsyncStream[ResponseT]: + ) -> ResponseT | _AsyncStreamT: return await self._request( cast_to=cast_to, options=options, stream=stream, + stream_cls=stream_cls, remaining_retries=remaining_retries, ) @@ -1118,8 +1030,9 @@ async def _request( options: FinalRequestOptions, *, stream: bool, + stream_cls: type[_AsyncStreamT] | None, remaining_retries: int | None, - ) -> ResponseT | AsyncStream[ResponseT]: + ) -> ResponseT | _AsyncStreamT: retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1128,7 +1041,14 @@ async def _request( response.raise_for_status() except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code if retries > 0 and self._should_retry(err.response): - return await self._retry_request(options, cast_to, retries, err.response.headers, stream=stream) + return await self._retry_request( + options, + cast_to, + retries, + err.response.headers, + stream=stream, + stream_cls=stream_cls, + ) # If the response is streamed then we need to explicitly read the response # to completion before attempting to access the response text. @@ -1136,7 +1056,7 @@ async def _request( raise self._make_status_error_from_response(request, err.response) from None except httpx.ConnectTimeout as err: if retries > 0: - return await self._retry_request(options, cast_to, retries, stream=stream) + return await self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls) raise APITimeoutError(request=request) from err except httpx.ReadTimeout as err: # We explicitly do not retry on ReadTimeout errors as this means @@ -1146,15 +1066,18 @@ async def _request( raise except httpx.TimeoutException as err: if retries > 0: - return await self._retry_request(options, cast_to, retries, stream=stream) + return await self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls) raise APITimeoutError(request=request) from err except Exception as err: if retries > 0: - return await self._retry_request(options, cast_to, retries, stream=stream) + return await self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls) raise APIConnectionError(request=request) from err if stream: - return AsyncStream(cast_to=cast_to, response=response, client=self) + stream_cls = stream_cls or cast("type[_AsyncStreamT] | None", self._default_stream_cls) + if stream_cls is None: + raise MissingStreamClassError() + return stream_cls(cast_to=cast_to, response=response, client=self) try: rsp = self._process_response(cast_to=cast_to, options=options, response=response) @@ -1171,7 +1094,8 @@ async def _retry_request( response_headers: Optional[httpx.Headers] = None, *, stream: bool, - ) -> ResponseT | AsyncStream[ResponseT]: + stream_cls: type[_AsyncStreamT] | None, + ) -> ResponseT | _AsyncStreamT: remaining = remaining_retries - 1 timeout = self._calculate_retry_timeout(remaining, options, response_headers) @@ -1182,6 +1106,7 @@ async def _retry_request( cast_to=cast_to, remaining_retries=remaining, stream=stream, + stream_cls=stream_cls, ) def _request_api_list( @@ -1225,7 +1150,8 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[True], - ) -> AsyncStream[ResponseT]: + stream_cls: type[_AsyncStreamT], + ) -> _AsyncStreamT: ... @overload @@ -1238,7 +1164,8 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool, - ) -> ResponseT | AsyncStream[ResponseT]: + stream_cls: type[_AsyncStreamT] | None = None, + ) -> ResponseT | _AsyncStreamT: ... async def post( @@ -1250,9 +1177,10 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool = False, - ) -> ResponseT | AsyncStream[ResponseT]: + stream_cls: type[_AsyncStreamT] | None = None, + ) -> ResponseT | _AsyncStreamT: opts = FinalRequestOptions.construct(method="post", url=path, json_data=body, files=files, **options) - return await self.request(cast_to, opts, stream=stream) + return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) async def patch( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index d86d18ecf..2cc6c0266 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -21,10 +21,15 @@ ) from ._utils import is_mapping from ._version import __version__ -from ._base_client import DEFAULT_LIMITS, DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES -from ._base_client import Stream as Stream -from ._base_client import AsyncStream as AsyncStream -from ._base_client import SyncAPIClient, AsyncAPIClient +from ._streaming import Stream as Stream +from ._streaming import AsyncStream as AsyncStream +from ._base_client import ( + DEFAULT_LIMITS, + DEFAULT_TIMEOUT, + DEFAULT_MAX_RETRIES, + SyncAPIClient, + AsyncAPIClient, +) __all__ = [ "ENVIRONMENTS", diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py new file mode 100644 index 000000000..18749b536 --- /dev/null +++ b/src/increase/_streaming.py @@ -0,0 +1,204 @@ +# Note: initially copied from https://github.com/florimondmanca/httpx-sse/blob/master/src/httpx_sse/_decoders.py +from __future__ import annotations + +import json +from typing import TYPE_CHECKING, Any, Generic, Iterator, AsyncIterator + +import httpx + +from ._types import ResponseT + +if TYPE_CHECKING: + from ._base_client import SyncAPIClient, AsyncAPIClient + + +class Stream(Generic[ResponseT]): + """Provides the core interface to iterate over a synchronous stream response.""" + + response: httpx.Response + + def __init__( + self, + *, + cast_to: type[ResponseT], + response: httpx.Response, + client: SyncAPIClient, + ) -> None: + self.response = response + self._cast_to = cast_to + self._client = client + self._decoder = SSEDecoder() + self._iterator = self.__stream__() + + def __next__(self) -> ResponseT: + return self._iterator.__next__() + + def __iter__(self) -> Iterator[ResponseT]: + for item in self._iterator: + yield item + + def _iter_events(self) -> Iterator[ServerSentEvent]: + yield from self._decoder.iter(self.response.iter_lines()) + + def __stream__(self) -> Iterator[ResponseT]: + cast_to = self._cast_to + response = self.response + process_data = self._client._process_response_data + + for sse in self._iter_events(): + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + + +class AsyncStream(Generic[ResponseT]): + """Provides the core interface to iterate over an asynchronous stream response.""" + + response: httpx.Response + + def __init__( + self, + *, + cast_to: type[ResponseT], + response: httpx.Response, + client: AsyncAPIClient, + ) -> None: + self.response = response + self._cast_to = cast_to + self._client = client + self._decoder = SSEDecoder() + self._iterator = self.__stream__() + + async def __anext__(self) -> ResponseT: + return await self._iterator.__anext__() + + async def __aiter__(self) -> AsyncIterator[ResponseT]: + async for item in self._iterator: + yield item + + async def _iter_events(self) -> AsyncIterator[ServerSentEvent]: + async for sse in self._decoder.aiter(self.response.aiter_lines()): + yield sse + + async def __stream__(self) -> AsyncIterator[ResponseT]: + cast_to = self._cast_to + response = self.response + process_data = self._client._process_response_data + + async for sse in self._iter_events(): + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + + +class ServerSentEvent: + def __init__( + self, + *, + event: str | None = None, + data: str | None = None, + id: str | None = None, + retry: int | None = None, + ) -> None: + if data is None: + data = "" + + self._id = id + self._data = data + self._event = event or None + self._retry = retry + + @property + def event(self) -> str | None: + return self._event + + @property + def id(self) -> str | None: + return self._id + + @property + def retry(self) -> int | None: + return self._retry + + @property + def data(self) -> str: + return self._data + + def json(self) -> Any: + return json.loads(self.data) + + def __repr__(self) -> str: + return f"ServerSentEvent(event={self.event}, data={self.data}, id={self.id}, retry={self.retry})" + + +class SSEDecoder: + _data: list[str] + _event: str | None + _retry: int | None + _last_event_id: str | None + + def __init__(self) -> None: + self._event = None + self._data = [] + self._last_event_id = None + self._retry = None + + def iter(self, iterator: Iterator[str]) -> Iterator[ServerSentEvent]: + """Given an iterator that yields lines, iterate over it & yield every event encountered""" + for line in iterator: + line = line.rstrip("\n") + sse = self.decode(line) + if sse is not None: + yield sse + + async def aiter(self, iterator: AsyncIterator[str]) -> AsyncIterator[ServerSentEvent]: + """Given an async iterator that yields lines, iterate over it & yield every event encountered""" + async for line in iterator: + line = line.rstrip("\n") + sse = self.decode(line) + if sse is not None: + yield sse + + def decode(self, line: str) -> ServerSentEvent | None: + # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 + + if not line: + if not self._event and not self._data and not self._last_event_id and self._retry is None: + return None + + sse = ServerSentEvent( + event=self._event, + data="\n".join(self._data), + id=self._last_event_id, + retry=self._retry, + ) + + # NOTE: as per the SSE spec, do not reset last_event_id. + self._event = None + self._data = [] + self._retry = None + + return sse + + if line.startswith(":"): + return None + + fieldname, _, value = line.partition(":") + + if value.startswith(" "): + value = value[1:] + + if fieldname == "event": + self._event = value + elif fieldname == "data": + self._data.append(value) + elif fieldname == "id": + if "\0" in value: + pass + else: + self._last_event_id = value + elif fieldname == "retry": + try: + self._retry = int(value) + except (TypeError, ValueError): + pass + else: + pass # Field is ignored. + + return None diff --git a/src/increase/_types.py b/src/increase/_types.py index f17527342..d6d27460f 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -3,7 +3,9 @@ from typing import ( IO, TYPE_CHECKING, + Any, Dict, + List, Type, Tuple, Union, @@ -14,9 +16,13 @@ ) from typing_extensions import Literal, Protocol, TypedDict, runtime_checkable +import httpx import pydantic from httpx import Proxy, Timeout, Response, BaseTransport +if TYPE_CHECKING: + from ._models import BaseModel + Transport = BaseTransport Query = Mapping[str, object] Body = object @@ -143,3 +149,8 @@ def get(self, __key: str) -> str | None: HeadersLike = Union[Headers, HeadersLikeProtocol] + +ResponseT = TypeVar( + "ResponseT", + bound="Union[str, None, BaseModel, List[Any], Dict[str, Any], httpx.Response, UnknownResponse, ModelBuilderProtocol]", +) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 3b68f2935..43516433a 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -81,7 +81,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountNumber: - """Retrieve an Account Number""" + """ + Retrieve an Account Number + + Args: + account_number_id: The identifier of the Account Number to retrieve. + + 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 + """ return self._get( f"/account_numbers/{account_number_id}", options=make_request_options( @@ -108,6 +121,8 @@ def update( Update an Account Number Args: + account_number_id: The identifier of the Account Number. + name: The name you choose for the Account Number. status: This indicates if transfers can be made to the Account Number. @@ -187,11 +202,11 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, "status": status, - "account_id": account_id, - "created_at": created_at, }, account_number_list_params.AccountNumberListParams, ), @@ -262,7 +277,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountNumber: - """Retrieve an Account Number""" + """ + Retrieve an Account Number + + Args: + account_number_id: The identifier of the Account Number to retrieve. + + 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 + """ return await self._get( f"/account_numbers/{account_number_id}", options=make_request_options( @@ -289,6 +317,8 @@ async def update( Update an Account Number Args: + account_number_id: The identifier of the Account Number. + name: The name you choose for the Account Number. status: This indicates if transfers can be made to the Account Number. @@ -368,11 +398,11 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, "status": status, - "account_id": account_id, - "created_at": created_at, }, account_number_list_params.AccountNumberListParams, ), diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 73840e3b4..0e7dab39b 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountStatement: - """Retrieve an Account Statement""" + """ + Retrieve an Account Statement + + Args: + account_statement_id: The identifier of the Account Statement to retrieve. + + 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 + """ return self._get( f"/account_statements/{account_statement_id}", options=make_request_options( @@ -76,9 +89,9 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, - "account_id": account_id, "statement_period_start": statement_period_start, }, account_statement_list_params.AccountStatementListParams, @@ -100,7 +113,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountStatement: - """Retrieve an Account Statement""" + """ + Retrieve an Account Statement + + Args: + account_statement_id: The identifier of the Account Statement to retrieve. + + 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 + """ return await self._get( f"/account_statements/{account_statement_id}", options=make_request_options( @@ -152,9 +178,9 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, - "account_id": account_id, "statement_period_start": statement_period_start, }, account_statement_list_params.AccountStatementListParams, diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index a3593910c..23a69449c 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -91,7 +91,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountTransfer: - """Retrieve an Account Transfer""" + """ + Retrieve an Account Transfer + + Args: + account_transfer_id: The identifier of the Account Transfer. + + 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 + """ return self._get( f"/account_transfers/{account_transfer_id}", options=make_request_options( @@ -143,10 +156,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, account_transfer_list_params.AccountTransferListParams, ), @@ -166,7 +179,22 @@ def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountTransfer: - """Approve an Account Transfer""" + """ + Approve an Account Transfer + + Args: + account_transfer_id: The identifier of the Account Transfer to approve. + + 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 + """ return self._post( f"/account_transfers/{account_transfer_id}/approve", options=make_request_options( @@ -191,7 +219,22 @@ def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountTransfer: - """Cancel an Account Transfer""" + """ + Cancel an Account Transfer + + Args: + account_transfer_id: The identifier of the pending Account Transfer to cancel. + + 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 + """ return self._post( f"/account_transfers/{account_transfer_id}/cancel", options=make_request_options( @@ -280,7 +323,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> AccountTransfer: - """Retrieve an Account Transfer""" + """ + Retrieve an Account Transfer + + Args: + account_transfer_id: The identifier of the Account Transfer. + + 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 + """ return await self._get( f"/account_transfers/{account_transfer_id}", options=make_request_options( @@ -332,10 +388,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, account_transfer_list_params.AccountTransferListParams, ), @@ -355,7 +411,22 @@ async def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountTransfer: - """Approve an Account Transfer""" + """ + Approve an Account Transfer + + Args: + account_transfer_id: The identifier of the Account Transfer to approve. + + 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 + """ return await self._post( f"/account_transfers/{account_transfer_id}/approve", options=make_request_options( @@ -380,7 +451,22 @@ async def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountTransfer: - """Cancel an Account Transfer""" + """ + Cancel an Account Transfer + + Args: + account_transfer_id: The identifier of the pending Account Transfer to cancel. + + 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 + """ return await self._post( f"/account_transfers/{account_transfer_id}/cancel", options=make_request_options( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 3b1ed38a5..acfc64a76 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -46,7 +46,8 @@ def create( informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated with its activity. Its relationship to your group must be `informational`. - program_id: The identifier for the Program that this Account falls under. + program_id: The identifier for the Program that this Account falls under. Required if you + operate more than one Program. extra_headers: Send extra headers @@ -62,10 +63,10 @@ def create( "/accounts", body=maybe_transform( { + "name": name, "entity_id": entity_id, - "program_id": program_id, "informational_entity_id": informational_entity_id, - "name": name, + "program_id": program_id, }, account_create_params.AccountCreateParams, ), @@ -90,7 +91,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Account: - """Retrieve an Account""" + """ + Retrieve an Account + + Args: + account_id: The identifier of the Account to retrieve. + + 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 + """ return self._get( f"/accounts/{account_id}", options=make_request_options( @@ -116,6 +130,8 @@ def update( Update an Account Args: + account_id: The identifier of the Account to update. + name: The new name of the Account. extra_headers: Send extra headers @@ -147,6 +163,7 @@ def list( created_at: account_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, entity_id: str | NotGiven = NOT_GIVEN, + informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -164,6 +181,8 @@ def list( entity_id: Filter Accounts for those belonging to the specified Entity. + informational_entity_id: Filter Accounts for those belonging to the specified Entity as informational. + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -187,11 +206,12 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, - "limit": limit, "entity_id": entity_id, + "informational_entity_id": informational_entity_id, + "limit": limit, "status": status, - "created_at": created_at, }, account_list_params.AccountListParams, ), @@ -211,7 +231,22 @@ def close( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Account: - """Close an Account""" + """ + Close an Account + + Args: + account_id: The identifier of the Account to close. + + 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 + """ return self._post( f"/accounts/{account_id}/close", options=make_request_options( @@ -252,7 +287,8 @@ async def create( informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated with its activity. Its relationship to your group must be `informational`. - program_id: The identifier for the Program that this Account falls under. + program_id: The identifier for the Program that this Account falls under. Required if you + operate more than one Program. extra_headers: Send extra headers @@ -268,10 +304,10 @@ async def create( "/accounts", body=maybe_transform( { + "name": name, "entity_id": entity_id, - "program_id": program_id, "informational_entity_id": informational_entity_id, - "name": name, + "program_id": program_id, }, account_create_params.AccountCreateParams, ), @@ -296,7 +332,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Account: - """Retrieve an Account""" + """ + Retrieve an Account + + Args: + account_id: The identifier of the Account to retrieve. + + 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 + """ return await self._get( f"/accounts/{account_id}", options=make_request_options( @@ -322,6 +371,8 @@ async def update( Update an Account Args: + account_id: The identifier of the Account to update. + name: The new name of the Account. extra_headers: Send extra headers @@ -353,6 +404,7 @@ def list( created_at: account_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, entity_id: str | NotGiven = NOT_GIVEN, + informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -370,6 +422,8 @@ def list( entity_id: Filter Accounts for those belonging to the specified Entity. + informational_entity_id: Filter Accounts for those belonging to the specified Entity as informational. + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -393,11 +447,12 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, - "limit": limit, "entity_id": entity_id, + "informational_entity_id": informational_entity_id, + "limit": limit, "status": status, - "created_at": created_at, }, account_list_params.AccountListParams, ), @@ -417,7 +472,22 @@ async def close( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Account: - """Close an Account""" + """ + Close an Account + + Args: + account_id: The identifier of the Account to close. + + 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 + """ return await self._post( f"/accounts/{account_id}/close", options=make_request_options( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index f71aba5dd..b1a4556e8 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -93,6 +93,7 @@ def create( body=maybe_transform( { "account_number": account_number, + "routing_number": routing_number, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, @@ -102,7 +103,6 @@ def create( "effective_date": effective_date, "individual_id": individual_id, "individual_name": individual_name, - "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, }, ach_prenotification_create_params.ACHPrenotificationCreateParams, @@ -128,7 +128,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ACHPrenotification: - """Retrieve an ACH Prenotification""" + """ + Retrieve an ACH Prenotification + + Args: + ach_prenotification_id: The identifier of the ACH Prenotification to retrieve. + + 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 + """ return self._get( f"/ach_prenotifications/{ach_prenotification_id}", options=make_request_options( @@ -177,9 +190,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, }, ach_prenotification_list_params.ACHPrenotificationListParams, ), @@ -261,6 +274,7 @@ async def create( body=maybe_transform( { "account_number": account_number, + "routing_number": routing_number, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, @@ -270,7 +284,6 @@ async def create( "effective_date": effective_date, "individual_id": individual_id, "individual_name": individual_name, - "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, }, ach_prenotification_create_params.ACHPrenotificationCreateParams, @@ -296,7 +309,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ACHPrenotification: - """Retrieve an ACH Prenotification""" + """ + Retrieve an ACH Prenotification + + Args: + ach_prenotification_id: The identifier of the ACH Prenotification to retrieve. + + 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 + """ return await self._get( f"/ach_prenotifications/{ach_prenotification_id}", options=make_request_options( @@ -345,9 +371,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, }, ach_prenotification_list_params.ACHPrenotificationListParams, ), diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index e39c43224..59510f33c 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -117,9 +117,10 @@ def create( body=maybe_transform( { "account_id": account_id, + "amount": amount, + "statement_descriptor": statement_descriptor, "account_number": account_number, "addendum": addendum, - "amount": amount, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, @@ -132,7 +133,6 @@ def create( "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, - "statement_descriptor": statement_descriptor, }, ach_transfer_create_params.ACHTransferCreateParams, ), @@ -157,7 +157,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ACHTransfer: - """Retrieve an ACH Transfer""" + """ + Retrieve an ACH Transfer + + Args: + ach_transfer_id: The identifier of the ACH Transfer. + + 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 + """ return self._get( f"/ach_transfers/{ach_transfer_id}", options=make_request_options( @@ -212,11 +225,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, ach_transfer_list_params.ACHTransferListParams, ), @@ -236,7 +249,22 @@ def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ACHTransfer: - """Approves an ACH Transfer in a pending_approval state.""" + """ + Approves an ACH Transfer in a pending_approval state. + + Args: + ach_transfer_id: The identifier of the ACH Transfer to approve. + + 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 + """ return self._post( f"/ach_transfers/{ach_transfer_id}/approve", options=make_request_options( @@ -261,7 +289,22 @@ def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ACHTransfer: - """Cancels an ACH Transfer in a pending_approval state.""" + """ + Cancels an ACH Transfer in a pending_approval state. + + Args: + ach_transfer_id: The identifier of the pending ACH Transfer to cancel. + + 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 + """ return self._post( f"/ach_transfers/{ach_transfer_id}/cancel", options=make_request_options( @@ -376,9 +419,10 @@ async def create( body=maybe_transform( { "account_id": account_id, + "amount": amount, + "statement_descriptor": statement_descriptor, "account_number": account_number, "addendum": addendum, - "amount": amount, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, @@ -391,7 +435,6 @@ async def create( "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, - "statement_descriptor": statement_descriptor, }, ach_transfer_create_params.ACHTransferCreateParams, ), @@ -416,7 +459,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ACHTransfer: - """Retrieve an ACH Transfer""" + """ + Retrieve an ACH Transfer + + Args: + ach_transfer_id: The identifier of the ACH Transfer. + + 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 + """ return await self._get( f"/ach_transfers/{ach_transfer_id}", options=make_request_options( @@ -471,11 +527,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, ach_transfer_list_params.ACHTransferListParams, ), @@ -495,7 +551,22 @@ async def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ACHTransfer: - """Approves an ACH Transfer in a pending_approval state.""" + """ + Approves an ACH Transfer in a pending_approval state. + + Args: + ach_transfer_id: The identifier of the ACH Transfer to approve. + + 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 + """ return await self._post( f"/ach_transfers/{ach_transfer_id}/approve", options=make_request_options( @@ -520,7 +591,22 @@ async def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ACHTransfer: - """Cancels an ACH Transfer in a pending_approval state.""" + """ + Cancels an ACH Transfer in a pending_approval state. + + Args: + ach_transfer_id: The identifier of the pending ACH Transfer to cancel. + + 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 + """ return await self._post( f"/ach_transfers/{ach_transfer_id}/cancel", options=make_request_options( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index c9bc4a9e8..ebf75abc9 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -60,10 +60,10 @@ def create( "/bookkeeping_accounts", body=maybe_transform( { + "name": name, + "account_id": account_id, "compliance_category": compliance_category, "entity_id": entity_id, - "account_id": account_id, - "name": name, }, bookkeeping_account_create_params.BookkeepingAccountCreateParams, ), @@ -168,10 +168,10 @@ async def create( "/bookkeeping_accounts", body=maybe_transform( { + "name": name, + "account_id": account_id, "compliance_category": compliance_category, "entity_id": entity_id, - "account_id": account_id, - "name": name, }, bookkeeping_account_create_params.BookkeepingAccountCreateParams, ), diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index ab0342bba..978ee6fdd 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -54,9 +54,9 @@ def create( "/bookkeeping_entry_sets", body=maybe_transform( { + "entries": entries, "date": date, "transaction_id": transaction_id, - "entries": entries, }, bookkeeping_entry_set_create_params.BookkeepingEntrySetCreateParams, ), @@ -111,9 +111,9 @@ async def create( "/bookkeeping_entry_sets", body=maybe_transform( { + "entries": entries, "date": date, "transaction_id": transaction_id, - "entries": entries, }, bookkeeping_entry_set_create_params.BookkeepingEntrySetCreateParams, ), diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 92c55dee4..d7d4014d0 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -75,7 +75,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardDispute: - """Retrieve a Card Dispute""" + """ + Retrieve a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute. + + 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 + """ return self._get( f"/card_disputes/{card_dispute_id}", options=make_request_options( @@ -125,9 +138,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, "status": status, }, card_dispute_list_params.CardDisputeListParams, @@ -200,7 +213,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardDispute: - """Retrieve a Card Dispute""" + """ + Retrieve a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute. + + 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 + """ return await self._get( f"/card_disputes/{card_dispute_id}", options=make_request_options( @@ -250,9 +276,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, "status": status, }, card_dispute_list_params.CardDisputeListParams, diff --git a/src/increase/resources/card_profiles.py b/src/increase/resources/card_profiles.py index 9a2cbc83c..e6687bc99 100644 --- a/src/increase/resources/card_profiles.py +++ b/src/increase/resources/card_profiles.py @@ -75,7 +75,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardProfile: - """Retrieve a Card Profile""" + """ + Retrieve a Card Profile + + Args: + card_profile_id: The identifier of the Card Profile. + + 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 + """ return self._get( f"/card_profiles/{card_profile_id}", options=make_request_options( @@ -198,7 +211,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardProfile: - """Retrieve a Card Profile""" + """ + Retrieve a Card Profile + + Args: + card_profile_id: The identifier of the Card Profile. + + 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 + """ return await self._get( f"/card_profiles/{card_profile_id}", options=make_request_options( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 0625b84bf..4abca3462 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -67,8 +67,8 @@ def create( body=maybe_transform( { "account_id": account_id, - "description": description, "billing_address": billing_address, + "description": description, "digital_wallet": digital_wallet, }, card_create_params.CardCreateParams, @@ -94,7 +94,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Card: - """Retrieve a Card""" + """ + Retrieve a Card + + Args: + card_id: The identifier of the Card. + + 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 + """ return self._get( f"/cards/{card_id}", options=make_request_options( @@ -123,6 +136,8 @@ def update( Update a Card Args: + card_id: The card identifier. + billing_address: The card's updated billing address. description: The description you choose to give the card. @@ -147,10 +162,10 @@ def update( f"/cards/{card_id}", body=maybe_transform( { - "description": description, - "status": status, "billing_address": billing_address, + "description": description, "digital_wallet": digital_wallet, + "status": status, }, card_update_params.CardUpdateParams, ), @@ -207,10 +222,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, card_list_params.CardListParams, ), @@ -229,7 +244,20 @@ def retrieve_sensitive_details( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardDetails: - """Retrieve sensitive details for a Card""" + """ + Retrieve sensitive details for a Card + + Args: + card_id: The identifier of the Card to retrieve details for. + + 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 + """ return self._get( f"/cards/{card_id}/details", options=make_request_options( @@ -286,8 +314,8 @@ async def create( body=maybe_transform( { "account_id": account_id, - "description": description, "billing_address": billing_address, + "description": description, "digital_wallet": digital_wallet, }, card_create_params.CardCreateParams, @@ -313,7 +341,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Card: - """Retrieve a Card""" + """ + Retrieve a Card + + Args: + card_id: The identifier of the Card. + + 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 + """ return await self._get( f"/cards/{card_id}", options=make_request_options( @@ -342,6 +383,8 @@ async def update( Update a Card Args: + card_id: The card identifier. + billing_address: The card's updated billing address. description: The description you choose to give the card. @@ -366,10 +409,10 @@ async def update( f"/cards/{card_id}", body=maybe_transform( { - "description": description, - "status": status, "billing_address": billing_address, + "description": description, "digital_wallet": digital_wallet, + "status": status, }, card_update_params.CardUpdateParams, ), @@ -426,10 +469,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, card_list_params.CardListParams, ), @@ -448,7 +491,20 @@ async def retrieve_sensitive_details( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CardDetails: - """Retrieve sensitive details for a Card""" + """ + Retrieve sensitive details for a Card + + Args: + card_id: The identifier of the Card to retrieve details for. + + 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 + """ return await self._get( f"/cards/{card_id}/details", options=make_request_options( diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 9d29000a9..c65c9e881 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -60,9 +60,9 @@ def create( { "account_id": account_id, "amount": amount, + "back_image_file_id": back_image_file_id, "currency": currency, "front_image_file_id": front_image_file_id, - "back_image_file_id": back_image_file_id, }, check_deposit_create_params.CheckDepositCreateParams, ), @@ -87,7 +87,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CheckDeposit: - """Retrieve a Check Deposit""" + """ + Retrieve a Check Deposit + + Args: + check_deposit_id: The identifier of the Check Deposit to retrieve. + + 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 + """ return self._get( f"/check_deposits/{check_deposit_id}", options=make_request_options( @@ -139,10 +152,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, check_deposit_list_params.CheckDepositListParams, ), @@ -199,9 +212,9 @@ async def create( { "account_id": account_id, "amount": amount, + "back_image_file_id": back_image_file_id, "currency": currency, "front_image_file_id": front_image_file_id, - "back_image_file_id": back_image_file_id, }, check_deposit_create_params.CheckDepositCreateParams, ), @@ -226,7 +239,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CheckDeposit: - """Retrieve a Check Deposit""" + """ + Retrieve a Check Deposit + + Args: + check_deposit_id: The identifier of the Check Deposit to retrieve. + + 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 + """ return await self._get( f"/check_deposits/{check_deposit_id}", options=make_request_options( @@ -278,10 +304,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, check_deposit_list_params.CheckDepositListParams, ), diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index e78f59a83..689a60865 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -84,17 +84,17 @@ def create( body=maybe_transform( { "account_id": account_id, - "address_line1": address_line1, - "address_line2": address_line2, "address_city": address_city, + "address_line1": address_line1, "address_state": address_state, "address_zip": address_zip, - "return_address": return_address, "amount": amount, "message": message, - "note": note, "recipient_name": recipient_name, + "address_line2": address_line2, + "note": note, "require_approval": require_approval, + "return_address": return_address, }, check_transfer_create_params.CheckTransferCreateParams, ), @@ -119,7 +119,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CheckTransfer: - """Retrieve a Check Transfer""" + """ + Retrieve a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer. + + 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 + """ return self._get( f"/check_transfers/{check_transfer_id}", options=make_request_options( @@ -171,10 +184,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, check_transfer_list_params.CheckTransferListParams, ), @@ -194,7 +207,22 @@ def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Approve a Check Transfer""" + """ + Approve a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer to approve. + + 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 + """ return self._post( f"/check_transfers/{check_transfer_id}/approve", options=make_request_options( @@ -219,7 +247,22 @@ def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Cancel a pending Check Transfer""" + """ + Cancel a pending Check Transfer + + Args: + check_transfer_id: The identifier of the pending Check Transfer to cancel. + + 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 + """ return self._post( f"/check_transfers/{check_transfer_id}/cancel", options=make_request_options( @@ -244,7 +287,22 @@ def stop_payment( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Request a stop payment on a Check Transfer""" + """ + Request a stop payment on a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer. + + 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 + """ return self._post( f"/check_transfers/{check_transfer_id}/stop_payment", options=make_request_options( @@ -326,17 +384,17 @@ async def create( body=maybe_transform( { "account_id": account_id, - "address_line1": address_line1, - "address_line2": address_line2, "address_city": address_city, + "address_line1": address_line1, "address_state": address_state, "address_zip": address_zip, - "return_address": return_address, "amount": amount, "message": message, - "note": note, "recipient_name": recipient_name, + "address_line2": address_line2, + "note": note, "require_approval": require_approval, + "return_address": return_address, }, check_transfer_create_params.CheckTransferCreateParams, ), @@ -361,7 +419,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> CheckTransfer: - """Retrieve a Check Transfer""" + """ + Retrieve a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer. + + 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 + """ return await self._get( f"/check_transfers/{check_transfer_id}", options=make_request_options( @@ -413,10 +484,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, check_transfer_list_params.CheckTransferListParams, ), @@ -436,7 +507,22 @@ async def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Approve a Check Transfer""" + """ + Approve a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer to approve. + + 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 + """ return await self._post( f"/check_transfers/{check_transfer_id}/approve", options=make_request_options( @@ -461,7 +547,22 @@ async def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Cancel a pending Check Transfer""" + """ + Cancel a pending Check Transfer + + Args: + check_transfer_id: The identifier of the pending Check Transfer to cancel. + + 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 + """ return await self._post( f"/check_transfers/{check_transfer_id}/cancel", options=make_request_options( @@ -486,7 +587,22 @@ async def stop_payment( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CheckTransfer: - """Request a stop payment on a Check Transfer""" + """ + Request a stop payment on a Check Transfer + + Args: + check_transfer_id: The identifier of the Check Transfer. + + 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 + """ return await self._post( f"/check_transfers/{check_transfer_id}/stop_payment", options=make_request_options( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 4d60cd99a..00580f15a 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> DeclinedTransaction: - """Retrieve a Declined Transaction""" + """ + Retrieve a Declined Transaction + + Args: + declined_transaction_id: The identifier of the Declined Transaction. + + 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 + """ return self._get( f"/declined_transactions/{declined_transaction_id}", options=make_request_options( @@ -79,11 +92,11 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, - "created_at": created_at, }, declined_transaction_list_params.DeclinedTransactionListParams, ), @@ -104,7 +117,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> DeclinedTransaction: - """Retrieve a Declined Transaction""" + """ + Retrieve a Declined Transaction + + Args: + declined_transaction_id: The identifier of the Declined Transaction. + + 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 + """ return await self._get( f"/declined_transactions/{declined_transaction_id}", options=make_request_options( @@ -159,11 +185,11 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, - "created_at": created_at, }, declined_transaction_list_params.DeclinedTransactionListParams, ), diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 685834c64..418b0a299 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> DigitalWalletToken: - """Retrieve a Digital Wallet Token""" + """ + Retrieve a Digital Wallet Token + + Args: + digital_wallet_token_id: The identifier of the Digital Wallet Token. + + 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 + """ return self._get( f"/digital_wallet_tokens/{digital_wallet_token_id}", options=make_request_options( @@ -76,10 +89,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "card_id": card_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, digital_wallet_token_list_params.DigitalWalletTokenListParams, ), @@ -100,7 +113,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> DigitalWalletToken: - """Retrieve a Digital Wallet Token""" + """ + Retrieve a Digital Wallet Token + + Args: + digital_wallet_token_id: The identifier of the Digital Wallet Token. + + 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 + """ return await self._get( f"/digital_wallet_tokens/{digital_wallet_token_id}", options=make_request_options( @@ -152,10 +178,10 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "card_id": card_id, "created_at": created_at, + "cursor": cursor, + "limit": limit, }, digital_wallet_token_list_params.DigitalWalletTokenListParams, ), diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 55cb4e79e..bc5ef07a6 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Document: - """Retrieve a Document""" + """ + Retrieve a Document + + Args: + document_id: The identifier of the Document to retrieve. + + 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 + """ return self._get( f"/documents/{document_id}", options=make_request_options( @@ -77,11 +90,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, - "entity_id": entity_id, "category": category, "created_at": created_at, + "cursor": cursor, + "entity_id": entity_id, + "limit": limit, }, document_list_params.DocumentListParams, ), @@ -102,7 +115,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Document: - """Retrieve a Document""" + """ + Retrieve a Document + + Args: + document_id: The identifier of the Document to retrieve. + + 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 + """ return await self._get( f"/documents/{document_id}", options=make_request_options( @@ -155,11 +181,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, - "entity_id": entity_id, "category": category, "created_at": created_at, + "cursor": cursor, + "entity_id": entity_id, + "limit": limit, }, document_list_params.DocumentListParams, ), diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index c5c790181..bed7c5e77 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -85,14 +85,14 @@ def create( "/entities", body=maybe_transform( { + "relationship": relationship, "structure": structure, "corporation": corporation, - "natural_person": natural_person, - "joint": joint, - "trust": trust, "description": description, - "relationship": relationship, + "joint": joint, + "natural_person": natural_person, "supplemental_documents": supplemental_documents, + "trust": trust, }, entity_create_params.EntityCreateParams, ), @@ -117,7 +117,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Entity: - """Retrieve an Entity""" + """ + Retrieve an Entity + + Args: + entity_id: The identifier of the Entity to retrieve. + + 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 + """ return self._get( f"/entities/{entity_id}", options=make_request_options( @@ -166,9 +179,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, }, entity_list_params.EntityListParams, ), @@ -243,14 +256,14 @@ async def create( "/entities", body=maybe_transform( { + "relationship": relationship, "structure": structure, "corporation": corporation, - "natural_person": natural_person, - "joint": joint, - "trust": trust, "description": description, - "relationship": relationship, + "joint": joint, + "natural_person": natural_person, "supplemental_documents": supplemental_documents, + "trust": trust, }, entity_create_params.EntityCreateParams, ), @@ -275,7 +288,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Entity: - """Retrieve an Entity""" + """ + Retrieve an Entity + + Args: + entity_id: The identifier of the Entity to retrieve. + + 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 + """ return await self._get( f"/entities/{entity_id}", options=make_request_options( @@ -324,9 +350,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, }, entity_list_params.EntityListParams, ), diff --git a/src/increase/resources/entities/supplemental_documents.py b/src/increase/resources/entities/supplemental_documents.py index 832593603..866746f45 100644 --- a/src/increase/resources/entities/supplemental_documents.py +++ b/src/increase/resources/entities/supplemental_documents.py @@ -6,8 +6,13 @@ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._base_client import make_request_options -from ...types.entities import supplemental_document_create_params +from ...pagination import SyncPage, AsyncPage +from ..._base_client import AsyncPaginator, make_request_options +from ...types.entities import ( + SupplementalDocument, + supplemental_document_list_params, + supplemental_document_create_params, +) __all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments"] @@ -30,6 +35,8 @@ def create( Create a supplemental document for an Entity Args: + entity_id: The identifier of the Entity to retrieve. + file_id: The identifier of the File containing the document. extra_headers: Send extra headers @@ -57,6 +64,58 @@ def create( cast_to=Entity, ) + def list( + self, + *, + entity_id: str, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[SupplementalDocument]: + """ + List Entity Supplemental Document Submissionss + + Args: + entity_id: The identifier of the Entity to list supplemental documents for. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + 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 + """ + return self._get_api_list( + "/entity_supplemental_documents", + page=SyncPage[SupplementalDocument], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "entity_id": entity_id, + "cursor": cursor, + "limit": limit, + }, + supplemental_document_list_params.SupplementalDocumentListParams, + ), + ), + model=SupplementalDocument, + ) + class AsyncSupplementalDocuments(AsyncAPIResource): async def create( @@ -76,6 +135,8 @@ async def create( Create a supplemental document for an Entity Args: + entity_id: The identifier of the Entity to retrieve. + file_id: The identifier of the File containing the document. extra_headers: Send extra headers @@ -102,3 +163,55 @@ async def create( ), cast_to=Entity, ) + + def list( + self, + *, + entity_id: str, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[SupplementalDocument, AsyncPage[SupplementalDocument]]: + """ + List Entity Supplemental Document Submissionss + + Args: + entity_id: The identifier of the Entity to list supplemental documents for. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + 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 + """ + return self._get_api_list( + "/entity_supplemental_documents", + page=AsyncPage[SupplementalDocument], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "entity_id": entity_id, + "cursor": cursor, + "limit": limit, + }, + supplemental_document_list_params.SupplementalDocumentListParams, + ), + ), + model=SupplementalDocument, + ) diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 310ea7594..1ec48c503 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -113,8 +113,8 @@ def create( body=maybe_transform( { "url": url, - "shared_secret": shared_secret, "selected_event_category": selected_event_category, + "shared_secret": shared_secret, }, event_subscription_create_params.EventSubscriptionCreateParams, ), @@ -139,7 +139,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> EventSubscription: - """Retrieve an Event Subscription""" + """ + Retrieve an Event Subscription + + Args: + event_subscription_id: The identifier of the Event Subscription. + + 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 + """ return self._get( f"/event_subscriptions/{event_subscription_id}", options=make_request_options( @@ -165,6 +178,8 @@ def update( Update an Event Subscription Args: + event_subscription_id: The identifier of the Event Subscription. + status: The status to update the Event Subscription with. extra_headers: Send extra headers @@ -333,8 +348,8 @@ async def create( body=maybe_transform( { "url": url, - "shared_secret": shared_secret, "selected_event_category": selected_event_category, + "shared_secret": shared_secret, }, event_subscription_create_params.EventSubscriptionCreateParams, ), @@ -359,7 +374,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> EventSubscription: - """Retrieve an Event Subscription""" + """ + Retrieve an Event Subscription + + Args: + event_subscription_id: The identifier of the Event Subscription. + + 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 + """ return await self._get( f"/event_subscriptions/{event_subscription_id}", options=make_request_options( @@ -385,6 +413,8 @@ async def update( Update an Event Subscription Args: + event_subscription_id: The identifier of the Event Subscription. + status: The status to update the Event Subscription with. extra_headers: Send extra headers diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 80895aeba..2acbf95cd 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Event: - """Retrieve an Event""" + """ + Retrieve an Event + + Args: + event_id: The identifier of the Event. + + 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 + """ return self._get( f"/events/{event_id}", options=make_request_options( @@ -77,11 +90,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "associated_object_id": associated_object_id, - "created_at": created_at, "category": category, + "created_at": created_at, + "cursor": cursor, + "limit": limit, }, event_list_params.EventListParams, ), @@ -102,7 +115,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Event: - """Retrieve an Event""" + """ + Retrieve an Event + + Args: + event_id: The identifier of the Event. + + 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 + """ return await self._get( f"/events/{event_id}", options=make_request_options( @@ -155,11 +181,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "associated_object_id": associated_object_id, - "created_at": created_at, "category": category, + "created_at": created_at, + "cursor": cursor, + "limit": limit, }, event_list_params.EventListParams, ), diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 11981ab71..cf1f348db 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -56,8 +56,8 @@ def create( body=maybe_transform( { "category": category, - "transaction_csv": transaction_csv, "balance_csv": balance_csv, + "transaction_csv": transaction_csv, }, export_create_params.ExportCreateParams, ), @@ -82,7 +82,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Export: - """Retrieve an Export""" + """ + Retrieve an Export + + Args: + export_id: The identifier of the Export to retrieve. + + 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 + """ return self._get( f"/exports/{export_id}", options=make_request_options( @@ -182,8 +195,8 @@ async def create( body=maybe_transform( { "category": category, - "transaction_csv": transaction_csv, "balance_csv": balance_csv, + "transaction_csv": transaction_csv, }, export_create_params.ExportCreateParams, ), @@ -208,7 +221,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Export: - """Retrieve an Export""" + """ + Retrieve an Export + + Args: + export_id: The identifier of the Export to retrieve. + + 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 + """ return await self._get( f"/exports/{export_id}", options=make_request_options( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 7ca397280..28c0b8b22 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -62,10 +62,10 @@ def create( "/external_accounts", body=maybe_transform( { - "routing_number": routing_number, "account_number": account_number, - "funding": funding, "description": description, + "routing_number": routing_number, + "funding": funding, }, external_account_create_params.ExternalAccountCreateParams, ), @@ -90,7 +90,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ExternalAccount: - """Retrieve an External Account""" + """ + Retrieve an External Account + + Args: + external_account_id: The identifier of the External Account. + + 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 + """ return self._get( f"/external_accounts/{external_account_id}", options=make_request_options( @@ -117,6 +130,8 @@ def update( Update an External Account Args: + external_account_id: The external account identifier. + description: The description you choose to give the external account. status: The status of the External Account. @@ -244,10 +259,10 @@ async def create( "/external_accounts", body=maybe_transform( { - "routing_number": routing_number, "account_number": account_number, - "funding": funding, "description": description, + "routing_number": routing_number, + "funding": funding, }, external_account_create_params.ExternalAccountCreateParams, ), @@ -272,7 +287,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> ExternalAccount: - """Retrieve an External Account""" + """ + Retrieve an External Account + + Args: + external_account_id: The identifier of the External Account. + + 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 + """ return await self._get( f"/external_accounts/{external_account_id}", options=make_request_options( @@ -299,6 +327,8 @@ async def update( Update an External Account Args: + external_account_id: The external account identifier. + description: The description you choose to give the external account. status: The status of the External Account. diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 57ad5d2b3..9d6dccf72 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -68,8 +68,8 @@ def create( body = deepcopy_minimal( { "file": file, - "description": description, "purpose": purpose, + "description": description, } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) @@ -104,7 +104,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> File: - """Retrieve a File""" + """ + Retrieve a File + + Args: + file_id: The identifier of the File. + + 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 + """ return self._get( f"/files/{file_id}", options=make_request_options( @@ -154,9 +167,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, "purpose": purpose, }, file_list_params.FileListParams, @@ -219,8 +232,8 @@ async def create( body = deepcopy_minimal( { "file": file, - "description": description, "purpose": purpose, + "description": description, } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) @@ -255,7 +268,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> File: - """Retrieve a File""" + """ + Retrieve a File + + Args: + file_id: The identifier of the File. + + 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 + """ return await self._get( f"/files/{file_id}", options=make_request_options( @@ -305,9 +331,9 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, - "created_at": created_at, "purpose": purpose, }, file_list_params.FileListParams, diff --git a/src/increase/resources/inbound_ach_transfer_returns.py b/src/increase/resources/inbound_ach_transfer_returns.py index e38e42243..8187020b9 100644 --- a/src/increase/resources/inbound_ach_transfer_returns.py +++ b/src/increase/resources/inbound_ach_transfer_returns.py @@ -65,8 +65,8 @@ def create( "/inbound_ach_transfer_returns", body=maybe_transform( { - "transaction_id": transaction_id, "reason": reason, + "transaction_id": transaction_id, }, inbound_ach_transfer_return_create_params.InboundACHTransferReturnCreateParams, ), @@ -91,7 +91,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> InboundACHTransferReturn: - """Retrieve an Inbound ACH Transfer Return""" + """ + Retrieve an Inbound ACH Transfer Return + + Args: + inbound_ach_transfer_return_id: The identifier of the Inbound ACH Transfer Return to retrieve. + + 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 + """ return self._get( f"/inbound_ach_transfer_returns/{inbound_ach_transfer_return_id}", options=make_request_options( @@ -196,8 +209,8 @@ async def create( "/inbound_ach_transfer_returns", body=maybe_transform( { - "transaction_id": transaction_id, "reason": reason, + "transaction_id": transaction_id, }, inbound_ach_transfer_return_create_params.InboundACHTransferReturnCreateParams, ), @@ -222,7 +235,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> InboundACHTransferReturn: - """Retrieve an Inbound ACH Transfer Return""" + """ + Retrieve an Inbound ACH Transfer Return + + Args: + inbound_ach_transfer_return_id: The identifier of the Inbound ACH Transfer Return to retrieve. + + 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 + """ return await self._get( f"/inbound_ach_transfer_returns/{inbound_ach_transfer_return_id}", options=make_request_options( diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index f536091fa..4652719c1 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -27,7 +27,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> InboundWireDrawdownRequest: - """Retrieve an Inbound Wire Drawdown Request""" + """ + Retrieve an Inbound Wire Drawdown Request + + Args: + inbound_wire_drawdown_request_id: The identifier of the Inbound Wire Drawdown Request to retrieve. + + 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 + """ return self._get( f"/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", options=make_request_options( @@ -97,7 +110,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> InboundWireDrawdownRequest: - """Retrieve an Inbound Wire Drawdown Request""" + """ + Retrieve an Inbound Wire Drawdown Request + + Args: + inbound_wire_drawdown_request_id: The identifier of the Inbound Wire Drawdown Request to retrieve. + + 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 + """ return await self._get( f"/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", options=make_request_options( diff --git a/src/increase/resources/limits.py b/src/increase/resources/limits.py index 7c08c50d1..af03b1598 100644 --- a/src/increase/resources/limits.py +++ b/src/increase/resources/limits.py @@ -58,9 +58,9 @@ def create( body=maybe_transform( { "metric": metric, - "interval": interval, "model_id": model_id, "value": value, + "interval": interval, }, limit_create_params.LimitCreateParams, ), @@ -85,7 +85,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Limit: - """Retrieve a Limit""" + """ + Retrieve a Limit + + Args: + limit_id: The identifier of the Limit to retrieve. + + 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 + """ return self._get( f"/limits/{limit_id}", options=make_request_options( @@ -111,6 +124,8 @@ def update( Update a Limit Args: + limit_id: The limit to update. + status: The status to update the limit with. extra_headers: Send extra headers @@ -237,9 +252,9 @@ async def create( body=maybe_transform( { "metric": metric, - "interval": interval, "model_id": model_id, "value": value, + "interval": interval, }, limit_create_params.LimitCreateParams, ), @@ -264,7 +279,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Limit: - """Retrieve a Limit""" + """ + Retrieve a Limit + + Args: + limit_id: The identifier of the Limit to retrieve. + + 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 + """ return await self._get( f"/limits/{limit_id}", options=make_request_options( @@ -290,6 +318,8 @@ async def update( Update a Limit Args: + limit_id: The limit to update. + status: The status to update the limit with. extra_headers: Send extra headers diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index d0e7e22b1..23849f8a1 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> OauthConnection: - """Retrieve an OAuth Connection""" + """ + Retrieve an OAuth Connection + + Args: + oauth_connection_id: The identifier of the OAuth Connection. + + 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 + """ return self._get( f"/oauth_connections/{oauth_connection_id}", options=make_request_options( @@ -94,7 +107,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> OauthConnection: - """Retrieve an OAuth Connection""" + """ + Retrieve an OAuth Connection + + Args: + oauth_connection_id: The identifier of the OAuth Connection. + + 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 + """ return await self._get( f"/oauth_connections/{oauth_connection_id}", options=make_request_options( diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 5f96f6f9e..7f3ce340b 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> PendingTransaction: - """Retrieve a Pending Transaction""" + """ + Retrieve a Pending Transaction + + Args: + pending_transaction_id: The identifier of the Pending Transaction. + + 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 + """ return self._get( f"/pending_transactions/{pending_transaction_id}", options=make_request_options( @@ -83,13 +96,13 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, "source_id": source_id, "status": status, - "created_at": created_at, }, pending_transaction_list_params.PendingTransactionListParams, ), @@ -110,7 +123,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> PendingTransaction: - """Retrieve a Pending Transaction""" + """ + Retrieve a Pending Transaction + + Args: + pending_transaction_id: The identifier of the Pending Transaction. + + 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 + """ return await self._get( f"/pending_transactions/{pending_transaction_id}", options=make_request_options( @@ -169,13 +195,13 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, "source_id": source_id, "status": status, - "created_at": created_at, }, pending_transaction_list_params.PendingTransactionListParams, ), diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 10c645acc..2cc99b7a9 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Program: - """Retrieve a Program""" + """ + Retrieve a Program + + Args: + program_id: The identifier of the Program to retrieve. + + 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 + """ return self._get( f"/programs/{program_id}", options=make_request_options( @@ -94,7 +107,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Program: - """Retrieve a Program""" + """ + Retrieve a Program + + Args: + program_id: The identifier of the Program to retrieve. + + 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 + """ return await self._get( f"/programs/{program_id}", options=make_request_options( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index ffb081c4f..e245ef0bf 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -23,7 +23,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> RealTimeDecision: - """Retrieve a Real-Time Decision""" + """ + Retrieve a Real-Time Decision + + Args: + real_time_decision_id: The identifier of the Real-Time Decision. + + 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 + """ return self._get( f"/real_time_decisions/{real_time_decision_id}", options=make_request_options( @@ -52,6 +65,8 @@ def action( Action a Real-Time Decision Args: + real_time_decision_id: The identifier of the Real-Time Decision. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -76,8 +91,8 @@ def action( body=maybe_transform( { "card_authorization": card_authorization, - "digital_wallet_token": digital_wallet_token, "digital_wallet_authentication": digital_wallet_authentication, + "digital_wallet_token": digital_wallet_token, }, real_time_decision_action_params.RealTimeDecisionActionParams, ), @@ -104,7 +119,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> RealTimeDecision: - """Retrieve a Real-Time Decision""" + """ + Retrieve a Real-Time Decision + + Args: + real_time_decision_id: The identifier of the Real-Time Decision. + + 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 + """ return await self._get( f"/real_time_decisions/{real_time_decision_id}", options=make_request_options( @@ -133,6 +161,8 @@ async def action( Action a Real-Time Decision Args: + real_time_decision_id: The identifier of the Real-Time Decision. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -157,8 +187,8 @@ async def action( body=maybe_transform( { "card_authorization": card_authorization, - "digital_wallet_token": digital_wallet_token, "digital_wallet_authentication": digital_wallet_authentication, + "digital_wallet_token": digital_wallet_token, }, real_time_decision_action_params.RealTimeDecisionActionParams, ), diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 7becb123b..d958e8579 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -74,13 +74,13 @@ def create( "/real_time_payments_transfers", body=maybe_transform( { + "amount": amount, + "creditor_name": creditor_name, + "remittance_information": remittance_information, "source_account_number_id": source_account_number_id, "destination_account_number": destination_account_number, "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, - "amount": amount, - "creditor_name": creditor_name, - "remittance_information": remittance_information, "require_approval": require_approval, }, real_time_payments_transfer_create_params.RealTimePaymentsTransferCreateParams, @@ -106,7 +106,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> RealTimePaymentsTransfer: - """Retrieve a Real Time Payments Transfer""" + """ + Retrieve a Real Time Payments Transfer + + Args: + real_time_payments_transfer_id: The identifier of the Real Time Payments Transfer. + + 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 + """ return self._get( f"/real_time_payments_transfers/{real_time_payments_transfer_id}", options=make_request_options( @@ -162,11 +175,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), @@ -233,13 +246,13 @@ async def create( "/real_time_payments_transfers", body=maybe_transform( { + "amount": amount, + "creditor_name": creditor_name, + "remittance_information": remittance_information, "source_account_number_id": source_account_number_id, "destination_account_number": destination_account_number, "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, - "amount": amount, - "creditor_name": creditor_name, - "remittance_information": remittance_information, "require_approval": require_approval, }, real_time_payments_transfer_create_params.RealTimePaymentsTransferCreateParams, @@ -265,7 +278,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> RealTimePaymentsTransfer: - """Retrieve a Real Time Payments Transfer""" + """ + Retrieve a Real Time Payments Transfer + + Args: + real_time_payments_transfer_id: The identifier of the Real Time Payments Transfer. + + 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 + """ return await self._get( f"/real_time_payments_transfers/{real_time_payments_transfer_id}", options=make_request_options( @@ -321,11 +347,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 639032388..a7be28d4b 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -58,9 +58,9 @@ def list( timeout=timeout, query=maybe_transform( { + "routing_number": routing_number, "cursor": cursor, "limit": limit, - "routing_number": routing_number, }, routing_number_list_params.RoutingNumberListParams, ), @@ -115,9 +115,9 @@ def list( timeout=timeout, query=maybe_transform( { + "routing_number": routing_number, "cursor": cursor, "limit": limit, - "routing_number": routing_number, }, routing_number_list_params.RoutingNumberListParams, ), diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 31b2fc52f..b033c6f90 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. from .cards import Cards, AsyncCards +from .programs import Programs, AsyncPrograms from .documents import Documents, AsyncDocuments from .simulations import Simulations, AsyncSimulations from .card_refunds import CardRefunds, AsyncCardRefunds @@ -44,6 +45,8 @@ "AsyncDigitalWalletTokenRequests", "CheckDeposits", "AsyncCheckDeposits", + "Programs", + "AsyncPrograms", "InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests", "InterestPayments", diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 02713eea4..368b97c5b 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -28,6 +28,19 @@ def complete( endpoint simulates the approval of an [Account Transfer](#account-transfers). You can also approve sandbox Account Transfers in the dashboard. This transfer must first have a `status` of `pending_approval`. + + Args: + account_transfer_id: The identifier of the Account Transfer you wish to complete. + + 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 """ return self._post( f"/simulations/account_transfers/{account_transfer_id}/complete", @@ -60,6 +73,19 @@ async def complete( endpoint simulates the approval of an [Account Transfer](#account-transfers). You can also approve sandbox Account Transfers in the dashboard. This transfer must first have a `status` of `pending_approval`. + + Args: + account_transfer_id: The identifier of the Account Transfer you wish to complete. + + 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 """ return await self._post( f"/simulations/account_transfers/{account_transfer_id}/complete", diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 60daf961a..b38bf244d 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -82,8 +82,8 @@ def create_inbound( "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, - "company_name": company_name, "company_id": company_id, + "company_name": company_name, }, ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, ), @@ -121,10 +121,58 @@ def return_( "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -141,6 +189,8 @@ def return_( the returned funds. This transfer must first have a `status` of `submitted`. Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to return. + reason: The reason why the Federal Reserve or destination bank returned this transfer. Defaults to `no_account`. @@ -186,6 +236,19 @@ def submit( Federal Reserve three times per day on weekdays. Since sandbox ACH Transfers are not submitted to the Federal Reserve, this endpoint allows you to skip that delay and transition the ACH Transfer to a status of `submitted`. + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to submit. + + 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 """ return self._post( f"/simulations/ach_transfers/{ach_transfer_id}/submit", @@ -264,8 +327,8 @@ async def create_inbound( "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, - "company_name": company_name, "company_id": company_id, + "company_name": company_name, }, ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, ), @@ -303,10 +366,58 @@ async def return_( "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -323,6 +434,8 @@ async def return_( the returned funds. This transfer must first have a `status` of `submitted`. Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to return. + reason: The reason why the Federal Reserve or destination bank returned this transfer. Defaults to `no_account`. @@ -368,6 +481,19 @@ async def submit( Federal Reserve three times per day on weekdays. Since sandbox ACH Transfers are not submitted to the Federal Reserve, this endpoint allows you to skip that delay and transition the ACH Transfer to a status of `submitted`. + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to submit. + + 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 """ return await self._post( f"/simulations/ach_transfers/{ach_transfer_id}/submit", diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 16356a0b8..b7bc85e17 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -36,6 +36,8 @@ def action( be actioned one time and must have a status of `pending_reviewing`. Args: + card_dispute_id: The dispute you would like to action. + status: The status to move the dispute to. explanation: Why the dispute was rejected. Not required for accepting disputes. @@ -92,6 +94,8 @@ async def action( be actioned one time and must have a status of `pending_reviewing`. Args: + card_dispute_id: The dispute you would like to action. + status: The status to move the dispute to. explanation: Why the dispute was rejected. Not required for accepting disputes. diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 9fa58f7b4..1b8a0ea3d 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -27,6 +27,19 @@ def reject( Simulates the rejection of a [Check Deposit](#check-deposits) by Increase due to factors like poor image quality. This Check Deposit must first have a `status` of `pending`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to reject. + + 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 """ return self._post( f"/simulations/check_deposits/{check_deposit_id}/reject", @@ -56,6 +69,19 @@ def return_( This Check Deposit must first have a `status` of `submitted`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to return. + + 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 """ return self._post( f"/simulations/check_deposits/{check_deposit_id}/return", @@ -84,6 +110,19 @@ def submit( """ Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to submit. + + 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 """ return self._post( f"/simulations/check_deposits/{check_deposit_id}/submit", @@ -115,6 +154,19 @@ async def reject( Simulates the rejection of a [Check Deposit](#check-deposits) by Increase due to factors like poor image quality. This Check Deposit must first have a `status` of `pending`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to reject. + + 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 """ return await self._post( f"/simulations/check_deposits/{check_deposit_id}/reject", @@ -144,6 +196,19 @@ async def return_( This Check Deposit must first have a `status` of `submitted`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to return. + + 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 """ return await self._post( f"/simulations/check_deposits/{check_deposit_id}/return", @@ -172,6 +237,19 @@ async def submit( """ Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to submit. + + 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 """ return await self._post( f"/simulations/check_deposits/{check_deposit_id}/submit", diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index aab76f59b..9a3e4b750 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -31,6 +31,19 @@ def deposit( This transfer must first have a `status` of `mailed`. + + Args: + check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. + + 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 """ return self._post( f"/simulations/check_transfers/{check_transfer_id}/deposit", @@ -60,6 +73,19 @@ def mail( Simulates the mailing of a [Check Transfer](#check-transfers), which happens once per weekday in production but can be sped up in sandbox. This transfer must first have a `status` of `pending_approval` or `pending_submission`. + + Args: + check_transfer_id: The identifier of the Check Transfer you wish to mail. + + 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 """ return self._post( f"/simulations/check_transfers/{check_transfer_id}/mail", @@ -91,6 +117,8 @@ def return_( Increase. This transfer must first have a `status` of `mailed`. Args: + check_transfer_id: The identifier of the Check Transfer you wish to mark returned. + reason: The reason why the Check Transfer was returned to Increase. extra_headers: Send extra headers @@ -134,6 +162,19 @@ async def deposit( This transfer must first have a `status` of `mailed`. + + Args: + check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. + + 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 """ return await self._post( f"/simulations/check_transfers/{check_transfer_id}/deposit", @@ -163,6 +204,19 @@ async def mail( Simulates the mailing of a [Check Transfer](#check-transfers), which happens once per weekday in production but can be sped up in sandbox. This transfer must first have a `status` of `pending_approval` or `pending_submission`. + + Args: + check_transfer_id: The identifier of the Check Transfer you wish to mail. + + 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 """ return await self._post( f"/simulations/check_transfers/{check_transfer_id}/mail", @@ -194,6 +248,8 @@ async def return_( Increase. This transfer must first have a `status` of `mailed`. Args: + check_transfer_id: The identifier of the Check Transfer you wish to mark returned. + reason: The reason why the Check Transfer was returned to Increase. extra_headers: Send extra headers diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index c660d9113..746656a56 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -109,26 +109,26 @@ def create( "/simulations/inbound_wire_drawdown_requests", body=maybe_transform( { - "recipient_account_number_id": recipient_account_number_id, - "originator_account_number": originator_account_number, - "originator_routing_number": originator_routing_number, + "amount": amount, "beneficiary_account_number": beneficiary_account_number, "beneficiary_routing_number": beneficiary_routing_number, - "amount": amount, "currency": currency, "message_to_recipient": message_to_recipient, + "originator_account_number": originator_account_number, + "originator_routing_number": originator_routing_number, + "recipient_account_number_id": recipient_account_number_id, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "originator_name": originator_name, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, }, inbound_wire_drawdown_request_create_params.InboundWireDrawdownRequestCreateParams, ), @@ -240,26 +240,26 @@ async def create( "/simulations/inbound_wire_drawdown_requests", body=maybe_transform( { - "recipient_account_number_id": recipient_account_number_id, - "originator_account_number": originator_account_number, - "originator_routing_number": originator_routing_number, + "amount": amount, "beneficiary_account_number": beneficiary_account_number, "beneficiary_routing_number": beneficiary_routing_number, - "amount": amount, "currency": currency, "message_to_recipient": message_to_recipient, + "originator_account_number": originator_account_number, + "originator_routing_number": originator_routing_number, + "recipient_account_number_id": recipient_account_number_id, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "originator_name": originator_name, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, }, inbound_wire_drawdown_request_create_params.InboundWireDrawdownRequestCreateParams, ), diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py new file mode 100644 index 000000000..8f606de76 --- /dev/null +++ b/src/increase/resources/simulations/programs.py @@ -0,0 +1,104 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from ...types import Program +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._base_client import make_request_options +from ...types.simulations import program_create_params + +__all__ = ["Programs", "AsyncPrograms"] + + +class Programs(SyncAPIResource): + def create( + self, + *, + name: str, + # 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 | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Program: + """Simulates a program being created in your group. + + By default, your group has one + program called Commercial Banking. Note that when your group operates more than + one program, `program_id` is a required field when creating accounts. + + Args: + name: The name of the program being added. + + 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 + """ + return self._post( + "/simulations/programs", + body=maybe_transform({"name": name}, program_create_params.ProgramCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Program, + ) + + +class AsyncPrograms(AsyncAPIResource): + async def create( + self, + *, + name: str, + # 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 | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Program: + """Simulates a program being created in your group. + + By default, your group has one + program called Commercial Banking. Note that when your group operates more than + one program, `program_id` is a required field when creating accounts. + + Args: + name: The name of the program being added. + + 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 + """ + return await self._post( + "/simulations/programs", + body=maybe_transform({"name": name}, program_create_params.ProgramCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Program, + ) diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 16422dab4..381247547 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -36,6 +36,8 @@ def complete( `status` of `pending_submission`. Args: + real_time_payments_transfer_id: The identifier of the Real Time Payments Transfer you wish to complete. + rejection: If set, the simulation will reject the transfer. extra_headers: Send extra headers @@ -119,11 +121,11 @@ def create_inbound( { "account_number_id": account_number_id, "amount": amount, - "request_for_payment_id": request_for_payment_id, - "debtor_name": debtor_name, "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, "debtor_routing_number": debtor_routing_number, "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, }, real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, ), @@ -158,6 +160,8 @@ async def complete( `status` of `pending_submission`. Args: + real_time_payments_transfer_id: The identifier of the Real Time Payments Transfer you wish to complete. + rejection: If set, the simulation will reject the transfer. extra_headers: Send extra headers @@ -241,11 +245,11 @@ async def create_inbound( { "account_number_id": account_number_id, "amount": amount, - "request_for_payment_id": request_for_payment_id, - "debtor_name": debtor_name, "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, "debtor_routing_number": debtor_routing_number, "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, }, real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, ), diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 94c213ce3..3fdefe948 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -5,6 +5,7 @@ from typing import TYPE_CHECKING from .cards import Cards, AsyncCards +from .programs import Programs, AsyncPrograms from .documents import Documents, AsyncDocuments from ..._resource import SyncAPIResource, AsyncAPIResource from .card_refunds import CardRefunds, AsyncCardRefunds @@ -45,6 +46,7 @@ class Simulations(SyncAPIResource): documents: Documents digital_wallet_token_requests: DigitalWalletTokenRequests check_deposits: CheckDeposits + programs: Programs inbound_wire_drawdown_requests: InboundWireDrawdownRequests interest_payments: InterestPayments wire_transfers: WireTransfers @@ -62,6 +64,7 @@ def __init__(self, client: Increase) -> None: self.documents = Documents(client) self.digital_wallet_token_requests = DigitalWalletTokenRequests(client) self.check_deposits = CheckDeposits(client) + self.programs = Programs(client) self.inbound_wire_drawdown_requests = InboundWireDrawdownRequests(client) self.interest_payments = InterestPayments(client) self.wire_transfers = WireTransfers(client) @@ -79,6 +82,7 @@ class AsyncSimulations(AsyncAPIResource): documents: AsyncDocuments digital_wallet_token_requests: AsyncDigitalWalletTokenRequests check_deposits: AsyncCheckDeposits + programs: AsyncPrograms inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests interest_payments: AsyncInterestPayments wire_transfers: AsyncWireTransfers @@ -96,6 +100,7 @@ def __init__(self, client: AsyncIncrease) -> None: self.documents = AsyncDocuments(client) self.digital_wallet_token_requests = AsyncDigitalWalletTokenRequests(client) self.check_deposits = AsyncCheckDeposits(client) + self.programs = AsyncPrograms(client) self.inbound_wire_drawdown_requests = AsyncInboundWireDrawdownRequests(client) self.interest_payments = AsyncInterestPayments(client) self.wire_transfers = AsyncWireTransfers(client) diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index f3c91194a..668a2c67d 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -24,7 +24,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Transaction: - """Retrieve a Transaction""" + """ + Retrieve a Transaction + + Args: + transaction_id: The identifier of the Transaction to retrieve. + + 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 + """ return self._get( f"/transactions/{transaction_id}", options=make_request_options( @@ -81,12 +94,12 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "category": category, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, - "created_at": created_at, - "category": category, }, transaction_list_params.TransactionListParams, ), @@ -107,7 +120,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> Transaction: - """Retrieve a Transaction""" + """ + Retrieve a Transaction + + Args: + transaction_id: The identifier of the Transaction to retrieve. + + 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 + """ return await self._get( f"/transactions/{transaction_id}", options=make_request_options( @@ -164,12 +190,12 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, + "category": category, + "created_at": created_at, "cursor": cursor, "limit": limit, - "account_id": account_id, "route_id": route_id, - "created_at": created_at, - "category": category, }, transaction_list_params.TransactionListParams, ), diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 6fd693941..0cbed8fa4 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -77,8 +77,8 @@ def create( "amount": amount, "message_to_recipient": message_to_recipient, "recipient_account_number": recipient_account_number, - "recipient_routing_number": recipient_routing_number, "recipient_name": recipient_name, + "recipient_routing_number": recipient_routing_number, "recipient_address_line1": recipient_address_line1, "recipient_address_line2": recipient_address_line2, "recipient_address_line3": recipient_address_line3, @@ -106,7 +106,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> WireDrawdownRequest: - """Retrieve a Wire Drawdown Request""" + """ + Retrieve a Wire Drawdown Request + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request to retrieve. + + 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 + """ return self._get( f"/wire_drawdown_requests/{wire_drawdown_request_id}", options=make_request_options( @@ -225,8 +238,8 @@ async def create( "amount": amount, "message_to_recipient": message_to_recipient, "recipient_account_number": recipient_account_number, - "recipient_routing_number": recipient_routing_number, "recipient_name": recipient_name, + "recipient_routing_number": recipient_routing_number, "recipient_address_line1": recipient_address_line1, "recipient_address_line2": recipient_address_line2, "recipient_address_line3": recipient_address_line3, @@ -254,7 +267,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> WireDrawdownRequest: - """Retrieve a Wire Drawdown Request""" + """ + Retrieve a Wire Drawdown Request + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request to retrieve. + + 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 + """ return await self._get( f"/wire_drawdown_requests/{wire_drawdown_request_id}", options=make_request_options( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 166cdfe83..67dc2eaf9 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -78,16 +78,16 @@ def create( body=maybe_transform( { "account_id": account_id, - "account_number": account_number, - "routing_number": routing_number, - "external_account_id": external_account_id, "amount": amount, - "message_to_recipient": message_to_recipient, "beneficiary_name": beneficiary_name, + "message_to_recipient": message_to_recipient, + "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, "beneficiary_address_line3": beneficiary_address_line3, + "external_account_id": external_account_id, "require_approval": require_approval, + "routing_number": routing_number, }, wire_transfer_create_params.WireTransferCreateParams, ), @@ -112,7 +112,20 @@ def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> WireTransfer: - """Retrieve a Wire Transfer""" + """ + Retrieve a Wire Transfer + + Args: + wire_transfer_id: The identifier of the Wire Transfer. + + 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 + """ return self._get( f"/wire_transfers/{wire_transfer_id}", options=make_request_options( @@ -167,11 +180,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, wire_transfer_list_params.WireTransferListParams, ), @@ -191,7 +204,22 @@ def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> WireTransfer: - """Approve a Wire Transfer""" + """ + Approve a Wire Transfer + + Args: + wire_transfer_id: The identifier of the Wire Transfer to approve. + + 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 + """ return self._post( f"/wire_transfers/{wire_transfer_id}/approve", options=make_request_options( @@ -216,7 +244,22 @@ def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> WireTransfer: - """Cancel a pending Wire Transfer""" + """ + Cancel a pending Wire Transfer + + Args: + wire_transfer_id: The identifier of the pending Wire Transfer to cancel. + + 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 + """ return self._post( f"/wire_transfers/{wire_transfer_id}/cancel", options=make_request_options( @@ -246,6 +289,19 @@ def reverse( Reserve due to error conditions. This will also create a [Transaction](#transaction) to account for the returned funds. This Wire Transfer must first have a `status` of `complete`.' + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + + 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 """ return self._post( f"/simulations/wire_transfers/{wire_transfer_id}/reverse", @@ -275,6 +331,19 @@ def submit( Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal Reserve. This transfer must first have a `status` of `pending_approval` or `pending_creating`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + + 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 """ return self._post( f"/simulations/wire_transfers/{wire_transfer_id}/submit", @@ -355,16 +424,16 @@ async def create( body=maybe_transform( { "account_id": account_id, - "account_number": account_number, - "routing_number": routing_number, - "external_account_id": external_account_id, "amount": amount, - "message_to_recipient": message_to_recipient, "beneficiary_name": beneficiary_name, + "message_to_recipient": message_to_recipient, + "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, "beneficiary_address_line3": beneficiary_address_line3, + "external_account_id": external_account_id, "require_approval": require_approval, + "routing_number": routing_number, }, wire_transfer_create_params.WireTransferCreateParams, ), @@ -389,7 +458,20 @@ async def retrieve( extra_body: Body | None = None, timeout: float | None | NotGiven = NOT_GIVEN, ) -> WireTransfer: - """Retrieve a Wire Transfer""" + """ + Retrieve a Wire Transfer + + Args: + wire_transfer_id: The identifier of the Wire Transfer. + + 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 + """ return await self._get( f"/wire_transfers/{wire_transfer_id}", options=make_request_options( @@ -444,11 +526,11 @@ def list( timeout=timeout, query=maybe_transform( { - "cursor": cursor, - "limit": limit, "account_id": account_id, - "external_account_id": external_account_id, "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "limit": limit, }, wire_transfer_list_params.WireTransferListParams, ), @@ -468,7 +550,22 @@ async def approve( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> WireTransfer: - """Approve a Wire Transfer""" + """ + Approve a Wire Transfer + + Args: + wire_transfer_id: The identifier of the Wire Transfer to approve. + + 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 + """ return await self._post( f"/wire_transfers/{wire_transfer_id}/approve", options=make_request_options( @@ -493,7 +590,22 @@ async def cancel( timeout: float | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> WireTransfer: - """Cancel a pending Wire Transfer""" + """ + Cancel a pending Wire Transfer + + Args: + wire_transfer_id: The identifier of the pending Wire Transfer to cancel. + + 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 + """ return await self._post( f"/wire_transfers/{wire_transfer_id}/cancel", options=make_request_options( @@ -523,6 +635,19 @@ async def reverse( Reserve due to error conditions. This will also create a [Transaction](#transaction) to account for the returned funds. This Wire Transfer must first have a `status` of `complete`.' + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + + 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 """ return await self._post( f"/simulations/wire_transfers/{wire_transfer_id}/reverse", @@ -552,6 +677,19 @@ async def submit( Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal Reserve. This transfer must first have a `status` of `pending_approval` or `pending_creating`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + + 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 """ return await self._post( f"/simulations/wire_transfers/{wire_transfer_id}/submit", diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 1ff104996..a12b2b93c 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -46,6 +46,13 @@ class Account(BaseModel): interest was accrued. """ + interest_rate: str + """ + The Interest Rate currently being earned on the account, as a string containing + a decimal number. For example, a 1% interest rate would be represented as + "0.01". + """ + name: str """The name you choose for the Account.""" diff --git a/src/increase/types/account_create_params.py b/src/increase/types/account_create_params.py index ed9fbcaed..0f9d3edd1 100644 --- a/src/increase/types/account_create_params.py +++ b/src/increase/types/account_create_params.py @@ -21,4 +21,7 @@ class AccountCreateParams(TypedDict, total=False): """ program_id: str - """The identifier for the Program that this Account falls under.""" + """The identifier for the Program that this Account falls under. + + Required if you operate more than one Program. + """ diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py index 5ca653b83..fec74ac9f 100644 --- a/src/increase/types/account_list_params.py +++ b/src/increase/types/account_list_params.py @@ -11,6 +11,28 @@ __all__ = ["AccountListParams", "CreatedAt"] +class AccountListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + entity_id: str + """Filter Accounts for those belonging to the specified Entity.""" + + informational_entity_id: str + """Filter Accounts for those belonging to the specified Entity as informational.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Literal["open", "closed"] + """Filter Accounts for those with the specified status.""" + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,22 +57,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class AccountListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - entity_id: str - """Filter Accounts for those belonging to the specified Entity.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - status: Literal["open", "closed"] - """Filter Accounts for those with the specified status.""" diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py index 327c8c3a3..effd21c00 100644 --- a/src/increase/types/account_number_list_params.py +++ b/src/increase/types/account_number_list_params.py @@ -11,6 +11,25 @@ __all__ = ["AccountNumberListParams", "CreatedAt"] +class AccountNumberListParams(TypedDict, total=False): + account_id: str + """Filter Account Numbers to those belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Literal["active", "disabled", "canceled"] + """The status to retrieve Account Numbers for.""" + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,22 +54,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class AccountNumberListParams(TypedDict, total=False): - account_id: str - """Filter Account Numbers to those belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - status: Literal["active", "disabled", "canceled"] - """The status to retrieve Account Numbers for.""" diff --git a/src/increase/types/account_statement_list_params.py b/src/increase/types/account_statement_list_params.py index 876d4e735..f6f6ac65e 100644 --- a/src/increase/types/account_statement_list_params.py +++ b/src/increase/types/account_statement_list_params.py @@ -11,6 +11,22 @@ __all__ = ["AccountStatementListParams", "StatementPeriodStart"] +class AccountStatementListParams(TypedDict, total=False): + account_id: str + """Filter Account Statements to those belonging to the specified Account.""" + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + statement_period_start: StatementPeriodStart + + class StatementPeriodStart(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class StatementPeriodStart(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class AccountStatementListParams(TypedDict, total=False): - account_id: str - """Filter Account Statements to those belonging to the specified Account.""" - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - statement_period_start: StatementPeriodStart diff --git a/src/increase/types/account_transfer_list_params.py b/src/increase/types/account_transfer_list_params.py index 1b0b32aa5..dbca66577 100644 --- a/src/increase/types/account_transfer_list_params.py +++ b/src/increase/types/account_transfer_list_params.py @@ -11,6 +11,22 @@ __all__ = ["AccountTransferListParams", "CreatedAt"] +class AccountTransferListParams(TypedDict, total=False): + account_id: str + """Filter Account Transfers to those that originated from the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class AccountTransferListParams(TypedDict, total=False): - account_id: str - """Filter Account Transfers to those that originated from the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/ach_prenotification_list_params.py b/src/increase/types/ach_prenotification_list_params.py index 7de01c044..6eb5bd04d 100644 --- a/src/increase/types/ach_prenotification_list_params.py +++ b/src/increase/types/ach_prenotification_list_params.py @@ -11,6 +11,19 @@ __all__ = ["ACHPrenotificationListParams", "CreatedAt"] +class ACHPrenotificationListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,16 +48,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class ACHPrenotificationListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 7158ad16d..bac1c84d7 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -60,6 +60,9 @@ class Return(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -80,10 +83,58 @@ class Return(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" diff --git a/src/increase/types/ach_transfer_list_params.py b/src/increase/types/ach_transfer_list_params.py index 8c8c94be9..8a33906f1 100644 --- a/src/increase/types/ach_transfer_list_params.py +++ b/src/increase/types/ach_transfer_list_params.py @@ -11,6 +11,25 @@ __all__ = ["ACHTransferListParams", "CreatedAt"] +class ACHTransferListParams(TypedDict, total=False): + account_id: str + """Filter ACH Transfers to those that originated from the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + external_account_id: str + """Filter ACH Transfers to those made to the specified External Account.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,22 +54,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class ACHTransferListParams(TypedDict, total=False): - account_id: str - """Filter ACH Transfers to those that originated from the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - external_account_id: str - """Filter ACH Transfers to those made to the specified External Account.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/bookkeeping_entry_set_create_params.py b/src/increase/types/bookkeeping_entry_set_create_params.py index 5eb2c9dc6..d0f6b37ae 100644 --- a/src/increase/types/bookkeeping_entry_set_create_params.py +++ b/src/increase/types/bookkeeping_entry_set_create_params.py @@ -11,18 +11,6 @@ __all__ = ["BookkeepingEntrySetCreateParams", "Entry"] -class Entry(TypedDict, total=False): - account_id: Required[str] - """The identifier for the Bookkeeping Account impacted by this entry.""" - - amount: Required[int] - """The entry amount in the minor unit of the account currency. - - For dollars, for example, this is cents. Debit entries have positive amounts; - credit entries have negative amounts. - """ - - class BookkeepingEntrySetCreateParams(TypedDict, total=False): entries: Required[List[Entry]] """The bookkeeping entries.""" @@ -36,3 +24,15 @@ class BookkeepingEntrySetCreateParams(TypedDict, total=False): transaction_id: str """The identifier of the Transaction related to this entry set, if any.""" + + +class Entry(TypedDict, total=False): + account_id: Required[str] + """The identifier for the Bookkeeping Account impacted by this entry.""" + + amount: Required[int] + """The entry amount in the minor unit of the account currency. + + For dollars, for example, this is cents. Debit entries have positive amounts; + credit entries have negative amounts. + """ diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py index 38e960272..b13ddbc55 100644 --- a/src/increase/types/card_create_params.py +++ b/src/increase/types/card_create_params.py @@ -7,6 +7,26 @@ __all__ = ["CardCreateParams", "BillingAddress", "DigitalWallet"] +class CardCreateParams(TypedDict, total=False): + account_id: Required[str] + """The Account the card should belong to.""" + + billing_address: BillingAddress + """The card's billing address.""" + + description: str + """The description you choose to give the card.""" + + digital_wallet: DigitalWallet + """ + The contact information used in the two-factor steps for digital wallet card + creation. To add the card to a digital wallet, you may supply an email or phone + number with this request. Otherwise, subscribe and then action a Real Time + Decision with the category `digital_wallet_token_requested` or + `digital_wallet_authentication_requested`. + """ + + class BillingAddress(TypedDict, total=False): city: Required[str] """The city of the billing address.""" @@ -42,23 +62,3 @@ class DigitalWallet(TypedDict, total=False): A phone number that can be used to verify the cardholder via one-time passcode over SMS. """ - - -class CardCreateParams(TypedDict, total=False): - account_id: Required[str] - """The Account the card should belong to.""" - - billing_address: BillingAddress - """The card's billing address.""" - - description: str - """The description you choose to give the card.""" - - digital_wallet: DigitalWallet - """ - The contact information used in the two-factor steps for digital wallet card - creation. To add the card to a digital wallet, you may supply an email or phone - number with this request. Otherwise, subscribe and then action a Real Time - Decision with the category `digital_wallet_token_requested` or - `digital_wallet_authentication_requested`. - """ diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py index dac503a29..dbf23cbf0 100644 --- a/src/increase/types/card_dispute_list_params.py +++ b/src/increase/types/card_dispute_list_params.py @@ -11,6 +11,21 @@ __all__ = ["CardDisputeListParams", "CreatedAt", "Status"] +class CardDisputeListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -48,18 +63,3 @@ class CreatedAt(TypedDict, total=False): class Status(_StatusReservedKeywords, total=False): pass - - -class CardDisputeListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - status: Status diff --git a/src/increase/types/card_list_params.py b/src/increase/types/card_list_params.py index 7e03989c7..0cce6b796 100644 --- a/src/increase/types/card_list_params.py +++ b/src/increase/types/card_list_params.py @@ -11,6 +11,22 @@ __all__ = ["CardListParams", "CreatedAt"] +class CardListParams(TypedDict, total=False): + account_id: str + """Filter Cards to ones belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class CardListParams(TypedDict, total=False): - account_id: str - """Filter Cards to ones belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/card_profile_create_params.py b/src/increase/types/card_profile_create_params.py index 625894a49..dbfc694b7 100644 --- a/src/increase/types/card_profile_create_params.py +++ b/src/increase/types/card_profile_create_params.py @@ -7,6 +7,18 @@ __all__ = ["CardProfileCreateParams", "DigitalWallets", "DigitalWalletsTextColor"] +class CardProfileCreateParams(TypedDict, total=False): + description: Required[str] + """A description you can use to identify the Card Profile.""" + + digital_wallets: Required[DigitalWallets] + """How Cards should appear in digital wallets such as Apple Pay. + + Different wallets will use these values to render card artwork appropriately for + their app. + """ + + class DigitalWalletsTextColor(TypedDict, total=False): blue: Required[int] """The value of the blue channel in the RGB color.""" @@ -42,15 +54,3 @@ class DigitalWallets(TypedDict, total=False): text_color: DigitalWalletsTextColor """The Card's text color, specified as an RGB triple. The default is white.""" - - -class CardProfileCreateParams(TypedDict, total=False): - description: Required[str] - """A description you can use to identify the Card Profile.""" - - digital_wallets: Required[DigitalWallets] - """How Cards should appear in digital wallets such as Apple Pay. - - Different wallets will use these values to render card artwork appropriately for - their app. - """ diff --git a/src/increase/types/card_profile_list_params.py b/src/increase/types/card_profile_list_params.py index 771301941..c8b23e3e4 100644 --- a/src/increase/types/card_profile_list_params.py +++ b/src/increase/types/card_profile_list_params.py @@ -7,18 +7,6 @@ __all__ = ["CardProfileListParams", "Status"] -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending", "rejected", "active", "archived"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass - class CardProfileListParams(TypedDict, total=False): cursor: str @@ -31,3 +19,16 @@ class CardProfileListParams(TypedDict, total=False): """ status: Status + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "rejected", "active", "archived"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index d63588704..4d583d0a1 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -7,6 +7,24 @@ __all__ = ["CardUpdateParams", "BillingAddress", "DigitalWallet"] +class CardUpdateParams(TypedDict, total=False): + billing_address: BillingAddress + """The card's updated billing address.""" + + description: str + """The description you choose to give the card.""" + + digital_wallet: DigitalWallet + """ + The contact information used in the two-factor steps for digital wallet card + creation. At least one field must be present to complete the digital wallet + steps. + """ + + status: Literal["active", "disabled", "canceled"] + """The status to update the Card with.""" + + class BillingAddress(TypedDict, total=False): city: Required[str] """The city of the billing address.""" @@ -42,21 +60,3 @@ class DigitalWallet(TypedDict, total=False): A phone number that can be used to verify the cardholder via one-time passcode over SMS. """ - - -class CardUpdateParams(TypedDict, total=False): - billing_address: BillingAddress - """The card's updated billing address.""" - - description: str - """The description you choose to give the card.""" - - digital_wallet: DigitalWallet - """ - The contact information used in the two-factor steps for digital wallet card - creation. At least one field must be present to complete the digital wallet - steps. - """ - - status: Literal["active", "disabled", "canceled"] - """The status to update the Card with.""" diff --git a/src/increase/types/check_deposit_list_params.py b/src/increase/types/check_deposit_list_params.py index c9dbc3ad2..5178a83c2 100644 --- a/src/increase/types/check_deposit_list_params.py +++ b/src/increase/types/check_deposit_list_params.py @@ -11,6 +11,22 @@ __all__ = ["CheckDepositListParams", "CreatedAt"] +class CheckDepositListParams(TypedDict, total=False): + account_id: str + """Filter Check Deposits to those belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class CheckDepositListParams(TypedDict, total=False): - account_id: str - """Filter Check Deposits to those belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 23d8adc89..1c7a4a39f 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -7,26 +7,6 @@ __all__ = ["CheckTransferCreateParams", "ReturnAddress"] -class ReturnAddress(TypedDict, total=False): - city: Required[str] - """The city of the return address.""" - - line1: Required[str] - """The first line of the return address.""" - - name: Required[str] - """The name of the return address.""" - - state: Required[str] - """The US state of the return address.""" - - zip: Required[str] - """The postal code of the return address.""" - - line2: str - """The second line of the return address.""" - - class CheckTransferCreateParams(TypedDict, total=False): account_id: Required[str] """The identifier for the account that will send the transfer.""" @@ -67,3 +47,23 @@ class CheckTransferCreateParams(TypedDict, total=False): If omitted this will default to the address of the Entity of the Account used to make the Check Transfer. """ + + +class ReturnAddress(TypedDict, total=False): + city: Required[str] + """The city of the return address.""" + + line1: Required[str] + """The first line of the return address.""" + + name: Required[str] + """The name of the return address.""" + + state: Required[str] + """The US state of the return address.""" + + zip: Required[str] + """The postal code of the return address.""" + + line2: str + """The second line of the return address.""" diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py index ceedbd528..55d8e613b 100644 --- a/src/increase/types/check_transfer_list_params.py +++ b/src/increase/types/check_transfer_list_params.py @@ -11,6 +11,22 @@ __all__ = ["CheckTransferListParams", "CreatedAt"] +class CheckTransferListParams(TypedDict, total=False): + account_id: str + """Filter Check Transfers to those that originated from the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class CheckTransferListParams(TypedDict, total=False): - account_id: str - """Filter Check Transfers to those that originated from the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index db7c60051..ace8ed443 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -181,6 +181,7 @@ class SourceCheckDecline(BaseModel): "group_locked", "insufficient_funds", "unable_to_locate_account", + "not_our_item", "unable_to_process", "refer_to_image", "stop_payment_requested", diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index 083a8255f..c4eccd062 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -11,6 +11,25 @@ __all__ = ["DeclinedTransactionListParams", "CreatedAt"] +class DeclinedTransactionListParams(TypedDict, total=False): + account_id: str + """Filter Declined Transactions to ones belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + route_id: str + """Filter Declined Transactions to those belonging to the specified route.""" + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,22 +54,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class DeclinedTransactionListParams(TypedDict, total=False): - account_id: str - """Filter Declined Transactions to ones belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - route_id: str - """Filter Declined Transactions to those belonging to the specified route.""" diff --git a/src/increase/types/digital_wallet_token_list_params.py b/src/increase/types/digital_wallet_token_list_params.py index bc976ca1b..41eac7fc0 100644 --- a/src/increase/types/digital_wallet_token_list_params.py +++ b/src/increase/types/digital_wallet_token_list_params.py @@ -11,6 +11,22 @@ __all__ = ["DigitalWalletTokenListParams", "CreatedAt"] +class DigitalWalletTokenListParams(TypedDict, total=False): + card_id: str + """Filter Digital Wallet Tokens to ones belonging to the specified Card.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,19 +51,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class DigitalWalletTokenListParams(TypedDict, total=False): - card_id: str - """Filter Digital Wallet Tokens to ones belonging to the specified Card.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py index 0defa612d..ab5c24409 100644 --- a/src/increase/types/document_list_params.py +++ b/src/increase/types/document_list_params.py @@ -10,6 +10,25 @@ __all__ = ["DocumentListParams", "Category", "CreatedAt"] + +class DocumentListParams(TypedDict, total=False): + category: Category + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + entity_id: str + """Filter Documents to ones belonging to the specified Entity.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + _CategoryReservedKeywords = TypedDict( "_CategoryReservedKeywords", { @@ -99,21 +118,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class DocumentListParams(TypedDict, total=False): - category: Category - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - entity_id: str - """Filter Documents to ones belonging to the specified Entity.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/entities/__init__.py b/src/increase/types/entities/__init__.py index 38c593958..c7bf63561 100644 --- a/src/increase/types/entities/__init__.py +++ b/src/increase/types/entities/__init__.py @@ -2,6 +2,10 @@ from __future__ import annotations +from .supplemental_document import SupplementalDocument as SupplementalDocument +from .supplemental_document_list_params import ( + SupplementalDocumentListParams as SupplementalDocumentListParams, +) from .supplemental_document_create_params import ( SupplementalDocumentCreateParams as SupplementalDocumentCreateParams, ) diff --git a/src/increase/types/entities/supplemental_document.py b/src/increase/types/entities/supplemental_document.py new file mode 100644 index 000000000..e2ea94ffa --- /dev/null +++ b/src/increase/types/entities/supplemental_document.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. + +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["SupplementalDocument"] + + +class SupplementalDocument(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the + Supplemental Document was created. + """ + + file_id: str + """The File containing the document.""" + + type: Literal["entity_supplemental_document"] + """A constant representing the object's type. + + For this resource it will always be `entity_supplemental_document`. + """ diff --git a/src/increase/types/entities/supplemental_document_list_params.py b/src/increase/types/entities/supplemental_document_list_params.py new file mode 100644 index 000000000..a910f20aa --- /dev/null +++ b/src/increase/types/entities/supplemental_document_list_params.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["SupplementalDocumentListParams"] + + +class SupplementalDocumentListParams(TypedDict, total=False): + entity_id: Required[str] + """The identifier of the Entity to list supplemental documents for.""" + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index f51fbbf9b..91d4917b1 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. from typing import List, Optional -from datetime import date +from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel @@ -395,9 +395,21 @@ class Trust(BaseModel): class SupplementalDocument(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the + Supplemental Document was created. + """ + file_id: str """The File containing the document.""" + type: Literal["entity_supplemental_document"] + """A constant representing the object's type. + + For this resource it will always be `entity_supplemental_document`. + """ + class Entity(BaseModel): corporation: Optional[Corporation] @@ -431,7 +443,12 @@ class Entity(BaseModel): """The entity's legal structure.""" supplemental_documents: List[SupplementalDocument] - """Additional documentation associated with the entity.""" + """Additional documentation associated with the entity. + + This is limited to the first 10 documents for an entity. If an entity has more + than 10 documents, use the GET /entity_supplemental_documents list endpoint to + retrieve them. + """ trust: Optional[Trust] """Details of the trust entity. diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 5fac86a77..67d8fdd42 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -19,12 +19,6 @@ "CorporationBeneficialOwnerIndividualIdentificationPassport", "CorporationBeneficialOwnerIndividualIdentificationDriversLicense", "CorporationBeneficialOwnerIndividualIdentificationOther", - "NaturalPerson", - "NaturalPersonAddress", - "NaturalPersonIdentification", - "NaturalPersonIdentificationPassport", - "NaturalPersonIdentificationDriversLicense", - "NaturalPersonIdentificationOther", "Joint", "JointIndividual", "JointIndividualAddress", @@ -32,6 +26,13 @@ "JointIndividualIdentificationPassport", "JointIndividualIdentificationDriversLicense", "JointIndividualIdentificationOther", + "NaturalPerson", + "NaturalPersonAddress", + "NaturalPersonIdentification", + "NaturalPersonIdentificationPassport", + "NaturalPersonIdentificationDriversLicense", + "NaturalPersonIdentificationOther", + "SupplementalDocument", "Trust", "TrustAddress", "TrustTrustee", @@ -47,10 +48,49 @@ "TrustGrantorIdentificationPassport", "TrustGrantorIdentificationDriversLicense", "TrustGrantorIdentificationOther", - "SupplementalDocument", ] +class EntityCreateParams(TypedDict, total=False): + relationship: Required[Literal["affiliated", "informational", "unaffiliated"]] + """The relationship between your group and the entity.""" + + structure: Required[Literal["corporation", "natural_person", "joint", "trust"]] + """The type of Entity to create.""" + + corporation: Corporation + """Details of the corporation entity to create. + + Required if `structure` is equal to `corporation`. + """ + + description: str + """The description you choose to give the entity.""" + + joint: Joint + """Details of the joint entity to create. + + Required if `structure` is equal to `joint`. + """ + + natural_person: NaturalPerson + """Details of the natural person entity to create. + + Required if `structure` is equal to `natural_person`. Natural people entities + should be submitted with `social_security_number` or + `individual_taxpayer_identification_number` identification methods. + """ + + supplemental_documents: List[SupplementalDocument] + """Additional documentation associated with the entity.""" + + trust: Trust + """Details of the trust entity to create. + + Required if `structure` is equal to `trust`. + """ + + class CorporationAddress(TypedDict, total=False): city: Required[str] """The city of the address.""" @@ -226,7 +266,7 @@ class Corporation(TypedDict, total=False): """The website of the corporation.""" -class NaturalPersonAddress(TypedDict, total=False): +class JointIndividualAddress(TypedDict, total=False): city: Required[str] """The city of the address.""" @@ -246,7 +286,7 @@ class NaturalPersonAddress(TypedDict, total=False): """The second line of the address. This might be the floor or room number.""" -class NaturalPersonIdentificationPassport(TypedDict, total=False): +class JointIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] """The country that issued the passport.""" @@ -257,7 +297,7 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): +class JointIndividualIdentificationDriversLicense(TypedDict, total=False): expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -268,7 +308,7 @@ class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): """The state that issued the provided driver's license.""" -class NaturalPersonIdentificationOther(TypedDict, total=False): +class JointIndividualIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -285,7 +325,7 @@ class NaturalPersonIdentificationOther(TypedDict, total=False): """The document's expiration date in YYYY-MM-DD format.""" -class NaturalPersonIdentification(TypedDict, total=False): +class JointIndividualIdentification(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -303,33 +343,33 @@ class NaturalPersonIdentification(TypedDict, total=False): such as a social security number. """ - drivers_license: NaturalPersonIdentificationDriversLicense + drivers_license: JointIndividualIdentificationDriversLicense """Information about the United States driver's license used for identification. Required if `method` is equal to `drivers_license`. """ - other: NaturalPersonIdentificationOther + other: JointIndividualIdentificationOther """Information about the identification document provided. Required if `method` is equal to `other`. """ - passport: NaturalPersonIdentificationPassport + passport: JointIndividualIdentificationPassport """Information about the passport used for identification. Required if `method` is equal to `passport`. """ -class NaturalPerson(TypedDict, total=False): - address: Required[NaturalPersonAddress] +class JointIndividual(TypedDict, total=False): + address: Required[JointIndividualAddress] """The individual's address.""" date_of_birth: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The person's date of birth in YYYY-MM-DD format.""" - identification: Required[NaturalPersonIdentification] + identification: Required[JointIndividualIdentification] """A means of verifying the person's identity.""" name: Required[str] @@ -344,7 +384,15 @@ class NaturalPerson(TypedDict, total=False): """ -class JointIndividualAddress(TypedDict, total=False): +class Joint(TypedDict, total=False): + individuals: Required[List[JointIndividual]] + """The two individuals that share control of the entity.""" + + name: str + """The name of the joint entity.""" + + +class NaturalPersonAddress(TypedDict, total=False): city: Required[str] """The city of the address.""" @@ -364,7 +412,7 @@ class JointIndividualAddress(TypedDict, total=False): """The second line of the address. This might be the floor or room number.""" -class JointIndividualIdentificationPassport(TypedDict, total=False): +class NaturalPersonIdentificationPassport(TypedDict, total=False): country: Required[str] """The country that issued the passport.""" @@ -375,7 +423,7 @@ class JointIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class JointIndividualIdentificationDriversLicense(TypedDict, total=False): +class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -386,7 +434,7 @@ class JointIndividualIdentificationDriversLicense(TypedDict, total=False): """The state that issued the provided driver's license.""" -class JointIndividualIdentificationOther(TypedDict, total=False): +class NaturalPersonIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -403,7 +451,7 @@ class JointIndividualIdentificationOther(TypedDict, total=False): """The document's expiration date in YYYY-MM-DD format.""" -class JointIndividualIdentification(TypedDict, total=False): +class NaturalPersonIdentification(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -421,33 +469,33 @@ class JointIndividualIdentification(TypedDict, total=False): such as a social security number. """ - drivers_license: JointIndividualIdentificationDriversLicense + drivers_license: NaturalPersonIdentificationDriversLicense """Information about the United States driver's license used for identification. Required if `method` is equal to `drivers_license`. """ - other: JointIndividualIdentificationOther + other: NaturalPersonIdentificationOther """Information about the identification document provided. Required if `method` is equal to `other`. """ - passport: JointIndividualIdentificationPassport + passport: NaturalPersonIdentificationPassport """Information about the passport used for identification. Required if `method` is equal to `passport`. """ -class JointIndividual(TypedDict, total=False): - address: Required[JointIndividualAddress] +class NaturalPerson(TypedDict, total=False): + address: Required[NaturalPersonAddress] """The individual's address.""" date_of_birth: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The person's date of birth in YYYY-MM-DD format.""" - identification: Required[JointIndividualIdentification] + identification: Required[NaturalPersonIdentification] """A means of verifying the person's identity.""" name: Required[str] @@ -462,12 +510,9 @@ class JointIndividual(TypedDict, total=False): """ -class Joint(TypedDict, total=False): - individuals: Required[List[JointIndividual]] - """The two individuals that share control of the entity.""" - - name: str - """The name of the joint entity.""" +class SupplementalDocument(TypedDict, total=False): + file_id: Required[str] + """The identifier of the File containing the document.""" class TrustAddress(TypedDict, total=False): @@ -771,48 +816,3 @@ class Trust(TypedDict, total=False): Required if `category` is equal to `irrevocable`. """ - - -class SupplementalDocument(TypedDict, total=False): - file_id: Required[str] - """The identifier of the File containing the document.""" - - -class EntityCreateParams(TypedDict, total=False): - relationship: Required[Literal["affiliated", "informational", "unaffiliated"]] - """The relationship between your group and the entity.""" - - structure: Required[Literal["corporation", "natural_person", "joint", "trust"]] - """The type of Entity to create.""" - - corporation: Corporation - """Details of the corporation entity to create. - - Required if `structure` is equal to `corporation`. - """ - - description: str - """The description you choose to give the entity.""" - - joint: Joint - """Details of the joint entity to create. - - Required if `structure` is equal to `joint`. - """ - - natural_person: NaturalPerson - """Details of the natural person entity to create. - - Required if `structure` is equal to `natural_person`. Natural people entities - should be submitted with `social_security_number` or - `individual_taxpayer_identification_number` identification methods. - """ - - supplemental_documents: List[SupplementalDocument] - """Additional documentation associated with the entity.""" - - trust: Trust - """Details of the trust entity to create. - - Required if `structure` is equal to `trust`. - """ diff --git a/src/increase/types/entity_list_params.py b/src/increase/types/entity_list_params.py index 1dccdb02a..07f02b2e5 100644 --- a/src/increase/types/entity_list_params.py +++ b/src/increase/types/entity_list_params.py @@ -11,6 +11,19 @@ __all__ = ["EntityListParams", "CreatedAt"] +class EntityListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,16 +48,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class EntityListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index ea1e2ab7b..16cceebfa 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -8,32 +8,24 @@ from .._utils import PropertyInfo -__all__ = ["EventListParams", "CreatedAt", "Category"] +__all__ = ["EventListParams", "Category", "CreatedAt"] -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ +class EventListParams(TypedDict, total=False): + associated_object_id: str + """Filter Events to those belonging to the object with the provided identifier.""" - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ + category: Category - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ + created_at: CreatedAt - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. """ @@ -103,19 +95,27 @@ class Category(_CategoryReservedKeywords, total=False): pass -class EventListParams(TypedDict, total=False): - associated_object_id: str - """Filter Events to those belonging to the object with the provided identifier.""" - - category: Category - - created_at: CreatedAt +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ - cursor: str - """Return the page of entries after this one.""" + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ - limit: int - """Limit the size of the list that is returned. + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ - The default (and maximum) is 100 objects. + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 2c6d6df91..d088d1dd7 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -8,10 +8,27 @@ from .._utils import PropertyInfo -__all__ = ["ExportCreateParams", "TransactionCsv", "TransactionCsvCreatedAt", "BalanceCsv", "BalanceCsvCreatedAt"] +__all__ = ["ExportCreateParams", "BalanceCsv", "BalanceCsvCreatedAt", "TransactionCsv", "TransactionCsvCreatedAt"] -class TransactionCsvCreatedAt(TypedDict, total=False): +class ExportCreateParams(TypedDict, total=False): + category: Required[Literal["transaction_csv", "balance_csv"]] + """The type of Export to create.""" + + balance_csv: BalanceCsv + """Options for the created export. + + Required if `category` is equal to `balance_csv`. + """ + + transaction_csv: TransactionCsv + """Options for the created export. + + Required if `category` is equal to `transaction_csv`. + """ + + +class BalanceCsvCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -37,15 +54,15 @@ class TransactionCsvCreatedAt(TypedDict, total=False): """ -class TransactionCsv(TypedDict, total=False): +class BalanceCsv(TypedDict, total=False): account_id: str """Filter exported Transactions to the specified Account.""" - created_at: TransactionCsvCreatedAt + created_at: BalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" -class BalanceCsvCreatedAt(TypedDict, total=False): +class TransactionCsvCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -71,26 +88,9 @@ class BalanceCsvCreatedAt(TypedDict, total=False): """ -class BalanceCsv(TypedDict, total=False): +class TransactionCsv(TypedDict, total=False): account_id: str """Filter exported Transactions to the specified Account.""" - created_at: BalanceCsvCreatedAt + created_at: TransactionCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" - - -class ExportCreateParams(TypedDict, total=False): - category: Required[Literal["transaction_csv", "balance_csv"]] - """The type of Export to create.""" - - balance_csv: BalanceCsv - """Options for the created export. - - Required if `category` is equal to `balance_csv`. - """ - - transaction_csv: TransactionCsv - """Options for the created export. - - Required if `category` is equal to `transaction_csv`. - """ diff --git a/src/increase/types/external_account_list_params.py b/src/increase/types/external_account_list_params.py index 6f5db5e57..5d4a3b760 100644 --- a/src/increase/types/external_account_list_params.py +++ b/src/increase/types/external_account_list_params.py @@ -7,18 +7,6 @@ __all__ = ["ExternalAccountListParams", "Status"] -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["active", "archived"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass - class ExternalAccountListParams(TypedDict, total=False): cursor: str @@ -31,3 +19,16 @@ class ExternalAccountListParams(TypedDict, total=False): """ status: Status + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "archived"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 274fd1a42..d148dd07a 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -11,6 +11,21 @@ __all__ = ["FileListParams", "CreatedAt", "Purpose"] +class FileListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + purpose: Purpose + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -64,18 +79,3 @@ class CreatedAt(TypedDict, total=False): class Purpose(_PurposeReservedKeywords, total=False): pass - - -class FileListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - purpose: Purpose diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index d97ca2145..a8164d745 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -8,19 +8,31 @@ from .._utils import PropertyInfo -__all__ = ["PendingTransactionListParams", "Status", "CreatedAt"] +__all__ = ["PendingTransactionListParams", "CreatedAt", "Status"] -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending", "complete"]], - }, - total=False, -) +class PendingTransactionListParams(TypedDict, total=False): + account_id: str + """Filter pending transactions to those belonging to the specified Account.""" -class Status(_StatusReservedKeywords, total=False): - pass + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + route_id: str + """Filter pending transactions to those belonging to the specified Route.""" + + source_id: str + """Filter pending transactions to those caused by the specified source.""" + + status: Status class CreatedAt(TypedDict, total=False): @@ -49,25 +61,14 @@ class CreatedAt(TypedDict, total=False): """ -class PendingTransactionListParams(TypedDict, total=False): - account_id: str - """Filter pending transactions to those belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - route_id: str - """Filter pending transactions to those belonging to the specified Route.""" +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "complete"]], + }, + total=False, +) - source_id: str - """Filter pending transactions to those caused by the specified source.""" - status: Status +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 8f6ab67a5..4edcd5d5c 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -7,18 +7,43 @@ __all__ = [ "RealTimeDecisionActionParams", "CardAuthorization", + "DigitalWalletAuthentication", "DigitalWalletToken", "DigitalWalletTokenApproval", "DigitalWalletTokenDecline", - "DigitalWalletAuthentication", ] +class RealTimeDecisionActionParams(TypedDict, total=False): + card_authorization: CardAuthorization + """ + If the Real-Time Decision relates to a card authorization attempt, this object + contains your response to the authorization. + """ + + digital_wallet_authentication: DigitalWalletAuthentication + """ + If the Real-Time Decision relates to a digital wallet authentication attempt, + this object contains your response to the authentication. + """ + + digital_wallet_token: DigitalWalletToken + """ + If the Real-Time Decision relates to a digital wallet token provisioning + attempt, this object contains your response to the attempt. + """ + + class CardAuthorization(TypedDict, total=False): decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined.""" +class DigitalWalletAuthentication(TypedDict, total=False): + result: Required[Literal["success", "failure"]] + """Whether your application was able to deliver the one-time passcode.""" + + class DigitalWalletTokenApproval(TypedDict, total=False): card_profile_id: Required[str] """The identifier of the Card Profile to assign to the Digital Wallet token.""" @@ -56,28 +81,3 @@ class DigitalWalletToken(TypedDict, total=False): If your application declines the provisioning attempt, this contains details about the decline. """ - - -class DigitalWalletAuthentication(TypedDict, total=False): - result: Required[Literal["success", "failure"]] - """Whether your application was able to deliver the one-time passcode.""" - - -class RealTimeDecisionActionParams(TypedDict, total=False): - card_authorization: CardAuthorization - """ - If the Real-Time Decision relates to a card authorization attempt, this object - contains your response to the authorization. - """ - - digital_wallet_authentication: DigitalWalletAuthentication - """ - If the Real-Time Decision relates to a digital wallet authentication attempt, - this object contains your response to the authentication. - """ - - digital_wallet_token: DigitalWalletToken - """ - If the Real-Time Decision relates to a digital wallet token provisioning - attempt, this object contains your response to the attempt. - """ diff --git a/src/increase/types/real_time_payments_transfer_list_params.py b/src/increase/types/real_time_payments_transfer_list_params.py index a25acab5d..2dacfb16d 100644 --- a/src/increase/types/real_time_payments_transfer_list_params.py +++ b/src/increase/types/real_time_payments_transfer_list_params.py @@ -11,6 +11,30 @@ __all__ = ["RealTimePaymentsTransferListParams", "CreatedAt"] +class RealTimePaymentsTransferListParams(TypedDict, total=False): + account_id: str + """ + Filter Real Time Payments Transfers to those belonging to the specified Account. + """ + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + external_account_id: str + """ + Filter Real Time Payments Transfers to those made to the specified External + Account. + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,27 +59,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class RealTimePaymentsTransferListParams(TypedDict, total=False): - account_id: str - """ - Filter Real Time Payments Transfers to those belonging to the specified Account. - """ - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - external_account_id: str - """ - Filter Real Time Payments Transfers to those made to the specified External - Account. - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 203bb4fb7..f55dfe43c 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .card_authorize_params import CardAuthorizeParams as CardAuthorizeParams +from .program_create_params import ProgramCreateParams as ProgramCreateParams from .card_settlement_params import CardSettlementParams as CardSettlementParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .ach_transfer_simulation import ACHTransferSimulation as ACHTransferSimulation diff --git a/src/increase/types/simulations/ach_transfer_return_params.py b/src/increase/types/simulations/ach_transfer_return_params.py index 8fbfae11e..2f8a2dd06 100644 --- a/src/increase/types/simulations/ach_transfer_return_params.py +++ b/src/increase/types/simulations/ach_transfer_return_params.py @@ -28,10 +28,58 @@ class ACHTransferReturnParams(TypedDict, total=False): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """The reason why the Federal Reserve or destination bank returned this transfer. diff --git a/src/increase/types/simulations/ach_transfer_simulation.py b/src/increase/types/simulations/ach_transfer_simulation.py index 9b4ffe8cd..72749df7c 100644 --- a/src/increase/types/simulations/ach_transfer_simulation.py +++ b/src/increase/types/simulations/ach_transfer_simulation.py @@ -139,6 +139,9 @@ class TransactionSourceACHTransferReturn(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -159,10 +162,58 @@ class TransactionSourceACHTransferReturn(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" @@ -866,6 +917,7 @@ class TransactionSourceInternalSource(BaseModel): """ reason: Literal[ + "account_closure", "bank_migration", "cashback", "collection_receivable", @@ -1518,6 +1570,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): "group_locked", "insufficient_funds", "unable_to_locate_account", + "not_our_item", "unable_to_process", "refer_to_image", "stop_payment_requested", diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 7210e46a7..dbcc49938 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -639,6 +639,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): "group_locked", "insufficient_funds", "unable_to_locate_account", + "not_our_item", "unable_to_process", "refer_to_image", "stop_payment_requested", diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 8b4ec4388..9ddb7cc3e 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -139,6 +139,9 @@ class TransactionSourceACHTransferReturn(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -159,10 +162,58 @@ class TransactionSourceACHTransferReturn(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" @@ -866,6 +917,7 @@ class TransactionSourceInternalSource(BaseModel): """ reason: Literal[ + "account_closure", "bank_migration", "cashback", "collection_receivable", @@ -1518,6 +1570,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): "group_locked", "insufficient_funds", "unable_to_locate_account", + "not_our_item", "unable_to_process", "refer_to_image", "stop_payment_requested", diff --git a/src/increase/types/simulations/interest_payment_simulation_result.py b/src/increase/types/simulations/interest_payment_simulation_result.py index ed2d564b3..d1e5dea22 100644 --- a/src/increase/types/simulations/interest_payment_simulation_result.py +++ b/src/increase/types/simulations/interest_payment_simulation_result.py @@ -127,6 +127,9 @@ class TransactionSourceACHTransferReturn(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -147,10 +150,58 @@ class TransactionSourceACHTransferReturn(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" @@ -854,6 +905,7 @@ class TransactionSourceInternalSource(BaseModel): """ reason: Literal[ + "account_closure", "bank_migration", "cashback", "collection_receivable", diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py new file mode 100644 index 000000000..22b346cec --- /dev/null +++ b/src/increase/types/simulations/program_create_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ProgramCreateParams"] + + +class ProgramCreateParams(TypedDict, total=False): + name: Required[str] + """The name of the program being added.""" diff --git a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py index 36d9ebe40..4537465e4 100644 --- a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py +++ b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py @@ -7,6 +7,11 @@ __all__ = ["RealTimePaymentsTransferCompleteParams", "Rejection"] +class RealTimePaymentsTransferCompleteParams(TypedDict, total=False): + rejection: Rejection + """If set, the simulation will reject the transfer.""" + + class Rejection(TypedDict, total=False): reject_reason_code: Required[ Literal[ @@ -34,8 +39,3 @@ class Rejection(TypedDict, total=False): ] ] """The reason code that the simulated rejection will have.""" - - -class RealTimePaymentsTransferCompleteParams(TypedDict, total=False): - rejection: Rejection - """If set, the simulation will reject the transfer.""" diff --git a/src/increase/types/simulations/wire_transfer_simulation.py b/src/increase/types/simulations/wire_transfer_simulation.py index 383035787..113e9de12 100644 --- a/src/increase/types/simulations/wire_transfer_simulation.py +++ b/src/increase/types/simulations/wire_transfer_simulation.py @@ -127,6 +127,9 @@ class TransactionSourceACHTransferReturn(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -147,10 +150,58 @@ class TransactionSourceACHTransferReturn(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" @@ -854,6 +905,7 @@ class TransactionSourceInternalSource(BaseModel): """ reason: Literal[ + "account_closure", "bank_migration", "cashback", "collection_receivable", diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index a9bf97bfe..ab95b02f5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -126,6 +126,9 @@ class SourceACHTransferReturn(BaseModel): the transfer was created. """ + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + return_reason_code: Literal[ "insufficient_fund", "no_account", @@ -146,10 +149,58 @@ class SourceACHTransferReturn(BaseModel): "file_record_edit_criteria", "enr_invalid_individual_name", "returned_per_odfi_request", - "addenda_error", "limited_participation_dfi", "incorrectly_coded_outbound_international_payment", "other", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "check_truncation_entry_return", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", ] """Why the ACH Transfer was returned.""" @@ -853,6 +904,7 @@ class SourceInternalSource(BaseModel): """ reason: Literal[ + "account_closure", "bank_migration", "cashback", "collection_receivable", diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 801604389..d5c81a0a6 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -8,32 +8,30 @@ from .._utils import PropertyInfo -__all__ = ["TransactionListParams", "CreatedAt", "Category"] +__all__ = ["TransactionListParams", "Category", "CreatedAt"] -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ +class TransactionListParams(TypedDict, total=False): + account_id: str + """Filter Transactions for those belonging to the specified Account.""" - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ + category: Category - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ + created_at: CreatedAt - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + + route_id: str + """Filter Transactions for those belonging to the specified route. + + This could be a Card ID or an Account Number ID. """ @@ -93,25 +91,27 @@ class Category(_CategoryReservedKeywords, total=False): pass -class TransactionListParams(TypedDict, total=False): - account_id: str - """Filter Transactions for those belonging to the specified Account.""" - - category: Category - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ - The default (and maximum) is 100 objects. + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. """ - route_id: str - """Filter Transactions for those belonging to the specified route. + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ - This could be a Card ID or an Account Number ID. + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ diff --git a/src/increase/types/wire_transfer_list_params.py b/src/increase/types/wire_transfer_list_params.py index 273255741..121059d6f 100644 --- a/src/increase/types/wire_transfer_list_params.py +++ b/src/increase/types/wire_transfer_list_params.py @@ -11,6 +11,25 @@ __all__ = ["WireTransferListParams", "CreatedAt"] +class WireTransferListParams(TypedDict, total=False): + account_id: str + """Filter Wire Transfers to those belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + external_account_id: str + """Filter Wire Transfers to those made to the specified External Account.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -35,22 +54,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -class WireTransferListParams(TypedDict, total=False): - account_id: str - """Filter Wire Transfers to those belonging to the specified Account.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - external_account_id: str - """Filter Wire Transfers to those made to the specified External Account.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/entities/test_supplemental_documents.py index 4f8a89822..08b95da2c 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/entities/test_supplemental_documents.py @@ -9,6 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import Entity +from increase.pagination import SyncPage, AsyncPage +from increase.types.entities import SupplementalDocument base_url = os.environ.get("API_BASE_URL", "http://127.0.0.1:4010") api_key = os.environ.get("API_KEY", "something1234") @@ -27,6 +29,22 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(Entity, supplemental_document, path=["response"]) + @parametrize + def test_method_list(self, client: Increase) -> None: + supplemental_document = client.entities.supplemental_documents.list( + entity_id="string", + ) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + supplemental_document = client.entities.supplemental_documents.list( + entity_id="string", + cursor="string", + limit=0, + ) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + class TestAsyncSupplementalDocuments: strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) @@ -40,3 +58,19 @@ async def test_method_create(self, client: AsyncIncrease) -> None: file_id="string", ) assert_matches_type(Entity, supplemental_document, path=["response"]) + + @parametrize + async def test_method_list(self, client: AsyncIncrease) -> None: + supplemental_document = await client.entities.supplemental_documents.list( + entity_id="string", + ) + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: + supplemental_document = await client.entities.supplemental_documents.list( + entity_id="string", + cursor="string", + limit=0, + ) + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index a3c6f3cb0..15f2cd556 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -36,8 +36,8 @@ def test_method_create_inbound_with_all_params(self, client: Increase) -> None: company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", - company_name="x", company_id="x", + company_name="x", ) assert_matches_type(ACHTransferSimulation, ach_transfer, path=["response"]) @@ -88,8 +88,8 @@ async def test_method_create_inbound_with_all_params(self, client: AsyncIncrease company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", - company_name="x", company_id="x", + company_name="x", ) assert_matches_type(ACHTransferSimulation, ach_transfer, path=["response"]) diff --git a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py index 32752ba42..a39087bfe 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -22,40 +22,40 @@ class TestInboundWireDrawdownRequests: @parametrize def test_method_create(self, client: Increase) -> None: inbound_wire_drawdown_request = client.simulations.inbound_wire_drawdown_requests.create( - recipient_account_number_id="string", - originator_account_number="x", - originator_routing_number="x", + amount=0, beneficiary_account_number="x", beneficiary_routing_number="x", - amount=0, currency="x", message_to_recipient="x", + originator_account_number="x", + originator_routing_number="x", + recipient_account_number_id="string", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: inbound_wire_drawdown_request = client.simulations.inbound_wire_drawdown_requests.create( - recipient_account_number_id="string", - originator_account_number="x", - originator_routing_number="x", + amount=0, beneficiary_account_number="x", beneficiary_routing_number="x", - amount=0, currency="x", message_to_recipient="x", + originator_account_number="x", + originator_routing_number="x", + recipient_account_number_id="string", + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", originator_to_beneficiary_information_line1="x", originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", - originator_name="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - beneficiary_name="x", - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @@ -68,39 +68,39 @@ class TestAsyncInboundWireDrawdownRequests: @parametrize async def test_method_create(self, client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await client.simulations.inbound_wire_drawdown_requests.create( - recipient_account_number_id="string", - originator_account_number="x", - originator_routing_number="x", + amount=0, beneficiary_account_number="x", beneficiary_routing_number="x", - amount=0, currency="x", message_to_recipient="x", + originator_account_number="x", + originator_routing_number="x", + recipient_account_number_id="string", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await client.simulations.inbound_wire_drawdown_requests.create( - recipient_account_number_id="string", - originator_account_number="x", - originator_routing_number="x", + amount=0, beneficiary_account_number="x", beneficiary_routing_number="x", - amount=0, currency="x", message_to_recipient="x", + originator_account_number="x", + originator_routing_number="x", + recipient_account_number_id="string", + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", originator_to_beneficiary_information_line1="x", originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", - originator_name="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - beneficiary_name="x", - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py new file mode 100644 index 000000000..38fea4d1c --- /dev/null +++ b/tests/api_resources/simulations/test_programs.py @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +import os + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Program + +base_url = os.environ.get("API_BASE_URL", "http://127.0.0.1:4010") +api_key = os.environ.get("API_KEY", "something1234") + + +class TestPrograms: + strict_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + program = client.simulations.programs.create( + name="x", + ) + assert_matches_type(Program, program, path=["response"]) + + +class TestAsyncPrograms: + strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + async def test_method_create(self, client: AsyncIncrease) -> None: + program = await client.simulations.programs.create( + name="x", + ) + assert_matches_type(Program, program, path=["response"]) diff --git a/tests/api_resources/simulations/test_real_time_payments_transfers.py b/tests/api_resources/simulations/test_real_time_payments_transfers.py index d1cca5596..084c39548 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -50,11 +50,11 @@ def test_method_create_inbound_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( account_number_id="string", amount=1, - request_for_payment_id="string", - debtor_name="x", debtor_account_number="x", + debtor_name="x", debtor_routing_number="xxxxxxxxx", remittance_information="x", + request_for_payment_id="string", ) assert_matches_type( InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] @@ -96,11 +96,11 @@ async def test_method_create_inbound_with_all_params(self, client: AsyncIncrease real_time_payments_transfer = await client.simulations.real_time_payments_transfers.create_inbound( account_number_id="string", amount=1, - request_for_payment_id="string", - debtor_name="x", debtor_account_number="x", + debtor_name="x", debtor_routing_number="xxxxxxxxx", remittance_information="x", + request_for_payment_id="string", ) assert_matches_type( InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index a9d0db7c8..fd44feea0 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -60,9 +60,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.list( - cursor="string", - limit=0, - status="active", account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -70,6 +67,9 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + status="active", ) assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @@ -118,9 +118,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: account_number = await client.account_numbers.list( - cursor="string", - limit=0, - status="active", account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -128,5 +125,8 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + status="active", ) assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index aee11aa20..0eddf778c 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -36,9 +36,9 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_statement = client.account_statements.list( + account_id="string", cursor="string", limit=0, - account_id="string", statement_period_start={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -69,9 +69,9 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: account_statement = await client.account_statements.list( + account_id="string", cursor="string", limit=0, - account_id="string", statement_period_start={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 25736931e..afdbfa156 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -57,8 +57,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_transfer = client.account_transfers.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -66,6 +64,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) @@ -125,8 +125,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: account_transfer = await client.account_transfers.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -134,6 +132,8 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d45edfa7d..57003932c 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -31,10 +31,10 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: account = client.accounts.create( + name="x", entity_id="string", - program_id="string", informational_entity_id="string", - name="x", + program_id="string", ) assert_matches_type(Account, account, path=["response"]) @@ -68,16 +68,17 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account = client.accounts.list( - cursor="string", - limit=0, - entity_id="string", - status="open", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + entity_id="string", + informational_entity_id="string", + limit=0, + status="open", ) assert_matches_type(SyncPage[Account], account, path=["response"]) @@ -105,10 +106,10 @@ async def test_method_create(self, client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: account = await client.accounts.create( + name="x", entity_id="string", - program_id="string", informational_entity_id="string", - name="x", + program_id="string", ) assert_matches_type(Account, account, path=["response"]) @@ -142,16 +143,17 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: account = await client.accounts.list( - cursor="string", - limit=0, - entity_id="string", - status="open", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + entity_id="string", + informational_entity_id="string", + limit=0, + status="open", ) assert_matches_type(AsyncPage[Account], account, path=["response"]) diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index c6640a563..092ca3ac6 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -33,6 +33,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.create( account_number="x", + routing_number="xxxxxxxxx", addendum="x", company_descriptive_date="x", company_discretionary_data="x", @@ -42,7 +43,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: effective_date=parse_date("2019-12-27"), individual_id="x", individual_name="x", - routing_number="xxxxxxxxx", standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @@ -62,14 +62,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @@ -91,6 +91,7 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: ach_prenotification = await client.ach_prenotifications.create( account_number="x", + routing_number="xxxxxxxxx", addendum="x", company_descriptive_date="x", company_discretionary_data="x", @@ -100,7 +101,6 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non effective_date=parse_date("2019-12-27"), individual_id="x", individual_name="x", - routing_number="xxxxxxxxx", standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @@ -120,13 +120,13 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: ach_prenotification = await client.ach_prenotifications.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index ce61d7ab0..f9a1eb6be 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -34,9 +34,10 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: ach_transfer = client.ach_transfers.create( account_id="string", + amount=0, + statement_descriptor="x", account_number="x", addendum="x", - amount=0, company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", @@ -49,7 +50,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: require_approval=True, routing_number="xxxxxxxxx", standard_entry_class_code="corporate_credit_or_debit", - statement_descriptor="x", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -68,16 +68,16 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: ach_transfer = client.ach_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) @@ -114,9 +114,10 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: ach_transfer = await client.ach_transfers.create( account_id="string", + amount=0, + statement_descriptor="x", account_number="x", addendum="x", - amount=0, company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", @@ -129,7 +130,6 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non require_approval=True, routing_number="xxxxxxxxx", standard_entry_class_code="corporate_credit_or_debit", - statement_descriptor="x", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -148,16 +148,16 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: ach_transfer = await client.ach_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 4029d1908..5b4239785 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -30,10 +30,10 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.create( + name="x", + account_id="string", compliance_category="commingled_cash", entity_id="string", - account_id="string", - name="x", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @@ -66,10 +66,10 @@ async def test_method_create(self, client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: bookkeeping_account = await client.bookkeeping_accounts.create( + name="x", + account_id="string", compliance_category="commingled_cash", entity_id="string", - account_id="string", - name="x", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 24af91e8a..4b64e8ce1 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -43,8 +43,6 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.create( - date=parse_datetime("2019-12-27T18:11:19.117Z"), - transaction_id="string", entries=[ { "account_id": "string", @@ -59,6 +57,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "amount": 0, }, ], + date=parse_datetime("2019-12-27T18:11:19.117Z"), + transaction_id="string", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @@ -91,8 +91,6 @@ async def test_method_create(self, client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: bookkeeping_entry_set = await client.bookkeeping_entry_sets.create( - date=parse_datetime("2019-12-27T18:11:19.117Z"), - transaction_id="string", entries=[ { "account_id": "string", @@ -107,5 +105,7 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non "amount": 0, }, ], + date=parse_datetime("2019-12-27T18:11:19.117Z"), + transaction_id="string", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 5783848b1..b99ed59c8 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -44,14 +44,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: card_dispute = client.card_disputes.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, status={"in": ["pending_reviewing", "pending_reviewing", "pending_reviewing"]}, ) assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @@ -85,14 +85,14 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: card_dispute = await client.card_disputes.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, status={"in": ["pending_reviewing", "pending_reviewing", "pending_reviewing"]}, ) assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) diff --git a/tests/api_resources/test_card_profiles.py b/tests/api_resources/test_card_profiles.py index 022b2b39a..00bc1ffb8 100644 --- a/tests/api_resources/test_card_profiles.py +++ b/tests/api_resources/test_card_profiles.py @@ -33,6 +33,27 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(CardProfile, card_profile, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_profile = client.card_profiles.create( + description="x", + digital_wallets={ + "text_color": { + "red": 0, + "green": 0, + "blue": 0, + }, + "issuer_name": "x", + "card_description": "x", + "contact_website": "string", + "contact_email": "x", + "contact_phone": "x", + "background_image_file_id": "string", + "app_icon_file_id": "string", + }, + ) + assert_matches_type(CardProfile, card_profile, path=["response"]) + @parametrize def test_method_retrieve(self, client: Increase) -> None: card_profile = client.card_profiles.retrieve( @@ -73,6 +94,27 @@ async def test_method_create(self, client: AsyncIncrease) -> None: ) assert_matches_type(CardProfile, card_profile, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: + card_profile = await client.card_profiles.create( + description="x", + digital_wallets={ + "text_color": { + "red": 0, + "green": 0, + "blue": 0, + }, + "issuer_name": "x", + "card_description": "x", + "contact_website": "string", + "contact_email": "x", + "contact_phone": "x", + "background_image_file_id": "string", + "app_icon_file_id": "string", + }, + ) + assert_matches_type(CardProfile, card_profile, path=["response"]) + @parametrize async def test_method_retrieve(self, client: AsyncIncrease) -> None: card_profile = await client.card_profiles.retrieve( diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 11d817b7e..7544dd6a8 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -32,7 +32,6 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: card = client.cards.create( account_id="string", - description="x", billing_address={ "line1": "x", "line2": "x", @@ -40,6 +39,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "x", "postal_code": "x", }, + description="x", digital_wallet={ "email": "x", "phone": "x", @@ -66,8 +66,6 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: card = client.cards.update( "string", - description="x", - status="active", billing_address={ "line1": "x", "line2": "x", @@ -75,11 +73,13 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "state": "x", "postal_code": "x", }, + description="x", digital_wallet={ "email": "x", "phone": "x", "card_profile_id": "string", }, + status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -91,8 +91,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: card = client.cards.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -100,6 +98,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[Card], card, path=["response"]) @@ -127,7 +127,6 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: card = await client.cards.create( account_id="string", - description="x", billing_address={ "line1": "x", "line2": "x", @@ -135,6 +134,7 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non "state": "x", "postal_code": "x", }, + description="x", digital_wallet={ "email": "x", "phone": "x", @@ -161,8 +161,6 @@ async def test_method_update(self, client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, client: AsyncIncrease) -> None: card = await client.cards.update( "string", - description="x", - status="active", billing_address={ "line1": "x", "line2": "x", @@ -170,11 +168,13 @@ async def test_method_update_with_all_params(self, client: AsyncIncrease) -> Non "state": "x", "postal_code": "x", }, + description="x", digital_wallet={ "email": "x", "phone": "x", "card_profile_id": "string", }, + status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -186,8 +186,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: card = await client.cards.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -195,6 +193,8 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[Card], card, path=["response"]) diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index ca870a6f1..61a3bd55d 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -26,9 +26,9 @@ def test_method_create(self, client: Increase) -> None: check_deposit = client.check_deposits.create( account_id="string", amount=0, + back_image_file_id="string", currency="x", front_image_file_id="string", - back_image_file_id="string", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -47,8 +47,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: check_deposit = client.check_deposits.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -56,6 +54,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) @@ -70,9 +70,9 @@ async def test_method_create(self, client: AsyncIncrease) -> None: check_deposit = await client.check_deposits.create( account_id="string", amount=0, + back_image_file_id="string", currency="x", front_image_file_id="string", - back_image_file_id="string", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -91,8 +91,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: check_deposit = await client.check_deposits.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -100,5 +98,7 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 4a69107a8..49e4d2128 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -25,8 +25,8 @@ class TestCheckTransfers: def test_method_create(self, client: Increase) -> None: check_transfer = client.check_transfers.create( account_id="string", - address_line1="x", address_city="x", + address_line1="x", address_state="x", address_zip="x", amount=1, @@ -39,11 +39,16 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.create( account_id="string", - address_line1="x", - address_line2="x", address_city="x", + address_line1="x", address_state="x", address_zip="x", + amount=1, + message="x", + recipient_name="x", + address_line2="x", + note="x", + require_approval=True, return_address={ "name": "x", "line1": "x", @@ -52,11 +57,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "x", "zip": "x", }, - amount=1, - message="x", - note="x", - recipient_name="x", - require_approval=True, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -75,8 +75,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -84,6 +82,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) @@ -119,8 +119,8 @@ class TestAsyncCheckTransfers: async def test_method_create(self, client: AsyncIncrease) -> None: check_transfer = await client.check_transfers.create( account_id="string", - address_line1="x", address_city="x", + address_line1="x", address_state="x", address_zip="x", amount=1, @@ -133,11 +133,16 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: check_transfer = await client.check_transfers.create( account_id="string", - address_line1="x", - address_line2="x", address_city="x", + address_line1="x", address_state="x", address_zip="x", + amount=1, + message="x", + recipient_name="x", + address_line2="x", + note="x", + require_approval=True, return_address={ "name": "x", "line1": "x", @@ -146,11 +151,6 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non "state": "x", "zip": "x", }, - amount=1, - message="x", - note="x", - recipient_name="x", - require_approval=True, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -169,8 +169,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: check_transfer = await client.check_transfers.list( - cursor="string", - limit=0, account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -178,6 +176,8 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index ea476605c..afb976a80 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -36,16 +36,16 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: declined_transaction = client.declined_transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + route_id="string", ) assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @@ -70,15 +70,15 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: declined_transaction = await client.declined_transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + route_id="string", ) assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 4531f50be..2389fd4a3 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -36,8 +36,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.list( - cursor="string", - limit=0, card_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -45,6 +43,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @@ -69,8 +69,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: digital_wallet_token = await client.digital_wallet_tokens.list( - cursor="string", - limit=0, card_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -78,5 +76,7 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 5779305ca..cd3b3fee2 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -36,9 +36,6 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: document = client.documents.list( - cursor="string", - limit=0, - entity_id="string", category={ "in": ["account_opening_disclosures", "account_opening_disclosures", "account_opening_disclosures"] }, @@ -48,6 +45,9 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + entity_id="string", + limit=0, ) assert_matches_type(SyncPage[Document], document, path=["response"]) @@ -72,9 +72,6 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: document = await client.documents.list( - cursor="string", - limit=0, - entity_id="string", category={ "in": ["account_opening_disclosures", "account_opening_disclosures", "account_opening_disclosures"] }, @@ -84,5 +81,8 @@ async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + entity_id="string", + limit=0, ) assert_matches_type(AsyncPage[Document], document, path=["response"]) diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 3a81f76cd..3b1f8e08a 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -24,14 +24,15 @@ class TestEntities: @parametrize def test_method_create(self, client: Increase) -> None: entity = client.entities.create( - structure="corporation", relationship="affiliated", + structure="corporation", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: entity = client.entities.create( + relationship="affiliated", structure="corporation", corporation={ "name": "x", @@ -156,38 +157,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, ], }, - natural_person={ - "name": "x", - "date_of_birth": parse_date("2019-12-27"), - "address": { - "line1": "x", - "line2": "x", - "city": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, - "drivers_license": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "state": "x", - }, - "other": { - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "string", - }, - }, - }, + description="x", joint={ "name": "x", "individuals": [ @@ -289,6 +259,39 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, ], }, + natural_person={ + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "identification": { + "method": "social_security_number", + "number": "xxxx", + "passport": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "country": "x", + }, + "drivers_license": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "state": "x", + }, + "other": { + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + }, + }, + supplemental_documents=[{"file_id": "string"}, {"file_id": "string"}, {"file_id": "string"}], trust={ "name": "x", "category": "revocable", @@ -442,9 +445,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, }, - description="x", - relationship="affiliated", - supplemental_documents=[{"file_id": "string"}, {"file_id": "string"}, {"file_id": "string"}], ) assert_matches_type(Entity, entity, path=["response"]) @@ -463,14 +463,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: entity = client.entities.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[Entity], entity, path=["response"]) @@ -483,14 +483,15 @@ class TestAsyncEntities: @parametrize async def test_method_create(self, client: AsyncIncrease) -> None: entity = await client.entities.create( - structure="corporation", relationship="affiliated", + structure="corporation", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: entity = await client.entities.create( + relationship="affiliated", structure="corporation", corporation={ "name": "x", @@ -615,38 +616,7 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non }, ], }, - natural_person={ - "name": "x", - "date_of_birth": parse_date("2019-12-27"), - "address": { - "line1": "x", - "line2": "x", - "city": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, - "drivers_license": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "state": "x", - }, - "other": { - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "string", - }, - }, - }, + description="x", joint={ "name": "x", "individuals": [ @@ -748,6 +718,39 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non }, ], }, + natural_person={ + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "identification": { + "method": "social_security_number", + "number": "xxxx", + "passport": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "country": "x", + }, + "drivers_license": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "state": "x", + }, + "other": { + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + }, + }, + supplemental_documents=[{"file_id": "string"}, {"file_id": "string"}, {"file_id": "string"}], trust={ "name": "x", "category": "revocable", @@ -901,9 +904,6 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non }, }, }, - description="x", - relationship="affiliated", - supplemental_documents=[{"file_id": "string"}, {"file_id": "string"}, {"file_id": "string"}], ) assert_matches_type(Entity, entity, path=["response"]) @@ -922,13 +922,13 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: entity = await client.entities.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[Entity], entity, path=["response"]) diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index f99b02056..c81cb15e4 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -31,8 +31,8 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.create( url="string", - shared_secret="x", selected_event_category="account.created", + shared_secret="x", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @@ -88,8 +88,8 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: event_subscription = await client.event_subscriptions.create( url="string", - shared_secret="x", selected_event_category="account.created", + shared_secret="x", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 2db643f52..f3ae1cf16 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -36,16 +36,16 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: event = client.events.list( - cursor="string", - limit=0, associated_object_id="string", + category={"in": ["account.created", "account.created", "account.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - category={"in": ["account.created", "account.created", "account.created"]}, + cursor="string", + limit=0, ) assert_matches_type(SyncPage[Event], event, path=["response"]) @@ -70,15 +70,15 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: event = await client.events.list( - cursor="string", - limit=0, associated_object_id="string", + category={"in": ["account.created", "account.created", "account.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - category={"in": ["account.created", "account.created", "account.created"]}, + cursor="string", + limit=0, ) assert_matches_type(AsyncPage[Event], event, path=["response"]) diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index d3257de56..9d15151e7 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -32,7 +32,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: export = client.exports.create( category="transaction_csv", - transaction_csv={ + balance_csv={ "account_id": "string", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - balance_csv={ + transaction_csv={ "account_id": "string", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -90,7 +90,7 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: export = await client.exports.create( category="transaction_csv", - transaction_csv={ + balance_csv={ "account_id": "string", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -99,7 +99,7 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - balance_csv={ + transaction_csv={ "account_id": "string", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index c9f4cd9a2..325a8e97d 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -23,19 +23,19 @@ class TestExternalAccounts: @parametrize def test_method_create(self, client: Increase) -> None: external_account = client.external_accounts.create( - routing_number="xxxxxxxxx", account_number="x", description="x", + routing_number="xxxxxxxxx", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: external_account = client.external_accounts.create( - routing_number="xxxxxxxxx", account_number="x", - funding="checking", description="x", + routing_number="xxxxxxxxx", + funding="checking", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @@ -85,19 +85,19 @@ class TestAsyncExternalAccounts: @parametrize async def test_method_create(self, client: AsyncIncrease) -> None: external_account = await client.external_accounts.create( - routing_number="xxxxxxxxx", account_number="x", description="x", + routing_number="xxxxxxxxx", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: external_account = await client.external_accounts.create( - routing_number="xxxxxxxxx", account_number="x", - funding="checking", description="x", + routing_number="xxxxxxxxx", + funding="checking", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index eb3c8b6d8..efed6ad2a 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -35,8 +35,8 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: file = client.files.create( file=b"raw file contents", - description="x", purpose="check_image_front", + description="x", ) assert_matches_type(File, file, path=["response"]) @@ -55,14 +55,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: file = client.files.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, purpose={"in": ["check_image_front", "check_image_front", "check_image_front"]}, ) assert_matches_type(SyncPage[File], file, path=["response"]) @@ -87,8 +87,8 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: file = await client.files.create( file=b"raw file contents", - description="x", purpose="check_image_front", + description="x", ) assert_matches_type(File, file, path=["response"]) @@ -107,14 +107,14 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: file = await client.files.list( - cursor="string", - limit=0, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, purpose={"in": ["check_image_front", "check_image_front", "check_image_front"]}, ) assert_matches_type(AsyncPage[File], file, path=["response"]) diff --git a/tests/api_resources/test_inbound_ach_transfer_returns.py b/tests/api_resources/test_inbound_ach_transfer_returns.py index 5b2672e9a..ca63fd259 100644 --- a/tests/api_resources/test_inbound_ach_transfer_returns.py +++ b/tests/api_resources/test_inbound_ach_transfer_returns.py @@ -23,8 +23,8 @@ class TestInboundACHTransferReturns: @parametrize def test_method_create(self, client: Increase) -> None: inbound_ach_transfer_return = client.inbound_ach_transfer_returns.create( - transaction_id="string", reason="authorization_revoked_by_customer", + transaction_id="string", ) assert_matches_type(InboundACHTransferReturn, inbound_ach_transfer_return, path=["response"]) @@ -57,8 +57,8 @@ class TestAsyncInboundACHTransferReturns: @parametrize async def test_method_create(self, client: AsyncIncrease) -> None: inbound_ach_transfer_return = await client.inbound_ach_transfer_returns.create( - transaction_id="string", reason="authorization_revoked_by_customer", + transaction_id="string", ) assert_matches_type(InboundACHTransferReturn, inbound_ach_transfer_return, path=["response"]) diff --git a/tests/api_resources/test_limits.py b/tests/api_resources/test_limits.py index 98dfd8b1f..a9164819a 100644 --- a/tests/api_resources/test_limits.py +++ b/tests/api_resources/test_limits.py @@ -33,9 +33,9 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: limit = client.limits.create( metric="count", - interval="transaction", model_id="x", value=0, + interval="transaction", ) assert_matches_type(Limit, limit, path=["response"]) @@ -88,9 +88,9 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: limit = await client.limits.create( metric="count", - interval="transaction", model_id="x", value=0, + interval="transaction", ) assert_matches_type(Limit, limit, path=["response"]) diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index b00eae976..e030d56f6 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -36,18 +36,18 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: pending_transaction = client.pending_transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", - source_id="string", - status={"in": ["pending", "pending", "pending"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + route_id="string", + source_id="string", + status={"in": ["pending", "pending", "pending"]}, ) assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @@ -72,17 +72,17 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: pending_transaction = await client.pending_transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", - source_id="string", - status={"in": ["pending", "pending", "pending"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + limit=0, + route_id="string", + source_id="string", + status={"in": ["pending", "pending", "pending"]}, ) assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index ff16d1978..989ed3839 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -38,6 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( "string", card_authorization={"decision": "approve"}, + digital_wallet_authentication={"result": "success"}, digital_wallet_token={ "approval": { "card_profile_id": "string", @@ -46,7 +47,6 @@ def test_method_action_with_all_params(self, client: Increase) -> None: }, "decline": {"reason": "x"}, }, - digital_wallet_authentication={"result": "success"}, ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @@ -75,6 +75,7 @@ async def test_method_action_with_all_params(self, client: AsyncIncrease) -> Non real_time_decision = await client.real_time_decisions.action( "string", card_authorization={"decision": "approve"}, + digital_wallet_authentication={"result": "success"}, digital_wallet_token={ "approval": { "card_profile_id": "string", @@ -83,6 +84,5 @@ async def test_method_action_with_all_params(self, client: AsyncIncrease) -> Non }, "decline": {"reason": "x"}, }, - digital_wallet_authentication={"result": "success"}, ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 737a427a1..5f7ea03f3 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -24,23 +24,23 @@ class TestRealTimePaymentsTransfers: @parametrize def test_method_create(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.create( - source_account_number_id="string", amount=1, creditor_name="x", remittance_information="x", + source_account_number_id="string", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.create( + amount=1, + creditor_name="x", + remittance_information="x", source_account_number_id="string", destination_account_number="x", destination_routing_number="xxxxxxxxx", external_account_id="string", - amount=1, - creditor_name="x", - remittance_information="x", require_approval=True, ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -60,16 +60,16 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @@ -82,23 +82,23 @@ class TestAsyncRealTimePaymentsTransfers: @parametrize async def test_method_create(self, client: AsyncIncrease) -> None: real_time_payments_transfer = await client.real_time_payments_transfers.create( - source_account_number_id="string", amount=1, creditor_name="x", remittance_information="x", + source_account_number_id="string", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: real_time_payments_transfer = await client.real_time_payments_transfers.create( + amount=1, + creditor_name="x", + remittance_information="x", source_account_number_id="string", destination_account_number="x", destination_routing_number="xxxxxxxxx", external_account_id="string", - amount=1, - creditor_name="x", - remittance_information="x", require_approval=True, ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -118,15 +118,15 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: real_time_payments_transfer = await client.real_time_payments_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 098838e7f..49cc91642 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -30,9 +30,9 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: routing_number = client.routing_numbers.list( + routing_number="xxxxxxxxx", cursor="string", limit=0, - routing_number="xxxxxxxxx", ) assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) @@ -52,8 +52,8 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: routing_number = await client.routing_numbers.list( + routing_number="xxxxxxxxx", cursor="string", limit=0, - routing_number="xxxxxxxxx", ) assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 55dc41b0d..088f89d4c 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -36,17 +36,17 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: transaction = client.transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", + category={"in": ["account_transfer_intention", "account_transfer_intention", "account_transfer_intention"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - category={"in": ["account_transfer_intention", "account_transfer_intention", "account_transfer_intention"]}, + cursor="string", + limit=0, + route_id="string", ) assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) @@ -71,16 +71,16 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: transaction = await client.transactions.list( - cursor="string", - limit=0, account_id="string", - route_id="string", + category={"in": ["account_transfer_intention", "account_transfer_intention", "account_transfer_intention"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - category={"in": ["account_transfer_intention", "account_transfer_intention", "account_transfer_intention"]}, + cursor="string", + limit=0, + route_id="string", ) assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 506deac5c..1f5d21137 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -28,8 +28,8 @@ def test_method_create(self, client: Increase) -> None: amount=1, message_to_recipient="x", recipient_account_number="x", - recipient_routing_number="x", recipient_name="x", + recipient_routing_number="x", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -41,8 +41,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: amount=1, message_to_recipient="x", recipient_account_number="x", - recipient_routing_number="x", recipient_name="x", + recipient_routing_number="x", recipient_address_line1="x", recipient_address_line2="x", recipient_address_line3="x", @@ -83,8 +83,8 @@ async def test_method_create(self, client: AsyncIncrease) -> None: amount=1, message_to_recipient="x", recipient_account_number="x", - recipient_routing_number="x", recipient_name="x", + recipient_routing_number="x", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -96,8 +96,8 @@ async def test_method_create_with_all_params(self, client: AsyncIncrease) -> Non amount=1, message_to_recipient="x", recipient_account_number="x", - recipient_routing_number="x", recipient_name="x", + recipient_routing_number="x", recipient_address_line1="x", recipient_address_line2="x", recipient_address_line3="x", diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 2ccb29b31..05022eea7 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -26,8 +26,8 @@ def test_method_create(self, client: Increase) -> None: wire_transfer = client.wire_transfers.create( account_id="string", amount=1, - message_to_recipient="x", beneficiary_name="x", + message_to_recipient="x", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -35,16 +35,16 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: wire_transfer = client.wire_transfers.create( account_id="string", - account_number="x", - routing_number="xxxxxxxxx", - external_account_id="string", amount=1, - message_to_recipient="x", beneficiary_name="x", + message_to_recipient="x", + account_number="x", beneficiary_address_line1="x", beneficiary_address_line2="x", beneficiary_address_line3="x", + external_account_id="string", require_approval=True, + routing_number="xxxxxxxxx", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -63,16 +63,16 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: wire_transfer = client.wire_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) @@ -117,8 +117,8 @@ async def test_method_create(self, client: AsyncIncrease) -> None: wire_transfer = await client.wire_transfers.create( account_id="string", amount=1, - message_to_recipient="x", beneficiary_name="x", + message_to_recipient="x", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -126,16 +126,16 @@ async def test_method_create(self, client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: wire_transfer = await client.wire_transfers.create( account_id="string", - account_number="x", - routing_number="xxxxxxxxx", - external_account_id="string", amount=1, - message_to_recipient="x", beneficiary_name="x", + message_to_recipient="x", + account_number="x", beneficiary_address_line1="x", beneficiary_address_line2="x", beneficiary_address_line3="x", + external_account_id="string", require_approval=True, + routing_number="xxxxxxxxx", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -154,16 +154,16 @@ async def test_method_list(self, client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: wire_transfer = await client.wire_transfers.list( - cursor="string", - limit=0, account_id="string", - external_account_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + cursor="string", + external_account_id="string", + limit=0, ) assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) diff --git a/tests/test_streaming.py b/tests/test_streaming.py new file mode 100644 index 000000000..dca908dd3 --- /dev/null +++ b/tests/test_streaming.py @@ -0,0 +1,104 @@ +from typing import Iterator, AsyncIterator + +import pytest + +from increase._streaming import SSEDecoder + + +@pytest.mark.asyncio +async def test_basic_async() -> None: + async def body() -> AsyncIterator[str]: + yield "event: completion" + yield 'data: {"foo":true}' + yield "" + + async for sse in SSEDecoder().aiter(body()): + assert sse.event == "completion" + assert sse.json() == {"foo": True} + + +def test_basic() -> None: + def body() -> Iterator[str]: + yield "event: completion" + yield 'data: {"foo":true}' + yield "" + + it = SSEDecoder().iter(body()) + sse = next(it) + assert sse.event == "completion" + assert sse.json() == {"foo": True} + + with pytest.raises(StopIteration): + next(it) + + +def test_data_missing_event() -> None: + def body() -> Iterator[str]: + yield 'data: {"foo":true}' + yield "" + + it = SSEDecoder().iter(body()) + sse = next(it) + assert sse.event is None + assert sse.json() == {"foo": True} + + with pytest.raises(StopIteration): + next(it) + + +def test_event_missing_data() -> None: + def body() -> Iterator[str]: + yield "event: ping" + yield "" + + it = SSEDecoder().iter(body()) + sse = next(it) + assert sse.event == "ping" + assert sse.data == "" + + with pytest.raises(StopIteration): + next(it) + + +def test_multiple_events() -> None: + def body() -> Iterator[str]: + yield "event: ping" + yield "" + yield "event: completion" + yield "" + + it = SSEDecoder().iter(body()) + + sse = next(it) + assert sse.event == "ping" + assert sse.data == "" + + sse = next(it) + assert sse.event == "completion" + assert sse.data == "" + + with pytest.raises(StopIteration): + next(it) + + +def test_multiple_events_with_data() -> None: + def body() -> Iterator[str]: + yield "event: ping" + yield 'data: {"foo":true}' + yield "" + yield "event: completion" + yield 'data: {"bar":false}' + yield "" + + it = SSEDecoder().iter(body()) + + sse = next(it) + assert sse.event == "ping" + assert sse.json() == {"foo": True} + + sse = next(it) + assert sse.event == "completion" + assert sse.json() == {"bar": False} + + with pytest.raises(StopIteration): + next(it)