Skip to content

Commit 3fc385f

Browse files
feat(api): api update (#546)
1 parent 838c2e1 commit 3fc385f

File tree

6 files changed

+39
-13
lines changed

6 files changed

+39
-13
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 39
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-86c1f66eea438d53292663f221e778d0864d63a7e635e8714b2b31800a7344ac.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-8782658ecd57622a964238df7b5dd997ac63789f8220852660ecf32fa115296b.yml

src/finch/types/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
)
1313
from .location import Location as Location
1414
from .provider import Provider as Provider
15+
from .money_param import MoneyParam as MoneyParam
1516
from .income_param import IncomeParam as IncomeParam
1617
from .company_event import CompanyEvent as CompanyEvent
1718
from .introspection import Introspection as Introspection

src/finch/types/hris/pay_statement.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import List, Optional
44
from typing_extensions import Literal
55

6+
from ..money import Money
67
from ..._models import BaseModel
78
from .benefit_type import BenefitType
89

@@ -103,14 +104,12 @@ class PayStatement(BaseModel):
103104

104105
employer_contributions: Optional[List[Optional[EmployerContribution]]] = None
105106

106-
gross_pay: Optional[float] = None
107-
"""The gross pay for the pay period"""
107+
gross_pay: Optional[Money] = None
108108

109109
individual_id: Optional[str] = None
110110
"""A stable Finch `id` (UUID v4) for an individual in the company"""
111111

112-
net_pay: Optional[float] = None
113-
"""The net pay for the pay period"""
112+
net_pay: Optional[Money] = None
114113

115114
payment_method: Optional[Literal["check", "direct_deposit"]] = None
116115
"""The payment method."""

src/finch/types/money_param.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Optional
6+
from typing_extensions import TypedDict
7+
8+
__all__ = ["MoneyParam"]
9+
10+
11+
class MoneyParam(TypedDict, total=False):
12+
amount: Optional[int]
13+
"""Amount for money object (in cents)"""
14+
15+
currency: str

src/finch/types/sandbox/payment_create_params.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Iterable, Optional
66
from typing_extensions import Literal, TypedDict
77

8+
from ..money_param import MoneyParam
89
from ..hris.benefit_type import BenefitType
910

1011
__all__ = [
@@ -119,14 +120,12 @@ class PayStatement(TypedDict, total=False):
119120

120121
employer_contributions: Optional[Iterable[Optional[PayStatementEmployerContribution]]]
121122

122-
gross_pay: Optional[float]
123-
"""The gross pay for the pay period"""
123+
gross_pay: Optional[MoneyParam]
124124

125125
individual_id: str
126126
"""A stable Finch `id` (UUID v4) for an individual in the company"""
127127

128-
net_pay: Optional[float]
129-
"""The net pay for the pay period"""
128+
net_pay: Optional[MoneyParam]
130129

131130
payment_method: Optional[Literal["check", "direct_deposit"]]
132131
"""The payment method."""

tests/api_resources/sandbox/test_payment.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
5454
"type": "401k",
5555
}
5656
],
57-
"gross_pay": 0,
57+
"gross_pay": {
58+
"amount": 0,
59+
"currency": "currency",
60+
},
5861
"individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a",
59-
"net_pay": 0,
62+
"net_pay": {
63+
"amount": 0,
64+
"currency": "currency",
65+
},
6066
"payment_method": "check",
6167
"taxes": [
6268
{
@@ -136,9 +142,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
136142
"type": "401k",
137143
}
138144
],
139-
"gross_pay": 0,
145+
"gross_pay": {
146+
"amount": 0,
147+
"currency": "currency",
148+
},
140149
"individual_id": "b2338cfb-472f-4f72-9faa-e028c083144a",
141-
"net_pay": 0,
150+
"net_pay": {
151+
"amount": 0,
152+
"currency": "currency",
153+
},
142154
"payment_method": "check",
143155
"taxes": [
144156
{

0 commit comments

Comments
 (0)