Skip to content

feat(api): add new endpoints for pay statement items #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 41
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-972e563922dedeeb94dca9a3ca8bac536488fcee56b55fcf09e6af044d3740e3.yml
openapi_spec_hash: 08b86ecbec3323717d48e4aaee48ed54
config_hash: 8303e755d3e16cf28542d5f0aec83851
config_hash: b839955f81dcf0a060366274f202b185
34 changes: 33 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,39 @@ from finch.types.hris import Company

Methods:

- <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>
- <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>

### PayStatementItem

Types:

```python
from finch.types.hris.company import PayStatementItemListResponse
```

Methods:

- <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>

#### Rules

Types:

```python
from finch.types.hris.company.pay_statement_item import (
RuleCreateResponse,
RuleUpdateResponse,
RuleListResponse,
RuleDeleteResponse,
)
```

Methods:

- <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>
- <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>
- <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>
- <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>

## Directory

Expand Down
33 changes: 33 additions & 0 deletions src/finch/resources/hris/company/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .company import (
CompanyResource,
AsyncCompanyResource,
CompanyResourceWithRawResponse,
AsyncCompanyResourceWithRawResponse,
CompanyResourceWithStreamingResponse,
AsyncCompanyResourceWithStreamingResponse,
)
from .pay_statement_item import (
PayStatementItem,
AsyncPayStatementItem,
PayStatementItemWithRawResponse,
AsyncPayStatementItemWithRawResponse,
PayStatementItemWithStreamingResponse,
AsyncPayStatementItemWithStreamingResponse,
)

__all__ = [
"PayStatementItem",
"AsyncPayStatementItem",
"PayStatementItemWithRawResponse",
"AsyncPayStatementItemWithRawResponse",
"PayStatementItemWithStreamingResponse",
"AsyncPayStatementItemWithStreamingResponse",
"CompanyResource",
"AsyncCompanyResource",
"CompanyResourceWithRawResponse",
"AsyncCompanyResourceWithRawResponse",
"CompanyResourceWithStreamingResponse",
"AsyncCompanyResourceWithStreamingResponse",
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,30 @@

import httpx

from ... import _legacy_response
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
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 ...types.hris.company import Company
from .... import _legacy_response
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
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 ....types.hris.company.company import Company
from .pay_statement_item.pay_statement_item import (
PayStatementItem,
AsyncPayStatementItem,
PayStatementItemWithRawResponse,
AsyncPayStatementItemWithRawResponse,
PayStatementItemWithStreamingResponse,
AsyncPayStatementItemWithStreamingResponse,
)

__all__ = ["CompanyResource", "AsyncCompanyResource"]


class CompanyResource(SyncAPIResource):
@cached_property
def pay_statement_item(self) -> PayStatementItem:
return PayStatementItem(self._client)

@cached_property
def with_raw_response(self) -> CompanyResourceWithRawResponse:
"""
Expand Down Expand Up @@ -56,6 +68,10 @@ def retrieve(


class AsyncCompanyResource(AsyncAPIResource):
@cached_property
def pay_statement_item(self) -> AsyncPayStatementItem:
return AsyncPayStatementItem(self._client)

@cached_property
def with_raw_response(self) -> AsyncCompanyResourceWithRawResponse:
"""
Expand Down Expand Up @@ -103,6 +119,10 @@ def __init__(self, company: CompanyResource) -> None:
company.retrieve,
)

@cached_property
def pay_statement_item(self) -> PayStatementItemWithRawResponse:
return PayStatementItemWithRawResponse(self._company.pay_statement_item)


class AsyncCompanyResourceWithRawResponse:
def __init__(self, company: AsyncCompanyResource) -> None:
Expand All @@ -112,6 +132,10 @@ def __init__(self, company: AsyncCompanyResource) -> None:
company.retrieve,
)

@cached_property
def pay_statement_item(self) -> AsyncPayStatementItemWithRawResponse:
return AsyncPayStatementItemWithRawResponse(self._company.pay_statement_item)


class CompanyResourceWithStreamingResponse:
def __init__(self, company: CompanyResource) -> None:
Expand All @@ -121,6 +145,10 @@ def __init__(self, company: CompanyResource) -> None:
company.retrieve,
)

@cached_property
def pay_statement_item(self) -> PayStatementItemWithStreamingResponse:
return PayStatementItemWithStreamingResponse(self._company.pay_statement_item)


class AsyncCompanyResourceWithStreamingResponse:
def __init__(self, company: AsyncCompanyResource) -> None:
Expand All @@ -129,3 +157,7 @@ def __init__(self, company: AsyncCompanyResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
company.retrieve,
)

@cached_property
def pay_statement_item(self) -> AsyncPayStatementItemWithStreamingResponse:
return AsyncPayStatementItemWithStreamingResponse(self._company.pay_statement_item)
33 changes: 33 additions & 0 deletions src/finch/resources/hris/company/pay_statement_item/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .rules import (
Rules,
AsyncRules,
RulesWithRawResponse,
AsyncRulesWithRawResponse,
RulesWithStreamingResponse,
AsyncRulesWithStreamingResponse,
)
from .pay_statement_item import (
PayStatementItem,
AsyncPayStatementItem,
PayStatementItemWithRawResponse,
AsyncPayStatementItemWithRawResponse,
PayStatementItemWithStreamingResponse,
AsyncPayStatementItemWithStreamingResponse,
)

__all__ = [
"Rules",
"AsyncRules",
"RulesWithRawResponse",
"AsyncRulesWithRawResponse",
"RulesWithStreamingResponse",
"AsyncRulesWithStreamingResponse",
"PayStatementItem",
"AsyncPayStatementItem",
"PayStatementItemWithRawResponse",
"AsyncPayStatementItemWithRawResponse",
"PayStatementItemWithStreamingResponse",
"AsyncPayStatementItemWithStreamingResponse",
]
Loading