diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ccfe12c..bc845f32 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.15.0" + ".": "1.16.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d401388d..06d70961 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 41 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-57fcc886b05984f78d7e68e9b2494af925f1b104e3475ed5281fde6c728a8518.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-7a816d4a5f0039230590a6662f3513d5756344ca662761ecbc49016593f65836.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc7115a..1fc40806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.16.0 (2025-02-27) + +Full Changelog: [v1.15.0...v1.16.0](https://github.com/Finch-API/finch-api-python/compare/v1.15.0...v1.16.0) + +### Features + +* **api:** api update ([#605](https://github.com/Finch-API/finch-api-python/issues/605)) ([3967436](https://github.com/Finch-API/finch-api-python/commit/3967436c42269da3e164c1351297e64b841fdf04)) + ## 1.15.0 (2025-02-26) Full Changelog: [v1.14.2...v1.15.0](https://github.com/Finch-API/finch-api-python/compare/v1.14.2...v1.15.0) diff --git a/pyproject.toml b/pyproject.toml index 12abc6e1..897b2659 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "finch-api" -version = "1.15.0" +version = "1.16.0" description = "The official Python library for the Finch API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/finch/_version.py b/src/finch/_version.py index 6f0b3869..49d3934d 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__ = "1.15.0" # x-release-please-version +__version__ = "1.16.0" # x-release-please-version diff --git a/src/finch/types/hris/pay_statement.py b/src/finch/types/hris/pay_statement.py index 8921c03b..b96210e5 100644 --- a/src/finch/types/hris/pay_statement.py +++ b/src/finch/types/hris/pay_statement.py @@ -11,16 +11,20 @@ "PayStatement", "Earning", "EarningAttributes", + "EarningAttributesMetadata", "EmployeeDeduction", "EmployeeDeductionAttributes", + "EmployeeDeductionAttributesMetadata", "EmployerContribution", "EmployerContributionAttributes", + "EmployerContributionAttributesMetadata", "Tax", "TaxAttributes", + "TaxAttributesMetadata", ] -class EarningAttributes(BaseModel): +class EarningAttributesMetadata(BaseModel): metadata: Optional[Dict[str, object]] = None """The metadata to be attached to the entity by existing rules. @@ -29,6 +33,10 @@ class EarningAttributes(BaseModel): """ +class EarningAttributes(BaseModel): + metadata: Optional[EarningAttributesMetadata] = None + + class Earning(BaseModel): amount: Optional[int] = None """The earnings amount in cents.""" @@ -68,7 +76,7 @@ class Earning(BaseModel): """The type of earning.""" -class EmployeeDeductionAttributes(BaseModel): +class EmployeeDeductionAttributesMetadata(BaseModel): metadata: Optional[Dict[str, object]] = None """The metadata to be attached to the entity by existing rules. @@ -77,6 +85,10 @@ class EmployeeDeductionAttributes(BaseModel): """ +class EmployeeDeductionAttributes(BaseModel): + metadata: Optional[EmployeeDeductionAttributesMetadata] = None + + class EmployeeDeduction(BaseModel): amount: Optional[int] = None """The deduction amount in cents.""" @@ -96,7 +108,7 @@ class EmployeeDeduction(BaseModel): """Type of benefit.""" -class EmployerContributionAttributes(BaseModel): +class EmployerContributionAttributesMetadata(BaseModel): metadata: Optional[Dict[str, object]] = None """The metadata to be attached to the entity by existing rules. @@ -105,6 +117,10 @@ class EmployerContributionAttributes(BaseModel): """ +class EmployerContributionAttributes(BaseModel): + metadata: Optional[EmployerContributionAttributesMetadata] = None + + class EmployerContribution(BaseModel): amount: Optional[int] = None """The contribution amount in cents.""" @@ -121,7 +137,7 @@ class EmployerContribution(BaseModel): """Type of benefit.""" -class TaxAttributes(BaseModel): +class TaxAttributesMetadata(BaseModel): metadata: Optional[Dict[str, object]] = None """The metadata to be attached to the entity by existing rules. @@ -130,6 +146,10 @@ class TaxAttributes(BaseModel): """ +class TaxAttributes(BaseModel): + metadata: Optional[TaxAttributesMetadata] = None + + class Tax(BaseModel): amount: Optional[int] = None """The tax amount in cents.""" diff --git a/src/finch/types/sandbox/payment_create_params.py b/src/finch/types/sandbox/payment_create_params.py index d1691443..9c606070 100644 --- a/src/finch/types/sandbox/payment_create_params.py +++ b/src/finch/types/sandbox/payment_create_params.py @@ -13,12 +13,16 @@ "PayStatement", "PayStatementEarning", "PayStatementEarningAttributes", + "PayStatementEarningAttributesMetadata", "PayStatementEmployeeDeduction", "PayStatementEmployeeDeductionAttributes", + "PayStatementEmployeeDeductionAttributesMetadata", "PayStatementEmployerContribution", "PayStatementEmployerContributionAttributes", + "PayStatementEmployerContributionAttributesMetadata", "PayStatementTax", "PayStatementTaxAttributes", + "PayStatementTaxAttributesMetadata", ] @@ -30,7 +34,7 @@ class PaymentCreateParams(TypedDict, total=False): start_date: str -class PayStatementEarningAttributes(TypedDict, total=False): +class PayStatementEarningAttributesMetadata(TypedDict, total=False): metadata: Dict[str, object] """The metadata to be attached to the entity by existing rules. @@ -39,6 +43,10 @@ class PayStatementEarningAttributes(TypedDict, total=False): """ +class PayStatementEarningAttributes(TypedDict, total=False): + metadata: PayStatementEarningAttributesMetadata + + class PayStatementEarning(TypedDict, total=False): amount: Optional[int] """The earnings amount in cents.""" @@ -78,7 +86,7 @@ class PayStatementEarning(TypedDict, total=False): """The type of earning.""" -class PayStatementEmployeeDeductionAttributes(TypedDict, total=False): +class PayStatementEmployeeDeductionAttributesMetadata(TypedDict, total=False): metadata: Dict[str, object] """The metadata to be attached to the entity by existing rules. @@ -87,6 +95,10 @@ class PayStatementEmployeeDeductionAttributes(TypedDict, total=False): """ +class PayStatementEmployeeDeductionAttributes(TypedDict, total=False): + metadata: PayStatementEmployeeDeductionAttributesMetadata + + class PayStatementEmployeeDeduction(TypedDict, total=False): amount: Optional[int] """The deduction amount in cents.""" @@ -106,7 +118,7 @@ class PayStatementEmployeeDeduction(TypedDict, total=False): """Type of benefit.""" -class PayStatementEmployerContributionAttributes(TypedDict, total=False): +class PayStatementEmployerContributionAttributesMetadata(TypedDict, total=False): metadata: Dict[str, object] """The metadata to be attached to the entity by existing rules. @@ -115,6 +127,10 @@ class PayStatementEmployerContributionAttributes(TypedDict, total=False): """ +class PayStatementEmployerContributionAttributes(TypedDict, total=False): + metadata: PayStatementEmployerContributionAttributesMetadata + + class PayStatementEmployerContribution(TypedDict, total=False): amount: Optional[int] """The contribution amount in cents.""" @@ -131,7 +147,7 @@ class PayStatementEmployerContribution(TypedDict, total=False): """Type of benefit.""" -class PayStatementTaxAttributes(TypedDict, total=False): +class PayStatementTaxAttributesMetadata(TypedDict, total=False): metadata: Dict[str, object] """The metadata to be attached to the entity by existing rules. @@ -140,6 +156,10 @@ class PayStatementTaxAttributes(TypedDict, total=False): """ +class PayStatementTaxAttributes(TypedDict, total=False): + metadata: PayStatementTaxAttributesMetadata + + class PayStatementTax(TypedDict, total=False): amount: Optional[int] """The tax amount in cents.""" diff --git a/tests/api_resources/sandbox/test_payment.py b/tests/api_resources/sandbox/test_payment.py index 0330db40..3b845874 100644 --- a/tests/api_resources/sandbox/test_payment.py +++ b/tests/api_resources/sandbox/test_payment.py @@ -31,7 +31,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: "earnings": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "hours": 0, "name": "name", @@ -40,10 +40,10 @@ def test_method_create_with_all_params(self, client: Finch) -> None: ], "employee_deductions": [ { - "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, - "currency": "currency", - "name": "name", + "amount": 2000, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, + "currency": "usd", + "name": "401k test", "pre_tax": True, "type": "401k", } @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: "employer_contributions": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "name": "name", "type": "401k", @@ -61,7 +61,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: "amount": 0, "currency": "currency", }, - "individual_id": "individual_id", + "individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a", "net_pay": { "amount": 0, "currency": "currency", @@ -70,7 +70,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None: "taxes": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "employer": True, "name": "name", @@ -123,7 +123,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> "earnings": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "hours": 0, "name": "name", @@ -132,10 +132,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> ], "employee_deductions": [ { - "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, - "currency": "currency", - "name": "name", + "amount": 2000, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, + "currency": "usd", + "name": "401k test", "pre_tax": True, "type": "401k", } @@ -143,7 +143,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> "employer_contributions": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "name": "name", "type": "401k", @@ -153,7 +153,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> "amount": 0, "currency": "currency", }, - "individual_id": "individual_id", + "individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a", "net_pay": { "amount": 0, "currency": "currency", @@ -162,7 +162,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> "taxes": [ { "amount": 0, - "attributes": {"metadata": {"foo": "bar"}}, + "attributes": {"metadata": {"metadata": {"foo": "bar"}}}, "currency": "currency", "employer": True, "name": "name",