Skip to content

Commit a55f0ff

Browse files
feat(api): api update
1 parent ede9637 commit a55f0ff

4 files changed

Lines changed: 52 additions & 5 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 217
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1eb1b9beeffa6783ab1a53c794e87a6d6d69ef975941d6213ce9e66fcf487a82.yml
3-
openapi_spec_hash: 246b178a64c9ac4a3e9332e406f6a90f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-166f5a60acb9f1b94415e641215f0988dc14a8bce6a0e1a95e521fdbb0b91243.yml
3+
openapi_spec_hash: adbd71ae90ad4559759517a17c4fec08
44
config_hash: 2a4a1945e6eefa24fa5b0590cf580fb4

src/increase/resources/entities.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ def update(
193193
entity_id: str,
194194
*,
195195
risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN,
196+
third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN,
196197
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
197198
# The extra values given here take precedence over values defined on the client or passed to this method.
198199
extra_headers: Headers | None = None,
@@ -210,6 +211,9 @@ def update(
210211
risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes,
211212
such as money laundering.
212213
214+
third_party_verification: A reference to data stored in a third-party verification service. Your
215+
integration may or may not use this field.
216+
213217
extra_headers: Send extra headers
214218
215219
extra_query: Add additional query parameters to the request
@@ -224,7 +228,13 @@ def update(
224228
raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}")
225229
return self._patch(
226230
f"/entities/{entity_id}",
227-
body=maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams),
231+
body=maybe_transform(
232+
{
233+
"risk_rating": risk_rating,
234+
"third_party_verification": third_party_verification,
235+
},
236+
entity_update_params.EntityUpdateParams,
237+
),
228238
options=make_request_options(
229239
extra_headers=extra_headers,
230240
extra_query=extra_query,
@@ -803,6 +813,7 @@ async def update(
803813
entity_id: str,
804814
*,
805815
risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN,
816+
third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN,
806817
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
807818
# The extra values given here take precedence over values defined on the client or passed to this method.
808819
extra_headers: Headers | None = None,
@@ -820,6 +831,9 @@ async def update(
820831
risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes,
821832
such as money laundering.
822833
834+
third_party_verification: A reference to data stored in a third-party verification service. Your
835+
integration may or may not use this field.
836+
823837
extra_headers: Send extra headers
824838
825839
extra_query: Add additional query parameters to the request
@@ -834,7 +848,13 @@ async def update(
834848
raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}")
835849
return await self._patch(
836850
f"/entities/{entity_id}",
837-
body=await async_maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams),
851+
body=await async_maybe_transform(
852+
{
853+
"risk_rating": risk_rating,
854+
"third_party_verification": third_party_verification,
855+
},
856+
entity_update_params.EntityUpdateParams,
857+
),
838858
options=make_request_options(
839859
extra_headers=extra_headers,
840860
extra_query=extra_query,

src/increase/types/entity_update_params.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from .._utils import PropertyInfo
1010

11-
__all__ = ["EntityUpdateParams", "RiskRating"]
11+
__all__ = ["EntityUpdateParams", "RiskRating", "ThirdPartyVerification"]
1212

1313

1414
class EntityUpdateParams(TypedDict, total=False):
@@ -18,6 +18,12 @@ class EntityUpdateParams(TypedDict, total=False):
1818
such as money laundering.
1919
"""
2020

21+
third_party_verification: ThirdPartyVerification
22+
"""A reference to data stored in a third-party verification service.
23+
24+
Your integration may or may not use this field.
25+
"""
26+
2127

2228
class RiskRating(TypedDict, total=False):
2329
rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
@@ -33,3 +39,16 @@ class RiskRating(TypedDict, total=False):
3339
- `medium` - Medium
3440
- `high` - High
3541
"""
42+
43+
44+
class ThirdPartyVerification(TypedDict, total=False):
45+
reference: Required[str]
46+
"""The reference identifier for the third party verification."""
47+
48+
vendor: Required[Literal["alloy", "middesk", "oscilar"]]
49+
"""The vendor that was used to perform the verification.
50+
51+
- `alloy` - Alloy. See https://alloy.com for more information.
52+
- `middesk` - Middesk. See https://middesk.com for more information.
53+
- `oscilar` - Oscilar. See https://oscilar.com for more information.
54+
"""

tests/api_resources/test_entities.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ def test_method_update_with_all_params(self, client: Increase) -> None:
351351
"rated_at": parse_datetime("2020-01-31T23:59:59Z"),
352352
"rating": "low",
353353
},
354+
third_party_verification={
355+
"reference": "x",
356+
"vendor": "alloy",
357+
},
354358
)
355359
assert_matches_type(Entity, entity, path=["response"])
356360

@@ -1232,6 +1236,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease)
12321236
"rated_at": parse_datetime("2020-01-31T23:59:59Z"),
12331237
"rating": "low",
12341238
},
1239+
third_party_verification={
1240+
"reference": "x",
1241+
"vendor": "alloy",
1242+
},
12351243
)
12361244
assert_matches_type(Entity, entity, path=["response"])
12371245

0 commit comments

Comments
 (0)