Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.208.0"
".": "0.209.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7b89d3a40ae97579e589512ffb00e48f1cdd04e38d075dd8c5a16f80909ccfd5.yml
configured_endpoints: 199
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9d92797be06309903a9181e5f4f3c026a669fd40520da94b21f09eda84dfb65d.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.209.0 (2025-03-15)

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

### Features

* **api:** api update ([#1035](https://github.com/Increase/increase-python/issues/1035)) ([4017f3d](https://github.com/Increase/increase-python/commit/4017f3d1fd27732b3264c988251f151deb1cdc25))

## 0.208.0 (2025-03-15)

Full Changelog: [v0.207.1...v0.208.0](https://github.com/Increase/increase-python/compare/v0.207.1...v0.208.0)
Expand Down
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,6 @@ from increase.types import FileLink
Methods:

- <code title="post /file_links">client.file_links.<a href="./src/increase/resources/file_links.py">create</a>(\*\*<a href="src/increase/types/file_link_create_params.py">params</a>) -> <a href="./src/increase/types/file_link.py">FileLink</a></code>
- <code title="get /file_links/{file_link_id}">client.file_links.<a href="./src/increase/resources/file_links.py">retrieve</a>(file_link_id) -> <a href="./src/increase/types/file_link.py">FileLink</a></code>
- <code title="get /file_links">client.file_links.<a href="./src/increase/resources/file_links.py">list</a>(\*\*<a href="src/increase/types/file_link_list_params.py">params</a>) -> <a href="./src/increase/types/file_link.py">SyncPage[FileLink]</a></code>

# Documents

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.208.0"
version = "0.209.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/increase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "increase"
__version__ = "0.208.0" # x-release-please-version
__version__ = "0.209.0" # x-release-please-version
221 changes: 2 additions & 219 deletions src/increase/resources/file_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import httpx

from ..types import file_link_list_params, file_link_create_params
from ..types import file_link_create_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import (
maybe_transform,
Expand All @@ -21,8 +21,7 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..pagination import SyncPage, AsyncPage
from .._base_client import AsyncPaginator, make_request_options
from .._base_client import make_request_options
from ..types.file_link import FileLink

__all__ = ["FileLinksResource", "AsyncFileLinksResource"]
Expand Down Expand Up @@ -99,102 +98,6 @@ def create(
cast_to=FileLink,
)

def retrieve(
self,
file_link_id: 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 | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> FileLink:
"""
Retrieve a File Link

Args:
file_link_id: The identifier of the File Link.

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
"""
if not file_link_id:
raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}")
return self._get(
f"/file_links/{file_link_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=FileLink,
)

def list(
self,
*,
file_id: str,
created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
idempotency_key: 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 | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncPage[FileLink]:
"""
List File Links

Args:
file_id: The identifier of the File to list File Links for.

cursor: Return the page of entries after this one.

idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
that object. This value is unique across Increase and is used to ensure that a
request is only processed once. Learn more about
[idempotency](https://increase.com/documentation/idempotency-keys).

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(
"/file_links",
page=SyncPage[FileLink],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"file_id": file_id,
"created_at": created_at,
"cursor": cursor,
"idempotency_key": idempotency_key,
"limit": limit,
},
file_link_list_params.FileLinkListParams,
),
),
model=FileLink,
)


class AsyncFileLinksResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -267,102 +170,6 @@ async def create(
cast_to=FileLink,
)

async def retrieve(
self,
file_link_id: 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 | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> FileLink:
"""
Retrieve a File Link

Args:
file_link_id: The identifier of the File Link.

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
"""
if not file_link_id:
raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}")
return await self._get(
f"/file_links/{file_link_id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=FileLink,
)

def list(
self,
*,
file_id: str,
created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN,
cursor: str | NotGiven = NOT_GIVEN,
idempotency_key: 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 | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[FileLink, AsyncPage[FileLink]]:
"""
List File Links

Args:
file_id: The identifier of the File to list File Links for.

cursor: Return the page of entries after this one.

idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
that object. This value is unique across Increase and is used to ensure that a
request is only processed once. Learn more about
[idempotency](https://increase.com/documentation/idempotency-keys).

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(
"/file_links",
page=AsyncPage[FileLink],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"file_id": file_id,
"created_at": created_at,
"cursor": cursor,
"idempotency_key": idempotency_key,
"limit": limit,
},
file_link_list_params.FileLinkListParams,
),
),
model=FileLink,
)


class FileLinksResourceWithRawResponse:
def __init__(self, file_links: FileLinksResource) -> None:
Expand All @@ -371,12 +178,6 @@ def __init__(self, file_links: FileLinksResource) -> None:
self.create = to_raw_response_wrapper(
file_links.create,
)
self.retrieve = to_raw_response_wrapper(
file_links.retrieve,
)
self.list = to_raw_response_wrapper(
file_links.list,
)


class AsyncFileLinksResourceWithRawResponse:
Expand All @@ -386,12 +187,6 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None:
self.create = async_to_raw_response_wrapper(
file_links.create,
)
self.retrieve = async_to_raw_response_wrapper(
file_links.retrieve,
)
self.list = async_to_raw_response_wrapper(
file_links.list,
)


class FileLinksResourceWithStreamingResponse:
Expand All @@ -401,12 +196,6 @@ def __init__(self, file_links: FileLinksResource) -> None:
self.create = to_streamed_response_wrapper(
file_links.create,
)
self.retrieve = to_streamed_response_wrapper(
file_links.retrieve,
)
self.list = to_streamed_response_wrapper(
file_links.list,
)


class AsyncFileLinksResourceWithStreamingResponse:
Expand All @@ -416,9 +205,3 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None:
self.create = async_to_streamed_response_wrapper(
file_links.create,
)
self.retrieve = async_to_streamed_response_wrapper(
file_links.retrieve,
)
self.list = async_to_streamed_response_wrapper(
file_links.list,
)
1 change: 0 additions & 1 deletion src/increase/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
from .account_update_params import AccountUpdateParams as AccountUpdateParams
from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet
from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams
from .file_link_list_params import FileLinkListParams as FileLinkListParams
from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit
from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer
from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams
Expand Down
8 changes: 0 additions & 8 deletions src/increase/types/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ class File(BaseModel):
- `from_increase` - This File was generated by Increase.
"""

download_url: Optional[str] = None
"""A URL from where the File can be downloaded at this point in time.

The location of this URL may change over time. This URL requires authentication
with your Increase API key. If you need a URL that does not require
authentication, create a File Link instead.
"""

filename: Optional[str] = None
"""The filename that was provided upon upload or generated by Increase."""

Expand Down
14 changes: 7 additions & 7 deletions src/increase/types/file_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class FileLink(BaseModel):
[idempotency](https://increase.com/documentation/idempotency-keys).
"""

public_download_url: str
"""A URL where the File can be downloaded.

The URL will expire after the `expires_at` time. This URL is unauthenticated and
can be used to download the File without an Increase API key.
"""

type: Literal["file_link"]
"""A constant representing the object's type.

For this resource it will always be `file_link`.
"""

unauthenticated_url: str
"""A URL where the File can be downloaded.

The URL will expire after the `expires_at` time. This URL is unauthenticated and
can be used to download the File without an Increase API key.
"""
Loading