Skip to content

Commit 3b2b897

Browse files
feat(api): api update (#1035)
1 parent 6ef77ba commit 3b2b897

File tree

8 files changed

+11
-471
lines changed

8 files changed

+11
-471
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 201
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7b89d3a40ae97579e589512ffb00e48f1cdd04e38d075dd8c5a16f80909ccfd5.yml
1+
configured_endpoints: 199
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9d92797be06309903a9181e5f4f3c026a669fd40520da94b21f09eda84dfb65d.yml

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,6 @@ from increase.types import FileLink
543543
Methods:
544544

545545
- <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>
546-
- <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>
547-
- <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>
548546

549547
# Documents
550548

src/increase/resources/file_links.py

Lines changed: 2 additions & 219 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..types import file_link_list_params, file_link_create_params
10+
from ..types import file_link_create_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from .._utils import (
1313
maybe_transform,
@@ -21,8 +21,7 @@
2121
async_to_raw_response_wrapper,
2222
async_to_streamed_response_wrapper,
2323
)
24-
from ..pagination import SyncPage, AsyncPage
25-
from .._base_client import AsyncPaginator, make_request_options
24+
from .._base_client import make_request_options
2625
from ..types.file_link import FileLink
2726

2827
__all__ = ["FileLinksResource", "AsyncFileLinksResource"]
@@ -99,102 +98,6 @@ def create(
9998
cast_to=FileLink,
10099
)
101100

102-
def retrieve(
103-
self,
104-
file_link_id: str,
105-
*,
106-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107-
# The extra values given here take precedence over values defined on the client or passed to this method.
108-
extra_headers: Headers | None = None,
109-
extra_query: Query | None = None,
110-
extra_body: Body | None = None,
111-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
112-
) -> FileLink:
113-
"""
114-
Retrieve a File Link
115-
116-
Args:
117-
file_link_id: The identifier of the File Link.
118-
119-
extra_headers: Send extra headers
120-
121-
extra_query: Add additional query parameters to the request
122-
123-
extra_body: Add additional JSON properties to the request
124-
125-
timeout: Override the client-level default timeout for this request, in seconds
126-
"""
127-
if not file_link_id:
128-
raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}")
129-
return self._get(
130-
f"/file_links/{file_link_id}",
131-
options=make_request_options(
132-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
133-
),
134-
cast_to=FileLink,
135-
)
136-
137-
def list(
138-
self,
139-
*,
140-
file_id: str,
141-
created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN,
142-
cursor: str | NotGiven = NOT_GIVEN,
143-
idempotency_key: str | NotGiven = NOT_GIVEN,
144-
limit: int | NotGiven = NOT_GIVEN,
145-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
146-
# The extra values given here take precedence over values defined on the client or passed to this method.
147-
extra_headers: Headers | None = None,
148-
extra_query: Query | None = None,
149-
extra_body: Body | None = None,
150-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
151-
) -> SyncPage[FileLink]:
152-
"""
153-
List File Links
154-
155-
Args:
156-
file_id: The identifier of the File to list File Links for.
157-
158-
cursor: Return the page of entries after this one.
159-
160-
idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
161-
that object. This value is unique across Increase and is used to ensure that a
162-
request is only processed once. Learn more about
163-
[idempotency](https://increase.com/documentation/idempotency-keys).
164-
165-
limit: Limit the size of the list that is returned. The default (and maximum) is 100
166-
objects.
167-
168-
extra_headers: Send extra headers
169-
170-
extra_query: Add additional query parameters to the request
171-
172-
extra_body: Add additional JSON properties to the request
173-
174-
timeout: Override the client-level default timeout for this request, in seconds
175-
"""
176-
return self._get_api_list(
177-
"/file_links",
178-
page=SyncPage[FileLink],
179-
options=make_request_options(
180-
extra_headers=extra_headers,
181-
extra_query=extra_query,
182-
extra_body=extra_body,
183-
timeout=timeout,
184-
query=maybe_transform(
185-
{
186-
"file_id": file_id,
187-
"created_at": created_at,
188-
"cursor": cursor,
189-
"idempotency_key": idempotency_key,
190-
"limit": limit,
191-
},
192-
file_link_list_params.FileLinkListParams,
193-
),
194-
),
195-
model=FileLink,
196-
)
197-
198101

199102
class AsyncFileLinksResource(AsyncAPIResource):
200103
@cached_property
@@ -267,102 +170,6 @@ async def create(
267170
cast_to=FileLink,
268171
)
269172

270-
async def retrieve(
271-
self,
272-
file_link_id: str,
273-
*,
274-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
275-
# The extra values given here take precedence over values defined on the client or passed to this method.
276-
extra_headers: Headers | None = None,
277-
extra_query: Query | None = None,
278-
extra_body: Body | None = None,
279-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
280-
) -> FileLink:
281-
"""
282-
Retrieve a File Link
283-
284-
Args:
285-
file_link_id: The identifier of the File Link.
286-
287-
extra_headers: Send extra headers
288-
289-
extra_query: Add additional query parameters to the request
290-
291-
extra_body: Add additional JSON properties to the request
292-
293-
timeout: Override the client-level default timeout for this request, in seconds
294-
"""
295-
if not file_link_id:
296-
raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}")
297-
return await self._get(
298-
f"/file_links/{file_link_id}",
299-
options=make_request_options(
300-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
301-
),
302-
cast_to=FileLink,
303-
)
304-
305-
def list(
306-
self,
307-
*,
308-
file_id: str,
309-
created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN,
310-
cursor: str | NotGiven = NOT_GIVEN,
311-
idempotency_key: str | NotGiven = NOT_GIVEN,
312-
limit: int | NotGiven = NOT_GIVEN,
313-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
314-
# The extra values given here take precedence over values defined on the client or passed to this method.
315-
extra_headers: Headers | None = None,
316-
extra_query: Query | None = None,
317-
extra_body: Body | None = None,
318-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
319-
) -> AsyncPaginator[FileLink, AsyncPage[FileLink]]:
320-
"""
321-
List File Links
322-
323-
Args:
324-
file_id: The identifier of the File to list File Links for.
325-
326-
cursor: Return the page of entries after this one.
327-
328-
idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
329-
that object. This value is unique across Increase and is used to ensure that a
330-
request is only processed once. Learn more about
331-
[idempotency](https://increase.com/documentation/idempotency-keys).
332-
333-
limit: Limit the size of the list that is returned. The default (and maximum) is 100
334-
objects.
335-
336-
extra_headers: Send extra headers
337-
338-
extra_query: Add additional query parameters to the request
339-
340-
extra_body: Add additional JSON properties to the request
341-
342-
timeout: Override the client-level default timeout for this request, in seconds
343-
"""
344-
return self._get_api_list(
345-
"/file_links",
346-
page=AsyncPage[FileLink],
347-
options=make_request_options(
348-
extra_headers=extra_headers,
349-
extra_query=extra_query,
350-
extra_body=extra_body,
351-
timeout=timeout,
352-
query=maybe_transform(
353-
{
354-
"file_id": file_id,
355-
"created_at": created_at,
356-
"cursor": cursor,
357-
"idempotency_key": idempotency_key,
358-
"limit": limit,
359-
},
360-
file_link_list_params.FileLinkListParams,
361-
),
362-
),
363-
model=FileLink,
364-
)
365-
366173

367174
class FileLinksResourceWithRawResponse:
368175
def __init__(self, file_links: FileLinksResource) -> None:
@@ -371,12 +178,6 @@ def __init__(self, file_links: FileLinksResource) -> None:
371178
self.create = to_raw_response_wrapper(
372179
file_links.create,
373180
)
374-
self.retrieve = to_raw_response_wrapper(
375-
file_links.retrieve,
376-
)
377-
self.list = to_raw_response_wrapper(
378-
file_links.list,
379-
)
380181

381182

382183
class AsyncFileLinksResourceWithRawResponse:
@@ -386,12 +187,6 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None:
386187
self.create = async_to_raw_response_wrapper(
387188
file_links.create,
388189
)
389-
self.retrieve = async_to_raw_response_wrapper(
390-
file_links.retrieve,
391-
)
392-
self.list = async_to_raw_response_wrapper(
393-
file_links.list,
394-
)
395190

396191

397192
class FileLinksResourceWithStreamingResponse:
@@ -401,12 +196,6 @@ def __init__(self, file_links: FileLinksResource) -> None:
401196
self.create = to_streamed_response_wrapper(
402197
file_links.create,
403198
)
404-
self.retrieve = to_streamed_response_wrapper(
405-
file_links.retrieve,
406-
)
407-
self.list = to_streamed_response_wrapper(
408-
file_links.list,
409-
)
410199

411200

412201
class AsyncFileLinksResourceWithStreamingResponse:
@@ -416,9 +205,3 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None:
416205
self.create = async_to_streamed_response_wrapper(
417206
file_links.create,
418207
)
419-
self.retrieve = async_to_streamed_response_wrapper(
420-
file_links.retrieve,
421-
)
422-
self.list = async_to_streamed_response_wrapper(
423-
file_links.list,
424-
)

src/increase/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
from .account_update_params import AccountUpdateParams as AccountUpdateParams
6262
from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet
6363
from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams
64-
from .file_link_list_params import FileLinkListParams as FileLinkListParams
6564
from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit
6665
from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer
6766
from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams

src/increase/types/file.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ class File(BaseModel):
2626
- `from_increase` - This File was generated by Increase.
2727
"""
2828

29-
download_url: Optional[str] = None
30-
"""A URL from where the File can be downloaded at this point in time.
31-
32-
The location of this URL may change over time. This URL requires authentication
33-
with your Increase API key. If you need a URL that does not require
34-
authentication, create a File Link instead.
35-
"""
36-
3729
filename: Optional[str] = None
3830
"""The filename that was provided upon upload or generated by Increase."""
3931

src/increase/types/file_link.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ class FileLink(BaseModel):
3636
[idempotency](https://increase.com/documentation/idempotency-keys).
3737
"""
3838

39-
public_download_url: str
40-
"""A URL where the File can be downloaded.
41-
42-
The URL will expire after the `expires_at` time. This URL is unauthenticated and
43-
can be used to download the File without an Increase API key.
44-
"""
45-
4639
type: Literal["file_link"]
4740
"""A constant representing the object's type.
4841
4942
For this resource it will always be `file_link`.
5043
"""
44+
45+
unauthenticated_url: str
46+
"""A URL where the File can be downloaded.
47+
48+
The URL will expire after the `expires_at` time. This URL is unauthenticated and
49+
can be used to download the File without an Increase API key.
50+
"""

src/increase/types/file_link_list_params.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)