Skip to content

Commit 8d67129

Browse files
feat(api): api update
1 parent 2166a58 commit 8d67129

File tree

4 files changed

+185
-4
lines changed

4 files changed

+185
-4
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 237
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a8ae6b4ff6276a68a103dca4c701c77d409afe3f08ef8435adb3527e1385ce7.yml
3-
openapi_spec_hash: d56da3ae77306aec4c8530fba0dfe053
4-
config_hash: 896b006f9647a513eda3b228cf17c199
1+
configured_endpoints: 238
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ce680832c1cad08fe72f9d4b9df37379affbe88f539448d991039474dce6674.yml
3+
openapi_spec_hash: 5d9c89c10f5987dc5596134d1f2c1668
4+
config_hash: e75db3094e90d5e48a2077b010b620f0

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ Methods:
518518
- <code title="get /entity_beneficial_owners/{entity_beneficial_owner_id}">client.beneficial_owners.<a href="./src/increase/resources/beneficial_owners.py">retrieve</a>(entity_beneficial_owner_id) -> <a href="./src/increase/types/entity_beneficial_owner.py">EntityBeneficialOwner</a></code>
519519
- <code title="patch /entity_beneficial_owners/{entity_beneficial_owner_id}">client.beneficial_owners.<a href="./src/increase/resources/beneficial_owners.py">update</a>(entity_beneficial_owner_id, \*\*<a href="src/increase/types/beneficial_owner_update_params.py">params</a>) -> <a href="./src/increase/types/entity_beneficial_owner.py">EntityBeneficialOwner</a></code>
520520
- <code title="get /entity_beneficial_owners">client.beneficial_owners.<a href="./src/increase/resources/beneficial_owners.py">list</a>(\*\*<a href="src/increase/types/beneficial_owner_list_params.py">params</a>) -> <a href="./src/increase/types/entity_beneficial_owner.py">SyncPage[EntityBeneficialOwner]</a></code>
521+
- <code title="post /entity_beneficial_owners/{entity_beneficial_owner_id}/archive">client.beneficial_owners.<a href="./src/increase/resources/beneficial_owners.py">archive</a>(entity_beneficial_owner_id) -> <a href="./src/increase/types/entity_beneficial_owner.py">EntityBeneficialOwner</a></code>
521522

522523
# SupplementalDocuments
523524

src/increase/resources/beneficial_owners.py

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,50 @@ def list(
208208
model=EntityBeneficialOwner,
209209
)
210210

211+
def archive(
212+
self,
213+
entity_beneficial_owner_id: str,
214+
*,
215+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
216+
# The extra values given here take precedence over values defined on the client or passed to this method.
217+
extra_headers: Headers | None = None,
218+
extra_query: Query | None = None,
219+
extra_body: Body | None = None,
220+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
221+
idempotency_key: str | None = None,
222+
) -> EntityBeneficialOwner:
223+
"""
224+
Archive a Beneficial Owner
225+
226+
Args:
227+
entity_beneficial_owner_id: The identifier of the Beneficial Owner to archive.
228+
229+
extra_headers: Send extra headers
230+
231+
extra_query: Add additional query parameters to the request
232+
233+
extra_body: Add additional JSON properties to the request
234+
235+
timeout: Override the client-level default timeout for this request, in seconds
236+
237+
idempotency_key: Specify a custom idempotency key for this request
238+
"""
239+
if not entity_beneficial_owner_id:
240+
raise ValueError(
241+
f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}"
242+
)
243+
return self._post(
244+
f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive",
245+
options=make_request_options(
246+
extra_headers=extra_headers,
247+
extra_query=extra_query,
248+
extra_body=extra_body,
249+
timeout=timeout,
250+
idempotency_key=idempotency_key,
251+
),
252+
cast_to=EntityBeneficialOwner,
253+
)
254+
211255

212256
class AsyncBeneficialOwnersResource(AsyncAPIResource):
213257
@cached_property
@@ -395,6 +439,50 @@ def list(
395439
model=EntityBeneficialOwner,
396440
)
397441

442+
async def archive(
443+
self,
444+
entity_beneficial_owner_id: str,
445+
*,
446+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
447+
# The extra values given here take precedence over values defined on the client or passed to this method.
448+
extra_headers: Headers | None = None,
449+
extra_query: Query | None = None,
450+
extra_body: Body | None = None,
451+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
452+
idempotency_key: str | None = None,
453+
) -> EntityBeneficialOwner:
454+
"""
455+
Archive a Beneficial Owner
456+
457+
Args:
458+
entity_beneficial_owner_id: The identifier of the Beneficial Owner to archive.
459+
460+
extra_headers: Send extra headers
461+
462+
extra_query: Add additional query parameters to the request
463+
464+
extra_body: Add additional JSON properties to the request
465+
466+
timeout: Override the client-level default timeout for this request, in seconds
467+
468+
idempotency_key: Specify a custom idempotency key for this request
469+
"""
470+
if not entity_beneficial_owner_id:
471+
raise ValueError(
472+
f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}"
473+
)
474+
return await self._post(
475+
f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive",
476+
options=make_request_options(
477+
extra_headers=extra_headers,
478+
extra_query=extra_query,
479+
extra_body=extra_body,
480+
timeout=timeout,
481+
idempotency_key=idempotency_key,
482+
),
483+
cast_to=EntityBeneficialOwner,
484+
)
485+
398486

399487
class BeneficialOwnersResourceWithRawResponse:
400488
def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None:
@@ -409,6 +497,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None:
409497
self.list = to_raw_response_wrapper(
410498
beneficial_owners.list,
411499
)
500+
self.archive = to_raw_response_wrapper(
501+
beneficial_owners.archive,
502+
)
412503

413504

414505
class AsyncBeneficialOwnersResourceWithRawResponse:
@@ -424,6 +515,9 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None:
424515
self.list = async_to_raw_response_wrapper(
425516
beneficial_owners.list,
426517
)
518+
self.archive = async_to_raw_response_wrapper(
519+
beneficial_owners.archive,
520+
)
427521

428522

429523
class BeneficialOwnersResourceWithStreamingResponse:
@@ -439,6 +533,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None:
439533
self.list = to_streamed_response_wrapper(
440534
beneficial_owners.list,
441535
)
536+
self.archive = to_streamed_response_wrapper(
537+
beneficial_owners.archive,
538+
)
442539

443540

444541
class AsyncBeneficialOwnersResourceWithStreamingResponse:
@@ -454,3 +551,6 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None:
454551
self.list = async_to_streamed_response_wrapper(
455552
beneficial_owners.list,
456553
)
554+
self.archive = async_to_streamed_response_wrapper(
555+
beneficial_owners.archive,
556+
)

tests/api_resources/test_beneficial_owners.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,46 @@ def test_streaming_response_list(self, client: Increase) -> None:
179179

180180
assert cast(Any, response.is_closed) is True
181181

182+
@parametrize
183+
def test_method_archive(self, client: Increase) -> None:
184+
beneficial_owner = client.beneficial_owners.archive(
185+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
186+
)
187+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
188+
189+
@parametrize
190+
def test_raw_response_archive(self, client: Increase) -> None:
191+
response = client.beneficial_owners.with_raw_response.archive(
192+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
193+
)
194+
195+
assert response.is_closed is True
196+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
197+
beneficial_owner = response.parse()
198+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
199+
200+
@parametrize
201+
def test_streaming_response_archive(self, client: Increase) -> None:
202+
with client.beneficial_owners.with_streaming_response.archive(
203+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
204+
) as response:
205+
assert not response.is_closed
206+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
207+
208+
beneficial_owner = response.parse()
209+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
210+
211+
assert cast(Any, response.is_closed) is True
212+
213+
@parametrize
214+
def test_path_params_archive(self, client: Increase) -> None:
215+
with pytest.raises(
216+
ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''"
217+
):
218+
client.beneficial_owners.with_raw_response.archive(
219+
"",
220+
)
221+
182222

183223
class TestAsyncBeneficialOwners:
184224
parametrize = pytest.mark.parametrize(
@@ -344,3 +384,43 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non
344384
assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"])
345385

346386
assert cast(Any, response.is_closed) is True
387+
388+
@parametrize
389+
async def test_method_archive(self, async_client: AsyncIncrease) -> None:
390+
beneficial_owner = await async_client.beneficial_owners.archive(
391+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
392+
)
393+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
394+
395+
@parametrize
396+
async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None:
397+
response = await async_client.beneficial_owners.with_raw_response.archive(
398+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
399+
)
400+
401+
assert response.is_closed is True
402+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
403+
beneficial_owner = await response.parse()
404+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
405+
406+
@parametrize
407+
async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None:
408+
async with async_client.beneficial_owners.with_streaming_response.archive(
409+
"entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7",
410+
) as response:
411+
assert not response.is_closed
412+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
413+
414+
beneficial_owner = await response.parse()
415+
assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"])
416+
417+
assert cast(Any, response.is_closed) is True
418+
419+
@parametrize
420+
async def test_path_params_archive(self, async_client: AsyncIncrease) -> None:
421+
with pytest.raises(
422+
ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''"
423+
):
424+
await async_client.beneficial_owners.with_raw_response.archive(
425+
"",
426+
)

0 commit comments

Comments
 (0)