77
88import httpx
99
10- from ..types import file_link_list_params , file_link_create_params
10+ from ..types import file_link_create_params
1111from .._types import NOT_GIVEN , Body , Query , Headers , NotGiven
1212from .._utils import (
1313 maybe_transform ,
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
2625from ..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
199102class 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
367174class 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
382183class 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
397192class 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
412201class 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- )
0 commit comments