Skip to content

Commit f7ec780

Browse files
feat(api): add new endpoints for pay statement items (#638)
1 parent 0334e6e commit f7ec780

24 files changed

+1670
-21
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 41
1+
configured_endpoints: 46
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-972e563922dedeeb94dca9a3ca8bac536488fcee56b55fcf09e6af044d3740e3.yml
33
openapi_spec_hash: 08b86ecbec3323717d48e4aaee48ed54
4-
config_hash: 8303e755d3e16cf28542d5f0aec83851
4+
config_hash: b839955f81dcf0a060366274f202b185

api.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,39 @@ from finch.types.hris import Company
4141

4242
Methods:
4343

44-
- <code title="get /employer/company">client.hris.company.<a href="./src/finch/resources/hris/company.py">retrieve</a>() -> <a href="./src/finch/types/hris/company.py">Company</a></code>
44+
- <code title="get /employer/company">client.hris.company.<a href="./src/finch/resources/hris/company/company.py">retrieve</a>() -> <a href="./src/finch/types/hris/company/company.py">Company</a></code>
45+
46+
### PayStatementItem
47+
48+
Types:
49+
50+
```python
51+
from finch.types.hris.company import PayStatementItemListResponse
52+
```
53+
54+
Methods:
55+
56+
- <code title="get /employer/pay-statement-item">client.hris.company.pay_statement_item.<a href="./src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py">list</a>(\*\*<a href="src/finch/types/hris/company/pay_statement_item_list_params.py">params</a>) -> <a href="./src/finch/types/hris/company/pay_statement_item_list_response.py">SyncResponsesPage[PayStatementItemListResponse]</a></code>
57+
58+
#### Rules
59+
60+
Types:
61+
62+
```python
63+
from finch.types.hris.company.pay_statement_item import (
64+
RuleCreateResponse,
65+
RuleUpdateResponse,
66+
RuleListResponse,
67+
RuleDeleteResponse,
68+
)
69+
```
70+
71+
Methods:
72+
73+
- <code title="post /employer/pay-statement-item/rule">client.hris.company.pay_statement_item.rules.<a href="./src/finch/resources/hris/company/pay_statement_item/rules.py">create</a>(\*\*<a href="src/finch/types/hris/company/pay_statement_item/rule_create_params.py">params</a>) -> <a href="./src/finch/types/hris/company/pay_statement_item/rule_create_response.py">RuleCreateResponse</a></code>
74+
- <code title="put /employer/pay-statement-item/rule/{rule_id}">client.hris.company.pay_statement_item.rules.<a href="./src/finch/resources/hris/company/pay_statement_item/rules.py">update</a>(rule_id, \*\*<a href="src/finch/types/hris/company/pay_statement_item/rule_update_params.py">params</a>) -> <a href="./src/finch/types/hris/company/pay_statement_item/rule_update_response.py">RuleUpdateResponse</a></code>
75+
- <code title="get /employer/pay-statement-item/rule">client.hris.company.pay_statement_item.rules.<a href="./src/finch/resources/hris/company/pay_statement_item/rules.py">list</a>() -> <a href="./src/finch/types/hris/company/pay_statement_item/rule_list_response.py">SyncResponsesPage[RuleListResponse]</a></code>
76+
- <code title="delete /employer/pay-statement-item/rule/{rule_id}">client.hris.company.pay_statement_item.rules.<a href="./src/finch/resources/hris/company/pay_statement_item/rules.py">delete</a>(rule_id) -> <a href="./src/finch/types/hris/company/pay_statement_item/rule_delete_response.py">RuleDeleteResponse</a></code>
4577

4678
## Directory
4779

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .company import (
4+
CompanyResource,
5+
AsyncCompanyResource,
6+
CompanyResourceWithRawResponse,
7+
AsyncCompanyResourceWithRawResponse,
8+
CompanyResourceWithStreamingResponse,
9+
AsyncCompanyResourceWithStreamingResponse,
10+
)
11+
from .pay_statement_item import (
12+
PayStatementItem,
13+
AsyncPayStatementItem,
14+
PayStatementItemWithRawResponse,
15+
AsyncPayStatementItemWithRawResponse,
16+
PayStatementItemWithStreamingResponse,
17+
AsyncPayStatementItemWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"PayStatementItem",
22+
"AsyncPayStatementItem",
23+
"PayStatementItemWithRawResponse",
24+
"AsyncPayStatementItemWithRawResponse",
25+
"PayStatementItemWithStreamingResponse",
26+
"AsyncPayStatementItemWithStreamingResponse",
27+
"CompanyResource",
28+
"AsyncCompanyResource",
29+
"CompanyResourceWithRawResponse",
30+
"AsyncCompanyResourceWithRawResponse",
31+
"CompanyResourceWithStreamingResponse",
32+
"AsyncCompanyResourceWithStreamingResponse",
33+
]

src/finch/resources/hris/company.py renamed to src/finch/resources/hris/company/company.py

+39-7
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,30 @@
44

55
import httpx
66

7-
from ... import _legacy_response
8-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
9-
from ..._compat import cached_property
10-
from ..._resource import SyncAPIResource, AsyncAPIResource
11-
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
12-
from ..._base_client import make_request_options
13-
from ...types.hris.company import Company
7+
from .... import _legacy_response
8+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
9+
from ...._compat import cached_property
10+
from ...._resource import SyncAPIResource, AsyncAPIResource
11+
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
12+
from ...._base_client import make_request_options
13+
from ....types.hris.company.company import Company
14+
from .pay_statement_item.pay_statement_item import (
15+
PayStatementItem,
16+
AsyncPayStatementItem,
17+
PayStatementItemWithRawResponse,
18+
AsyncPayStatementItemWithRawResponse,
19+
PayStatementItemWithStreamingResponse,
20+
AsyncPayStatementItemWithStreamingResponse,
21+
)
1422

1523
__all__ = ["CompanyResource", "AsyncCompanyResource"]
1624

1725

1826
class CompanyResource(SyncAPIResource):
27+
@cached_property
28+
def pay_statement_item(self) -> PayStatementItem:
29+
return PayStatementItem(self._client)
30+
1931
@cached_property
2032
def with_raw_response(self) -> CompanyResourceWithRawResponse:
2133
"""
@@ -56,6 +68,10 @@ def retrieve(
5668

5769

5870
class AsyncCompanyResource(AsyncAPIResource):
71+
@cached_property
72+
def pay_statement_item(self) -> AsyncPayStatementItem:
73+
return AsyncPayStatementItem(self._client)
74+
5975
@cached_property
6076
def with_raw_response(self) -> AsyncCompanyResourceWithRawResponse:
6177
"""
@@ -103,6 +119,10 @@ def __init__(self, company: CompanyResource) -> None:
103119
company.retrieve,
104120
)
105121

122+
@cached_property
123+
def pay_statement_item(self) -> PayStatementItemWithRawResponse:
124+
return PayStatementItemWithRawResponse(self._company.pay_statement_item)
125+
106126

107127
class AsyncCompanyResourceWithRawResponse:
108128
def __init__(self, company: AsyncCompanyResource) -> None:
@@ -112,6 +132,10 @@ def __init__(self, company: AsyncCompanyResource) -> None:
112132
company.retrieve,
113133
)
114134

135+
@cached_property
136+
def pay_statement_item(self) -> AsyncPayStatementItemWithRawResponse:
137+
return AsyncPayStatementItemWithRawResponse(self._company.pay_statement_item)
138+
115139

116140
class CompanyResourceWithStreamingResponse:
117141
def __init__(self, company: CompanyResource) -> None:
@@ -121,6 +145,10 @@ def __init__(self, company: CompanyResource) -> None:
121145
company.retrieve,
122146
)
123147

148+
@cached_property
149+
def pay_statement_item(self) -> PayStatementItemWithStreamingResponse:
150+
return PayStatementItemWithStreamingResponse(self._company.pay_statement_item)
151+
124152

125153
class AsyncCompanyResourceWithStreamingResponse:
126154
def __init__(self, company: AsyncCompanyResource) -> None:
@@ -129,3 +157,7 @@ def __init__(self, company: AsyncCompanyResource) -> None:
129157
self.retrieve = async_to_streamed_response_wrapper(
130158
company.retrieve,
131159
)
160+
161+
@cached_property
162+
def pay_statement_item(self) -> AsyncPayStatementItemWithStreamingResponse:
163+
return AsyncPayStatementItemWithStreamingResponse(self._company.pay_statement_item)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .rules import (
4+
Rules,
5+
AsyncRules,
6+
RulesWithRawResponse,
7+
AsyncRulesWithRawResponse,
8+
RulesWithStreamingResponse,
9+
AsyncRulesWithStreamingResponse,
10+
)
11+
from .pay_statement_item import (
12+
PayStatementItem,
13+
AsyncPayStatementItem,
14+
PayStatementItemWithRawResponse,
15+
AsyncPayStatementItemWithRawResponse,
16+
PayStatementItemWithStreamingResponse,
17+
AsyncPayStatementItemWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"Rules",
22+
"AsyncRules",
23+
"RulesWithRawResponse",
24+
"AsyncRulesWithRawResponse",
25+
"RulesWithStreamingResponse",
26+
"AsyncRulesWithStreamingResponse",
27+
"PayStatementItem",
28+
"AsyncPayStatementItem",
29+
"PayStatementItemWithRawResponse",
30+
"AsyncPayStatementItemWithRawResponse",
31+
"PayStatementItemWithStreamingResponse",
32+
"AsyncPayStatementItemWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)