diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 655dc59b..82a37086 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - next jobs: lint: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 842f5fa7..03d9f9f6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.21.10" + ".": "0.21.11" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b712ee56..ae341c61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.21.11 (2024-07-15) + +Full Changelog: [v0.21.10...v0.21.11](https://github.com/Finch-API/finch-api-python/compare/v0.21.10...v0.21.11) + +### Chores + +* **ci:** also run workflows for PRs targeting `next` ([#427](https://github.com/Finch-API/finch-api-python/issues/427)) ([641b850](https://github.com/Finch-API/finch-api-python/commit/641b850a385c8e2ab0c7338b7f8d3f613fda6982)) +* **internal:** minor import restructuring ([#429](https://github.com/Finch-API/finch-api-python/issues/429)) ([fa85f33](https://github.com/Finch-API/finch-api-python/commit/fa85f33344ba1a67ec7a3f99e3c93bd7e1db8824)) +* **internal:** minor options / compat functions updates ([#431](https://github.com/Finch-API/finch-api-python/issues/431)) ([b74c798](https://github.com/Finch-API/finch-api-python/commit/b74c798cdefef33288ef19bc19d53f2109f372ab)) + + +### Documentation + +* **examples:** use named params more ([#430](https://github.com/Finch-API/finch-api-python/issues/430)) ([9186c5f](https://github.com/Finch-API/finch-api-python/commit/9186c5faa7cfe3809cb83a1aa51cd02a43205c95)) + ## 0.21.10 (2024-07-10) Full Changelog: [v0.21.9...v0.21.10](https://github.com/Finch-API/finch-api-python/compare/v0.21.9...v0.21.10) diff --git a/pyproject.toml b/pyproject.toml index 27b5aabc..0ea0bd7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "0.21.10" +version = "0.21.11" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index 2f20def3..4d943406 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -880,9 +880,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -962,7 +962,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1456,9 +1456,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1543,7 +1543,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) diff --git a/src/finch/_compat.py b/src/finch/_compat.py index 74c7639b..c919b5ad 100644 --- a/src/finch/_compat.py +++ b/src/finch/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: diff --git a/src/finch/_version.py b/src/finch/_version.py index 00a2eee8..f9d782cf 100644 --- a/src/finch/_version.py +++ b/src/finch/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "finch" -__version__ = "0.21.10" # x-release-please-version +__version__ = "0.21.11" # x-release-please-version diff --git a/src/finch/resources/access_tokens.py b/src/finch/resources/access_tokens.py index bfc5bf57..a9cdadb1 100644 --- a/src/finch/resources/access_tokens.py +++ b/src/finch/resources/access_tokens.py @@ -11,9 +11,7 @@ from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.create_access_token_response import CreateAccessTokenResponse __all__ = ["AccessTokens", "AsyncAccessTokens"] diff --git a/src/finch/resources/account.py b/src/finch/resources/account.py index 43d1347d..08622c07 100644 --- a/src/finch/resources/account.py +++ b/src/finch/resources/account.py @@ -9,9 +9,7 @@ from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.introspection import Introspection from ..types.disconnect_response import DisconnectResponse diff --git a/src/finch/resources/hris/benefits/benefits.py b/src/finch/resources/hris/benefits/benefits.py index 9b6058e8..0484a21d 100644 --- a/src/finch/resources/hris/benefits/benefits.py +++ b/src/finch/resources/hris/benefits/benefits.py @@ -25,10 +25,7 @@ from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.hris import BenefitType, BenefitFrequency, benefit_create_params, benefit_update_params -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.hris.benefit_type import BenefitType from ....types.hris.company_benefit import CompanyBenefit from ....types.hris.benefit_frequency import BenefitFrequency diff --git a/src/finch/resources/hris/benefits/individuals.py b/src/finch/resources/hris/benefits/individuals.py index 1695eeeb..e49ef186 100644 --- a/src/finch/resources/hris/benefits/individuals.py +++ b/src/finch/resources/hris/benefits/individuals.py @@ -13,10 +13,7 @@ from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ....pagination import SyncSinglePage, AsyncSinglePage -from ...._base_client import ( - AsyncPaginator, - make_request_options, -) +from ...._base_client import AsyncPaginator, make_request_options from ....types.hris.benefits import ( individual_enroll_many_params, individual_unenroll_many_params, diff --git a/src/finch/resources/hris/company.py b/src/finch/resources/hris/company.py index 5d796f0b..0ff218fb 100644 --- a/src/finch/resources/hris/company.py +++ b/src/finch/resources/hris/company.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.hris.company import Company __all__ = ["CompanyResource", "AsyncCompanyResource"] diff --git a/src/finch/resources/hris/directory.py b/src/finch/resources/hris/directory.py index 9a7a7e04..3cb6bcb4 100644 --- a/src/finch/resources/hris/directory.py +++ b/src/finch/resources/hris/directory.py @@ -14,10 +14,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncIndividualsPage, AsyncIndividualsPage from ...types.hris import directory_list_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hris.individual_in_directory import IndividualInDirectory __all__ = ["Directory", "AsyncDirectory"] diff --git a/src/finch/resources/hris/employments.py b/src/finch/resources/hris/employments.py index 46b3ddd5..867fcd20 100644 --- a/src/finch/resources/hris/employments.py +++ b/src/finch/resources/hris/employments.py @@ -14,10 +14,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncResponsesPage, AsyncResponsesPage from ...types.hris import employment_retrieve_many_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hris.employment_data_response import EmploymentDataResponse __all__ = ["Employments", "AsyncEmployments"] diff --git a/src/finch/resources/hris/individuals.py b/src/finch/resources/hris/individuals.py index 7b3923ed..705ee584 100644 --- a/src/finch/resources/hris/individuals.py +++ b/src/finch/resources/hris/individuals.py @@ -14,10 +14,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncResponsesPage, AsyncResponsesPage from ...types.hris import individual_retrieve_many_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hris.individual_response import IndividualResponse __all__ = ["Individuals", "AsyncIndividuals"] diff --git a/src/finch/resources/hris/pay_statements.py b/src/finch/resources/hris/pay_statements.py index db119680..0fa29199 100644 --- a/src/finch/resources/hris/pay_statements.py +++ b/src/finch/resources/hris/pay_statements.py @@ -14,10 +14,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncResponsesPage, AsyncResponsesPage from ...types.hris import pay_statement_retrieve_many_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hris.pay_statement_response import PayStatementResponse __all__ = ["PayStatements", "AsyncPayStatements"] diff --git a/src/finch/resources/hris/payments.py b/src/finch/resources/hris/payments.py index b554de10..8e27e735 100644 --- a/src/finch/resources/hris/payments.py +++ b/src/finch/resources/hris/payments.py @@ -15,10 +15,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.hris import payment_list_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.hris.payment import Payment __all__ = ["Payments", "AsyncPayments"] diff --git a/src/finch/resources/jobs/automated.py b/src/finch/resources/jobs/automated.py index 98389fa7..34cf152c 100644 --- a/src/finch/resources/jobs/automated.py +++ b/src/finch/resources/jobs/automated.py @@ -17,10 +17,7 @@ from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncPage, AsyncPage from ...types.jobs import automated_list_params, automated_create_params -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.jobs.automated_async_job import AutomatedAsyncJob from ...types.jobs.automated_create_response import AutomatedCreateResponse diff --git a/src/finch/resources/jobs/manual.py b/src/finch/resources/jobs/manual.py index 7a792d4d..740131e2 100644 --- a/src/finch/resources/jobs/manual.py +++ b/src/finch/resources/jobs/manual.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.jobs.manual_async_job import ManualAsyncJob __all__ = ["Manual", "AsyncManual"] diff --git a/src/finch/resources/payroll/pay_groups.py b/src/finch/resources/payroll/pay_groups.py index 954be7eb..edcf6e8d 100644 --- a/src/finch/resources/payroll/pay_groups.py +++ b/src/finch/resources/payroll/pay_groups.py @@ -13,10 +13,7 @@ from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncSinglePage, AsyncSinglePage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.payroll import pay_group_list_params from ...types.payroll.pay_group_list_response import PayGroupListResponse from ...types.payroll.pay_group_retrieve_response import PayGroupRetrieveResponse diff --git a/src/finch/resources/providers.py b/src/finch/resources/providers.py index 82ebb524..eabf68d7 100644 --- a/src/finch/resources/providers.py +++ b/src/finch/resources/providers.py @@ -10,10 +10,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.provider import Provider __all__ = ["Providers", "AsyncProviders"] diff --git a/src/finch/resources/request_forwarding.py b/src/finch/resources/request_forwarding.py index 73839d5b..9e1d314a 100644 --- a/src/finch/resources/request_forwarding.py +++ b/src/finch/resources/request_forwarding.py @@ -16,9 +16,7 @@ from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.request_forwarding_forward_response import RequestForwardingForwardResponse __all__ = ["RequestForwarding", "AsyncRequestForwarding"] diff --git a/src/finch/resources/sandbox/company.py b/src/finch/resources/sandbox/company.py index 10fec4f3..c243bfef 100644 --- a/src/finch/resources/sandbox/company.py +++ b/src/finch/resources/sandbox/company.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.sandbox import company_update_params from ...types.location_param import LocationParam from ...types.sandbox.company_update_response import CompanyUpdateResponse diff --git a/src/finch/resources/sandbox/connections/accounts.py b/src/finch/resources/sandbox/connections/accounts.py index 6fcab86a..bc13bec8 100644 --- a/src/finch/resources/sandbox/connections/accounts.py +++ b/src/finch/resources/sandbox/connections/accounts.py @@ -16,9 +16,7 @@ from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.sandbox.connections import account_create_params, account_update_params from ....types.shared.connection_status_type import ConnectionStatusType from ....types.sandbox.connections.account_create_response import AccountCreateResponse diff --git a/src/finch/resources/sandbox/connections/connections.py b/src/finch/resources/sandbox/connections/connections.py index 682f3321..8e658d01 100644 --- a/src/finch/resources/sandbox/connections/connections.py +++ b/src/finch/resources/sandbox/connections/connections.py @@ -24,9 +24,7 @@ from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.sandbox import connection_create_params from ....types.sandbox.connection_create_response import ConnectionCreateResponse diff --git a/src/finch/resources/sandbox/directory.py b/src/finch/resources/sandbox/directory.py index aae91df1..d06a96c9 100644 --- a/src/finch/resources/sandbox/directory.py +++ b/src/finch/resources/sandbox/directory.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.sandbox import directory_create_params from ...types.sandbox.directory_create_response import DirectoryCreateResponse diff --git a/src/finch/resources/sandbox/employment.py b/src/finch/resources/sandbox/employment.py index 8c2533d3..1e3b8c1a 100644 --- a/src/finch/resources/sandbox/employment.py +++ b/src/finch/resources/sandbox/employment.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.sandbox import employment_update_params from ...types.income_param import IncomeParam from ...types.location_param import LocationParam diff --git a/src/finch/resources/sandbox/individual.py b/src/finch/resources/sandbox/individual.py index 9be671d5..f08e7401 100644 --- a/src/finch/resources/sandbox/individual.py +++ b/src/finch/resources/sandbox/individual.py @@ -16,9 +16,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.sandbox import individual_update_params from ...types.location_param import LocationParam from ...types.sandbox.individual_update_response import IndividualUpdateResponse diff --git a/src/finch/resources/sandbox/jobs/configuration.py b/src/finch/resources/sandbox/jobs/configuration.py index 46fd5cad..8aae6f08 100644 --- a/src/finch/resources/sandbox/jobs/configuration.py +++ b/src/finch/resources/sandbox/jobs/configuration.py @@ -15,9 +15,7 @@ from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.sandbox.jobs import configuration_update_params from ....types.sandbox.jobs.sandbox_job_configuration import SandboxJobConfiguration from ....types.sandbox.jobs.configuration_retrieve_response import ConfigurationRetrieveResponse diff --git a/src/finch/resources/sandbox/jobs/jobs.py b/src/finch/resources/sandbox/jobs/jobs.py index fd6cd9ea..b8c904a7 100644 --- a/src/finch/resources/sandbox/jobs/jobs.py +++ b/src/finch/resources/sandbox/jobs/jobs.py @@ -23,9 +23,7 @@ ConfigurationWithStreamingResponse, AsyncConfigurationWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.sandbox import job_create_params from ....types.sandbox.job_create_response import JobCreateResponse diff --git a/src/finch/resources/sandbox/payment.py b/src/finch/resources/sandbox/payment.py index 7a1b057a..33b62542 100644 --- a/src/finch/resources/sandbox/payment.py +++ b/src/finch/resources/sandbox/payment.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.sandbox import payment_create_params from ...types.sandbox.payment_create_response import PaymentCreateResponse diff --git a/tests/api_resources/hris/benefits/test_individuals.py b/tests/api_resources/hris/benefits/test_individuals.py index 9defbc96..98571e3e 100644 --- a/tests/api_resources/hris/benefits/test_individuals.py +++ b/tests/api_resources/hris/benefits/test_individuals.py @@ -26,7 +26,7 @@ class TestIndividuals: @parametrize def test_method_enroll_many(self, client: Finch) -> None: individual = client.hris.benefits.individuals.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) assert_matches_type(SyncSinglePage[EnrolledIndividual], individual, path=["response"]) @@ -34,7 +34,7 @@ def test_method_enroll_many(self, client: Finch) -> None: @parametrize def test_raw_response_enroll_many(self, client: Finch) -> None: response = client.hris.benefits.individuals.with_raw_response.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) @@ -46,7 +46,7 @@ def test_raw_response_enroll_many(self, client: Finch) -> None: @parametrize def test_streaming_response_enroll_many(self, client: Finch) -> None: with client.hris.benefits.individuals.with_streaming_response.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) as response: assert not response.is_closed @@ -61,21 +61,21 @@ def test_streaming_response_enroll_many(self, client: Finch) -> None: def test_path_params_enroll_many(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): client.hris.benefits.individuals.with_raw_response.enroll_many( - "", + benefit_id="", individuals=[{}], ) @parametrize def test_method_enrolled_ids(self, client: Finch) -> None: individual = client.hris.benefits.individuals.enrolled_ids( - "string", + "benefit_id", ) assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"]) @parametrize def test_raw_response_enrolled_ids(self, client: Finch) -> None: response = client.hris.benefits.individuals.with_raw_response.enrolled_ids( - "string", + "benefit_id", ) assert response.is_closed is True @@ -86,7 +86,7 @@ def test_raw_response_enrolled_ids(self, client: Finch) -> None: @parametrize def test_streaming_response_enrolled_ids(self, client: Finch) -> None: with client.hris.benefits.individuals.with_streaming_response.enrolled_ids( - "string", + "benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ def test_path_params_enrolled_ids(self, client: Finch) -> None: @parametrize def test_method_retrieve_many_benefits(self, client: Finch) -> None: individual = client.hris.benefits.individuals.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) assert_matches_type(SyncSinglePage[IndividualBenefit], individual, path=["response"]) @parametrize def test_method_retrieve_many_benefits_with_all_params(self, client: Finch) -> None: individual = client.hris.benefits.individuals.retrieve_many_benefits( - "string", + benefit_id="benefit_id", individual_ids="d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a", ) assert_matches_type(SyncSinglePage[IndividualBenefit], individual, path=["response"]) @@ -121,7 +121,7 @@ def test_method_retrieve_many_benefits_with_all_params(self, client: Finch) -> N @parametrize def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None: response = client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -132,7 +132,7 @@ def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve_many_benefits(self, client: Finch) -> None: with client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,20 +146,20 @@ def test_streaming_response_retrieve_many_benefits(self, client: Finch) -> None: def test_path_params_retrieve_many_benefits(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits( - "", + benefit_id="", ) @parametrize def test_method_unenroll_many(self, client: Finch) -> None: individual = client.hris.benefits.individuals.unenroll_many( - "string", + benefit_id="benefit_id", ) assert_matches_type(SyncSinglePage[UnenrolledIndividual], individual, path=["response"]) @parametrize def test_method_unenroll_many_with_all_params(self, client: Finch) -> None: individual = client.hris.benefits.individuals.unenroll_many( - "string", + benefit_id="benefit_id", individual_ids=["string", "string", "string"], ) assert_matches_type(SyncSinglePage[UnenrolledIndividual], individual, path=["response"]) @@ -167,7 +167,7 @@ def test_method_unenroll_many_with_all_params(self, client: Finch) -> None: @parametrize def test_raw_response_unenroll_many(self, client: Finch) -> None: response = client.hris.benefits.individuals.with_raw_response.unenroll_many( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_unenroll_many(self, client: Finch) -> None: @parametrize def test_streaming_response_unenroll_many(self, client: Finch) -> None: with client.hris.benefits.individuals.with_streaming_response.unenroll_many( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,7 +192,7 @@ def test_streaming_response_unenroll_many(self, client: Finch) -> None: def test_path_params_unenroll_many(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): client.hris.benefits.individuals.with_raw_response.unenroll_many( - "", + benefit_id="", ) @@ -202,7 +202,7 @@ class TestAsyncIndividuals: @parametrize async def test_method_enroll_many(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) assert_matches_type(AsyncSinglePage[EnrolledIndividual], individual, path=["response"]) @@ -210,7 +210,7 @@ async def test_method_enroll_many(self, async_client: AsyncFinch) -> None: @parametrize async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.individuals.with_raw_response.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) @@ -222,7 +222,7 @@ async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_enroll_many(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.individuals.with_streaming_response.enroll_many( - "string", + benefit_id="benefit_id", individuals=[{}], ) as response: assert not response.is_closed @@ -237,21 +237,21 @@ async def test_streaming_response_enroll_many(self, async_client: AsyncFinch) -> async def test_path_params_enroll_many(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): await async_client.hris.benefits.individuals.with_raw_response.enroll_many( - "", + benefit_id="", individuals=[{}], ) @parametrize async def test_method_enrolled_ids(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.enrolled_ids( - "string", + "benefit_id", ) assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"]) @parametrize async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.individuals.with_raw_response.enrolled_ids( - "string", + "benefit_id", ) assert response.is_closed is True @@ -262,7 +262,7 @@ async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None @parametrize async def test_streaming_response_enrolled_ids(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.individuals.with_streaming_response.enrolled_ids( - "string", + "benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -282,14 +282,14 @@ async def test_path_params_enrolled_ids(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_retrieve_many_benefits(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) assert_matches_type(AsyncSinglePage[IndividualBenefit], individual, path=["response"]) @parametrize async def test_method_retrieve_many_benefits_with_all_params(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.retrieve_many_benefits( - "string", + benefit_id="benefit_id", individual_ids="d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a", ) assert_matches_type(AsyncSinglePage[IndividualBenefit], individual, path=["response"]) @@ -297,7 +297,7 @@ async def test_method_retrieve_many_benefits_with_all_params(self, async_client: @parametrize async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -308,7 +308,7 @@ async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinc @parametrize async def test_streaming_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -322,20 +322,20 @@ async def test_streaming_response_retrieve_many_benefits(self, async_client: Asy async def test_path_params_retrieve_many_benefits(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits( - "", + benefit_id="", ) @parametrize async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.unenroll_many( - "string", + benefit_id="benefit_id", ) assert_matches_type(AsyncSinglePage[UnenrolledIndividual], individual, path=["response"]) @parametrize async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.benefits.individuals.unenroll_many( - "string", + benefit_id="benefit_id", individual_ids=["string", "string", "string"], ) assert_matches_type(AsyncSinglePage[UnenrolledIndividual], individual, path=["response"]) @@ -343,7 +343,7 @@ async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFin @parametrize async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.individuals.with_raw_response.unenroll_many( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> Non @parametrize async def test_streaming_response_unenroll_many(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.individuals.with_streaming_response.unenroll_many( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -368,5 +368,5 @@ async def test_streaming_response_unenroll_many(self, async_client: AsyncFinch) async def test_path_params_unenroll_many(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): await async_client.hris.benefits.individuals.with_raw_response.unenroll_many( - "", + benefit_id="", ) diff --git a/tests/api_resources/hris/test_benefits.py b/tests/api_resources/hris/test_benefits.py index ea02d4ac..ce1adced 100644 --- a/tests/api_resources/hris/test_benefits.py +++ b/tests/api_resources/hris/test_benefits.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Finch) -> None: @parametrize def test_method_create_with_all_params(self, client: Finch) -> None: benefit = client.hris.benefits.create( - description="string", + description="description", frequency="one_time", type="401k", ) @@ -60,14 +60,14 @@ def test_streaming_response_create(self, client: Finch) -> None: @parametrize def test_method_retrieve(self, client: Finch) -> None: benefit = client.hris.benefits.retrieve( - "string", + "benefit_id", ) assert_matches_type(CompanyBenefit, benefit, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.hris.benefits.with_raw_response.retrieve( - "string", + "benefit_id", ) assert response.is_closed is True @@ -78,7 +78,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.hris.benefits.with_streaming_response.retrieve( - "string", + "benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,22 +98,22 @@ def test_path_params_retrieve(self, client: Finch) -> None: @parametrize def test_method_update(self, client: Finch) -> None: benefit = client.hris.benefits.update( - "string", + benefit_id="benefit_id", ) assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Finch) -> None: benefit = client.hris.benefits.update( - "string", - description="string", + benefit_id="benefit_id", + description="description", ) assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"]) @parametrize def test_raw_response_update(self, client: Finch) -> None: response = client.hris.benefits.with_raw_response.update( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -124,7 +124,7 @@ def test_raw_response_update(self, client: Finch) -> None: @parametrize def test_streaming_response_update(self, client: Finch) -> None: with client.hris.benefits.with_streaming_response.update( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,7 +138,7 @@ def test_streaming_response_update(self, client: Finch) -> None: def test_path_params_update(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): client.hris.benefits.with_raw_response.update( - "", + benefit_id="", ) @parametrize @@ -203,7 +203,7 @@ async def test_method_create(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None: benefit = await async_client.hris.benefits.create( - description="string", + description="description", frequency="one_time", type="401k", ) @@ -232,14 +232,14 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: benefit = await async_client.hris.benefits.retrieve( - "string", + "benefit_id", ) assert_matches_type(CompanyBenefit, benefit, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.with_raw_response.retrieve( - "string", + "benefit_id", ) assert response.is_closed is True @@ -250,7 +250,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.with_streaming_response.retrieve( - "string", + "benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,22 +270,22 @@ async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_update(self, async_client: AsyncFinch) -> None: benefit = await async_client.hris.benefits.update( - "string", + benefit_id="benefit_id", ) assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> None: benefit = await async_client.hris.benefits.update( - "string", - description="string", + benefit_id="benefit_id", + description="description", ) assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncFinch) -> None: response = await async_client.hris.benefits.with_raw_response.update( - "string", + benefit_id="benefit_id", ) assert response.is_closed is True @@ -296,7 +296,7 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncFinch) -> None: async with async_client.hris.benefits.with_streaming_response.update( - "string", + benefit_id="benefit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -310,7 +310,7 @@ async def test_streaming_response_update(self, async_client: AsyncFinch) -> None async def test_path_params_update(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"): await async_client.hris.benefits.with_raw_response.update( - "", + benefit_id="", ) @parametrize diff --git a/tests/api_resources/hris/test_employments.py b/tests/api_resources/hris/test_employments.py index d228f309..22779d16 100644 --- a/tests/api_resources/hris/test_employments.py +++ b/tests/api_resources/hris/test_employments.py @@ -21,14 +21,22 @@ class TestEmployments: @parametrize def test_method_retrieve_many(self, client: Finch) -> None: employment = client.hris.employments.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert_matches_type(SyncResponsesPage[EmploymentDataResponse], employment, path=["response"]) @parametrize def test_raw_response_retrieve_many(self, client: Finch) -> None: response = client.hris.employments.with_raw_response.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert response.is_closed is True @@ -39,7 +47,11 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve_many(self, client: Finch) -> None: with client.hris.employments.with_streaming_response.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,14 +68,22 @@ class TestAsyncEmployments: @parametrize async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None: employment = await async_client.hris.employments.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert_matches_type(AsyncResponsesPage[EmploymentDataResponse], employment, path=["response"]) @parametrize async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None: response = await async_client.hris.employments.with_raw_response.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert response.is_closed is True @@ -74,7 +94,11 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non @parametrize async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None: async with async_client.hris.employments.with_streaming_response.retrieve_many( - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/hris/test_individuals.py b/tests/api_resources/hris/test_individuals.py index f34d10fb..72031f6d 100644 --- a/tests/api_resources/hris/test_individuals.py +++ b/tests/api_resources/hris/test_individuals.py @@ -27,7 +27,11 @@ def test_method_retrieve_many(self, client: Finch) -> None: def test_method_retrieve_many_with_all_params(self, client: Finch) -> None: individual = client.hris.individuals.retrieve_many( options={"include": ["string", "string", "string"]}, - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert_matches_type(SyncResponsesPage[IndividualResponse], individual, path=["response"]) @@ -64,7 +68,11 @@ async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None: async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFinch) -> None: individual = await async_client.hris.individuals.retrieve_many( options={"include": ["string", "string", "string"]}, - requests=[{"individual_id": "string"}, {"individual_id": "string"}, {"individual_id": "string"}], + requests=[ + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + {"individual_id": "individual_id"}, + ], ) assert_matches_type(AsyncResponsesPage[IndividualResponse], individual, path=["response"]) diff --git a/tests/api_resources/jobs/test_automated.py b/tests/api_resources/jobs/test_automated.py index 5cf5644a..a56e5d93 100644 --- a/tests/api_resources/jobs/test_automated.py +++ b/tests/api_resources/jobs/test_automated.py @@ -52,14 +52,14 @@ def test_streaming_response_create(self, client: Finch) -> None: @parametrize def test_method_retrieve(self, client: Finch) -> None: automated = client.jobs.automated.retrieve( - "string", + "job_id", ) assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.jobs.automated.with_raw_response.retrieve( - "string", + "job_id", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.jobs.automated.with_streaming_response.retrieve( - "string", + "job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,14 +158,14 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: automated = await async_client.jobs.automated.retrieve( - "string", + "job_id", ) assert_matches_type(AutomatedAsyncJob, automated, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.jobs.automated.with_raw_response.retrieve( - "string", + "job_id", ) assert response.is_closed is True @@ -176,7 +176,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.jobs.automated.with_streaming_response.retrieve( - "string", + "job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/jobs/test_manual.py b/tests/api_resources/jobs/test_manual.py index ec6d528a..df63695c 100644 --- a/tests/api_resources/jobs/test_manual.py +++ b/tests/api_resources/jobs/test_manual.py @@ -20,14 +20,14 @@ class TestManual: @parametrize def test_method_retrieve(self, client: Finch) -> None: manual = client.jobs.manual.retrieve( - "string", + "job_id", ) assert_matches_type(ManualAsyncJob, manual, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.jobs.manual.with_raw_response.retrieve( - "string", + "job_id", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.jobs.manual.with_streaming_response.retrieve( - "string", + "job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,14 +62,14 @@ class TestAsyncManual: @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: manual = await async_client.jobs.manual.retrieve( - "string", + "job_id", ) assert_matches_type(ManualAsyncJob, manual, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.jobs.manual.with_raw_response.retrieve( - "string", + "job_id", ) assert response.is_closed is True @@ -80,7 +80,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.jobs.manual.with_streaming_response.retrieve( - "string", + "job_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/payroll/test_pay_groups.py b/tests/api_resources/payroll/test_pay_groups.py index 1eeaf7f9..755c263e 100644 --- a/tests/api_resources/payroll/test_pay_groups.py +++ b/tests/api_resources/payroll/test_pay_groups.py @@ -21,14 +21,14 @@ class TestPayGroups: @parametrize def test_method_retrieve(self, client: Finch) -> None: pay_group = client.payroll.pay_groups.retrieve( - "string", + "pay_group_id", ) assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Finch) -> None: response = client.payroll.pay_groups.with_raw_response.retrieve( - "string", + "pay_group_id", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None: @parametrize def test_streaming_response_retrieve(self, client: Finch) -> None: with client.payroll.pay_groups.with_streaming_response.retrieve( - "string", + "pay_group_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,14 +96,14 @@ class TestAsyncPayGroups: @parametrize async def test_method_retrieve(self, async_client: AsyncFinch) -> None: pay_group = await async_client.payroll.pay_groups.retrieve( - "string", + "pay_group_id", ) assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: response = await async_client.payroll.pay_groups.with_raw_response.retrieve( - "string", + "pay_group_id", ) assert response.is_closed is True @@ -114,7 +114,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None: async with async_client.payroll.pay_groups.with_streaming_response.retrieve( - "string", + "pay_group_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/sandbox/connections/test_accounts.py b/tests/api_resources/sandbox/connections/test_accounts.py index 82058694..0655efff 100644 --- a/tests/api_resources/sandbox/connections/test_accounts.py +++ b/tests/api_resources/sandbox/connections/test_accounts.py @@ -25,7 +25,7 @@ class TestAccounts: def test_method_create(self, client: Finch) -> None: account = client.sandbox.connections.accounts.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) assert_matches_type(AccountCreateResponse, account, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: Finch) -> None: def test_method_create_with_all_params(self, client: Finch) -> None: account = client.sandbox.connections.accounts.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", authentication_type="credential", products=["string", "string", "string"], ) @@ -45,7 +45,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: def test_raw_response_create(self, client: Finch) -> None: response = client.sandbox.connections.accounts.with_raw_response.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) assert response.is_closed is True @@ -58,7 +58,7 @@ def test_raw_response_create(self, client: Finch) -> None: def test_streaming_response_create(self, client: Finch) -> None: with client.sandbox.connections.accounts.with_streaming_response.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,7 +109,7 @@ class TestAsyncAccounts: async def test_method_create(self, async_client: AsyncFinch) -> None: account = await async_client.sandbox.connections.accounts.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) assert_matches_type(AccountCreateResponse, account, path=["response"]) @@ -118,7 +118,7 @@ async def test_method_create(self, async_client: AsyncFinch) -> None: async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None: account = await async_client.sandbox.connections.accounts.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", authentication_type="credential", products=["string", "string", "string"], ) @@ -129,7 +129,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> async def test_raw_response_create(self, async_client: AsyncFinch) -> None: response = await async_client.sandbox.connections.accounts.with_raw_response.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) assert response.is_closed is True @@ -142,7 +142,7 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None: async def test_streaming_response_create(self, async_client: AsyncFinch) -> None: async with async_client.sandbox.connections.accounts.with_streaming_response.create( company_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - provider_id="string", + provider_id="provider_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/sandbox/test_company.py b/tests/api_resources/sandbox/test_company.py index 4104eb8a..4935c0cb 100644 --- a/tests/api_resources/sandbox/test_company.py +++ b/tests/api_resources/sandbox/test_company.py @@ -22,12 +22,12 @@ def test_method_update(self, client: Finch) -> None: company = client.sandbox.company.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert_matches_type(CompanyUpdateResponse, company, path=["response"]) @@ -36,81 +36,81 @@ def test_method_update_with_all_params(self, client: Finch) -> None: company = client.sandbox.company.update( accounts=[ { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, ], departments=[ { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, ], - ein="string", + ein="ein", entity={ "type": "llc", "subtype": "s_corporation", }, - legal_name="string", + legal_name="legal_name", locations=[ { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, ], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert_matches_type(CompanyUpdateResponse, company, path=["response"]) @@ -119,12 +119,12 @@ def test_raw_response_update(self, client: Finch) -> None: response = client.sandbox.company.with_raw_response.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert response.is_closed is True @@ -137,12 +137,12 @@ def test_streaming_response_update(self, client: Finch) -> None: with client.sandbox.company.with_streaming_response.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,12 +161,12 @@ async def test_method_update(self, async_client: AsyncFinch) -> None: company = await async_client.sandbox.company.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert_matches_type(CompanyUpdateResponse, company, path=["response"]) @@ -175,81 +175,81 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> company = await async_client.sandbox.company.update( accounts=[ { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, { - "routing_number": "string", - "account_name": "string", - "institution_name": "string", + "routing_number": "routing_number", + "account_name": "account_name", + "institution_name": "institution_name", "account_type": "checking", - "account_number": "string", + "account_number": "account_number", }, ], departments=[ { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, { - "name": "string", - "parent": {"name": "string"}, + "name": "name", + "parent": {"name": "name"}, }, ], - ein="string", + ein="ein", entity={ "type": "llc", "subtype": "s_corporation", }, - legal_name="string", + legal_name="legal_name", locations=[ { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, { - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, ], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert_matches_type(CompanyUpdateResponse, company, path=["response"]) @@ -258,12 +258,12 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None: response = await async_client.sandbox.company.with_raw_response.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) assert response.is_closed is True @@ -276,12 +276,12 @@ async def test_streaming_response_update(self, async_client: AsyncFinch) -> None async with async_client.sandbox.company.with_streaming_response.update( accounts=[{}, {}, {}], departments=[{}, {}, {}], - ein="string", + ein="ein", entity={}, - legal_name="string", + legal_name="legal_name", locations=[{}, {}, {}], - primary_email="string", - primary_phone_number="string", + primary_email="primary_email", + primary_phone_number="primary_phone_number", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/sandbox/test_connections.py b/tests/api_resources/sandbox/test_connections.py index 2cbb0fe0..574747fb 100644 --- a/tests/api_resources/sandbox/test_connections.py +++ b/tests/api_resources/sandbox/test_connections.py @@ -21,7 +21,7 @@ class TestConnections: @parametrize def test_method_create(self, client: Finch) -> None: connection = client.sandbox.connections.create( - provider_id="string", + provider_id="provider_id", ) assert_matches_type(ConnectionCreateResponse, connection, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Finch) -> None: @parametrize def test_method_create_with_all_params(self, client: Finch) -> None: connection = client.sandbox.connections.create( - provider_id="string", + provider_id="provider_id", authentication_type="credential", employee_size=0, products=["string", "string", "string"], @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: @parametrize def test_raw_response_create(self, client: Finch) -> None: response = client.sandbox.connections.with_raw_response.create( - provider_id="string", + provider_id="provider_id", ) assert response.is_closed is True @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Finch) -> None: @parametrize def test_streaming_response_create(self, client: Finch) -> None: with client.sandbox.connections.with_streaming_response.create( - provider_id="string", + provider_id="provider_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -70,7 +70,7 @@ class TestAsyncConnections: @parametrize async def test_method_create(self, async_client: AsyncFinch) -> None: connection = await async_client.sandbox.connections.create( - provider_id="string", + provider_id="provider_id", ) assert_matches_type(ConnectionCreateResponse, connection, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_create(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None: connection = await async_client.sandbox.connections.create( - provider_id="string", + provider_id="provider_id", authentication_type="credential", employee_size=0, products=["string", "string", "string"], @@ -89,7 +89,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> @parametrize async def test_raw_response_create(self, async_client: AsyncFinch) -> None: response = await async_client.sandbox.connections.with_raw_response.create( - provider_id="string", + provider_id="provider_id", ) assert response.is_closed is True @@ -101,7 +101,7 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncFinch) -> None: async with async_client.sandbox.connections.with_streaming_response.create( - provider_id="string", + provider_id="provider_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/sandbox/test_employment.py b/tests/api_resources/sandbox/test_employment.py index 7183dac5..6cdca66e 100644 --- a/tests/api_resources/sandbox/test_employment.py +++ b/tests/api_resources/sandbox/test_employment.py @@ -20,86 +20,86 @@ class TestEmployment: @parametrize def test_method_update(self, client: Finch) -> None: employment = client.sandbox.employment.update( - "string", + individual_id="individual_id", ) assert_matches_type(EmploymentUpdateResponse, employment, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Finch) -> None: employment = client.sandbox.employment.update( - "string", - class_code="string", + individual_id="individual_id", + class_code="class_code", custom_fields=[ { - "name": "string", + "name": "name", "value": {}, }, { - "name": "string", + "name": "name", "value": {}, }, { - "name": "string", + "name": "name", "value": {}, }, ], - department={"name": "string"}, + department={"name": "name"}, employment={ "type": "employee", "subtype": "full_time", }, - end_date="string", - first_name="string", + end_date="end_date", + first_name="first_name", income={ "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, income_history=[ { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, ], is_active=True, - last_name="string", + last_name="last_name", location={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, - manager={"id": "string"}, - middle_name="string", - source_id="string", + manager={"id": "id"}, + middle_name="middle_name", + source_id="source_id", start_date="3/4/2020", - title="string", + title="title", ) assert_matches_type(EmploymentUpdateResponse, employment, path=["response"]) @parametrize def test_raw_response_update(self, client: Finch) -> None: response = client.sandbox.employment.with_raw_response.update( - "string", + individual_id="individual_id", ) assert response.is_closed is True @@ -110,7 +110,7 @@ def test_raw_response_update(self, client: Finch) -> None: @parametrize def test_streaming_response_update(self, client: Finch) -> None: with client.sandbox.employment.with_streaming_response.update( - "string", + individual_id="individual_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -124,7 +124,7 @@ def test_streaming_response_update(self, client: Finch) -> None: def test_path_params_update(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `individual_id` but received ''"): client.sandbox.employment.with_raw_response.update( - "", + individual_id="", ) @@ -134,86 +134,86 @@ class TestAsyncEmployment: @parametrize async def test_method_update(self, async_client: AsyncFinch) -> None: employment = await async_client.sandbox.employment.update( - "string", + individual_id="individual_id", ) assert_matches_type(EmploymentUpdateResponse, employment, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> None: employment = await async_client.sandbox.employment.update( - "string", - class_code="string", + individual_id="individual_id", + class_code="class_code", custom_fields=[ { - "name": "string", + "name": "name", "value": {}, }, { - "name": "string", + "name": "name", "value": {}, }, { - "name": "string", + "name": "name", "value": {}, }, ], - department={"name": "string"}, + department={"name": "name"}, employment={ "type": "employee", "subtype": "full_time", }, - end_date="string", - first_name="string", + end_date="end_date", + first_name="first_name", income={ "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, income_history=[ { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, { "unit": "yearly", "amount": 0, - "currency": "string", - "effective_date": "string", + "currency": "currency", + "effective_date": "effective_date", }, ], is_active=True, - last_name="string", + last_name="last_name", location={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, - manager={"id": "string"}, - middle_name="string", - source_id="string", + manager={"id": "id"}, + middle_name="middle_name", + source_id="source_id", start_date="3/4/2020", - title="string", + title="title", ) assert_matches_type(EmploymentUpdateResponse, employment, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncFinch) -> None: response = await async_client.sandbox.employment.with_raw_response.update( - "string", + individual_id="individual_id", ) assert response.is_closed is True @@ -224,7 +224,7 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncFinch) -> None: async with async_client.sandbox.employment.with_streaming_response.update( - "string", + individual_id="individual_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -238,5 +238,5 @@ async def test_streaming_response_update(self, async_client: AsyncFinch) -> None async def test_path_params_update(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `individual_id` but received ''"): await async_client.sandbox.employment.with_raw_response.update( - "", + individual_id="", ) diff --git a/tests/api_resources/sandbox/test_individual.py b/tests/api_resources/sandbox/test_individual.py index 5d8f0683..4bd79d3e 100644 --- a/tests/api_resources/sandbox/test_individual.py +++ b/tests/api_resources/sandbox/test_individual.py @@ -20,68 +20,68 @@ class TestIndividual: @parametrize def test_method_update(self, client: Finch) -> None: individual = client.sandbox.individual.update( - "string", + individual_id="individual_id", ) assert_matches_type(IndividualUpdateResponse, individual, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Finch) -> None: individual = client.sandbox.individual.update( - "string", + individual_id="individual_id", dob="12/20/1989", emails=[ { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, ], - encrypted_ssn="string", + encrypted_ssn="encrypted_ssn", ethnicity="asian", - first_name="string", + first_name="first_name", gender="female", - last_name="string", - middle_name="string", + last_name="last_name", + middle_name="middle_name", phone_numbers=[ { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, ], - preferred_name="string", + preferred_name="preferred_name", residence={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, - ssn="string", + ssn="ssn", ) assert_matches_type(IndividualUpdateResponse, individual, path=["response"]) @parametrize def test_raw_response_update(self, client: Finch) -> None: response = client.sandbox.individual.with_raw_response.update( - "string", + individual_id="individual_id", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_update(self, client: Finch) -> None: @parametrize def test_streaming_response_update(self, client: Finch) -> None: with client.sandbox.individual.with_streaming_response.update( - "string", + individual_id="individual_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,7 +106,7 @@ def test_streaming_response_update(self, client: Finch) -> None: def test_path_params_update(self, client: Finch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `individual_id` but received ''"): client.sandbox.individual.with_raw_response.update( - "", + individual_id="", ) @@ -116,68 +116,68 @@ class TestAsyncIndividual: @parametrize async def test_method_update(self, async_client: AsyncFinch) -> None: individual = await async_client.sandbox.individual.update( - "string", + individual_id="individual_id", ) assert_matches_type(IndividualUpdateResponse, individual, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> None: individual = await async_client.sandbox.individual.update( - "string", + individual_id="individual_id", dob="12/20/1989", emails=[ { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, ], - encrypted_ssn="string", + encrypted_ssn="encrypted_ssn", ethnicity="asian", - first_name="string", + first_name="first_name", gender="female", - last_name="string", - middle_name="string", + last_name="last_name", + middle_name="middle_name", phone_numbers=[ { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, { - "data": "string", + "data": "data", "type": "work", }, ], - preferred_name="string", + preferred_name="preferred_name", residence={ - "line1": "string", - "line2": "string", - "city": "string", - "state": "string", - "postal_code": "string", - "country": "string", - "name": "string", - "source_id": "string", + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "postal_code": "postal_code", + "country": "country", + "name": "name", + "source_id": "source_id", }, - ssn="string", + ssn="ssn", ) assert_matches_type(IndividualUpdateResponse, individual, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncFinch) -> None: response = await async_client.sandbox.individual.with_raw_response.update( - "string", + individual_id="individual_id", ) assert response.is_closed is True @@ -188,7 +188,7 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncFinch) -> None: async with async_client.sandbox.individual.with_streaming_response.update( - "string", + individual_id="individual_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -202,5 +202,5 @@ async def test_streaming_response_update(self, async_client: AsyncFinch) -> None async def test_path_params_update(self, async_client: AsyncFinch) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `individual_id` but received ''"): await async_client.sandbox.individual.with_raw_response.update( - "", + individual_id="", ) diff --git a/tests/api_resources/sandbox/test_payment.py b/tests/api_resources/sandbox/test_payment.py index 9b0c803a..5f1c5356 100644 --- a/tests/api_resources/sandbox/test_payment.py +++ b/tests/api_resources/sandbox/test_payment.py @@ -25,7 +25,7 @@ def test_method_create(self, client: Finch) -> None: @parametrize def test_method_create_with_all_params(self, client: Finch) -> None: payment = client.sandbox.payment.create( - end_date="string", + end_date="end_date", pay_statements=[ { "individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a", @@ -34,56 +34,56 @@ def test_method_create_with_all_params(self, client: Finch) -> None: "total_hours": 0, "gross_pay": { "amount": 0, - "currency": "string", + "currency": "currency", }, "net_pay": { "amount": 0, - "currency": "string", + "currency": "currency", }, "earnings": [ { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, ], "taxes": [ { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, ], "employee_deductions": [ @@ -97,27 +97,27 @@ def test_method_create_with_all_params(self, client: Finch) -> None: ], "employer_contributions": [ { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, ], } ], - start_date="string", + start_date="start_date", ) assert_matches_type(PaymentCreateResponse, payment, path=["response"]) @@ -153,7 +153,7 @@ async def test_method_create(self, async_client: AsyncFinch) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None: payment = await async_client.sandbox.payment.create( - end_date="string", + end_date="end_date", pay_statements=[ { "individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a", @@ -162,56 +162,56 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> "total_hours": 0, "gross_pay": { "amount": 0, - "currency": "string", + "currency": "currency", }, "net_pay": { "amount": 0, - "currency": "string", + "currency": "currency", }, "earnings": [ { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, { "type": "salary", - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "hours": 0, }, ], "taxes": [ { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, { "type": "state", - "name": "string", + "name": "name", "employer": True, "amount": 0, - "currency": "string", + "currency": "currency", }, ], "employee_deductions": [ @@ -225,27 +225,27 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> ], "employer_contributions": [ { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, { - "name": "string", + "name": "name", "amount": 0, - "currency": "string", + "currency": "currency", "type": "401k", }, ], } ], - start_date="string", + start_date="start_date", ) assert_matches_type(PaymentCreateResponse, payment, path=["response"])