Skip to content

Commit

Permalink
feat(api): api update (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 12, 2024
1 parent f2d7d41 commit 650fe20
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 69
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-8a5f5d240accf9b035735a201c3828c9e5caf66047ba83c1bee98ae407fe296a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-4f88c9376bd23a069cb6b1a2863b6b98bbcecb9c231b66cfb37aacb011900ec0.yml
4 changes: 4 additions & 0 deletions src/structify/resources/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def merge(
*,
entity_1_id: str,
entity_2_id: str,
debug: bool | 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,
Expand All @@ -333,6 +334,7 @@ def merge(
{
"entity_1_id": entity_1_id,
"entity_2_id": entity_2_id,
"debug": debug,
},
entity_merge_params.EntityMergeParams,
),
Expand Down Expand Up @@ -814,6 +816,7 @@ async def merge(
*,
entity_1_id: str,
entity_2_id: str,
debug: bool | 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,
Expand All @@ -839,6 +842,7 @@ async def merge(
{
"entity_1_id": entity_1_id,
"entity_2_id": entity_2_id,
"debug": debug,
},
entity_merge_params.EntityMergeParams,
),
Expand Down
2 changes: 2 additions & 0 deletions src/structify/types/entity_merge_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ class EntityMergeParams(TypedDict, total=False):
entity_1_id: Required[str]

entity_2_id: Required[str]

debug: bool
18 changes: 18 additions & 0 deletions tests/api_resources/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ def test_method_merge(self, client: Structify) -> None:
)
assert_matches_type(EntityMergeResponse, entity, path=["response"])

@parametrize
def test_method_merge_with_all_params(self, client: Structify) -> None:
entity = client.entities.merge(
entity_1_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
entity_2_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
debug=True,
)
assert_matches_type(EntityMergeResponse, entity, path=["response"])

@parametrize
def test_raw_response_merge(self, client: Structify) -> None:
response = client.entities.with_raw_response.merge(
Expand Down Expand Up @@ -753,6 +762,15 @@ async def test_method_merge(self, async_client: AsyncStructify) -> None:
)
assert_matches_type(EntityMergeResponse, entity, path=["response"])

@parametrize
async def test_method_merge_with_all_params(self, async_client: AsyncStructify) -> None:
entity = await async_client.entities.merge(
entity_1_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
entity_2_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
debug=True,
)
assert_matches_type(EntityMergeResponse, entity, path=["response"])

@parametrize
async def test_raw_response_merge(self, async_client: AsyncStructify) -> None:
response = await async_client.entities.with_raw_response.merge(
Expand Down

0 comments on commit 650fe20

Please sign in to comment.