|
9 | 9 |
|
10 | 10 | import httpx
|
11 | 11 |
|
12 |
| -from . import resources, _exceptions |
| 12 | +from . import _exceptions |
13 | 13 | from ._qs import Querystring
|
14 | 14 | from ._types import (
|
15 | 15 | NOT_GIVEN,
|
|
27 | 27 | get_async_library,
|
28 | 28 | )
|
29 | 29 | from ._version import __version__
|
| 30 | +from .resources import account, webhooks, providers, access_tokens, request_forwarding |
30 | 31 | from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
31 | 32 | from ._exceptions import APIStatusError
|
32 | 33 | from ._base_client import (
|
|
37 | 38 | SyncHttpxClientWrapper,
|
38 | 39 | AsyncHttpxClientWrapper,
|
39 | 40 | )
|
| 41 | +from .resources.hris import hris |
| 42 | +from .resources.jobs import jobs |
| 43 | +from .resources.connect import connect |
| 44 | +from .resources.payroll import payroll |
| 45 | +from .resources.sandbox import sandbox |
40 | 46 |
|
41 |
| -__all__ = [ |
42 |
| - "Timeout", |
43 |
| - "Transport", |
44 |
| - "ProxiesTypes", |
45 |
| - "RequestOptions", |
46 |
| - "resources", |
47 |
| - "Finch", |
48 |
| - "AsyncFinch", |
49 |
| - "Client", |
50 |
| - "AsyncClient", |
51 |
| -] |
| 47 | +__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Finch", "AsyncFinch", "Client", "AsyncClient"] |
52 | 48 |
|
53 | 49 |
|
54 | 50 | class Finch(SyncAPIClient):
|
55 |
| - access_tokens: resources.AccessTokens |
56 |
| - hris: resources.HRIS |
57 |
| - providers: resources.Providers |
58 |
| - account: resources.Account |
59 |
| - webhooks: resources.Webhooks |
60 |
| - request_forwarding: resources.RequestForwarding |
61 |
| - jobs: resources.Jobs |
62 |
| - sandbox: resources.Sandbox |
63 |
| - payroll: resources.Payroll |
64 |
| - connect: resources.Connect |
| 51 | + access_tokens: access_tokens.AccessTokens |
| 52 | + hris: hris.HRIS |
| 53 | + providers: providers.Providers |
| 54 | + account: account.Account |
| 55 | + webhooks: webhooks.Webhooks |
| 56 | + request_forwarding: request_forwarding.RequestForwarding |
| 57 | + jobs: jobs.Jobs |
| 58 | + sandbox: sandbox.Sandbox |
| 59 | + payroll: payroll.Payroll |
| 60 | + connect: connect.Connect |
65 | 61 | with_raw_response: FinchWithRawResponse
|
66 | 62 | with_streaming_response: FinchWithStreamedResponse
|
67 | 63 |
|
@@ -143,16 +139,16 @@ def __init__(
|
143 | 139 | _strict_response_validation=_strict_response_validation,
|
144 | 140 | )
|
145 | 141 |
|
146 |
| - self.access_tokens = resources.AccessTokens(self) |
147 |
| - self.hris = resources.HRIS(self) |
148 |
| - self.providers = resources.Providers(self) |
149 |
| - self.account = resources.Account(self) |
150 |
| - self.webhooks = resources.Webhooks(self) |
151 |
| - self.request_forwarding = resources.RequestForwarding(self) |
152 |
| - self.jobs = resources.Jobs(self) |
153 |
| - self.sandbox = resources.Sandbox(self) |
154 |
| - self.payroll = resources.Payroll(self) |
155 |
| - self.connect = resources.Connect(self) |
| 142 | + self.access_tokens = access_tokens.AccessTokens(self) |
| 143 | + self.hris = hris.HRIS(self) |
| 144 | + self.providers = providers.Providers(self) |
| 145 | + self.account = account.Account(self) |
| 146 | + self.webhooks = webhooks.Webhooks(self) |
| 147 | + self.request_forwarding = request_forwarding.RequestForwarding(self) |
| 148 | + self.jobs = jobs.Jobs(self) |
| 149 | + self.sandbox = sandbox.Sandbox(self) |
| 150 | + self.payroll = payroll.Payroll(self) |
| 151 | + self.connect = connect.Connect(self) |
156 | 152 | self.with_raw_response = FinchWithRawResponse(self)
|
157 | 153 | self.with_streaming_response = FinchWithStreamedResponse(self)
|
158 | 154 |
|
@@ -388,16 +384,16 @@ def _make_status_error(
|
388 | 384 |
|
389 | 385 |
|
390 | 386 | class AsyncFinch(AsyncAPIClient):
|
391 |
| - access_tokens: resources.AsyncAccessTokens |
392 |
| - hris: resources.AsyncHRIS |
393 |
| - providers: resources.AsyncProviders |
394 |
| - account: resources.AsyncAccount |
395 |
| - webhooks: resources.AsyncWebhooks |
396 |
| - request_forwarding: resources.AsyncRequestForwarding |
397 |
| - jobs: resources.AsyncJobs |
398 |
| - sandbox: resources.AsyncSandbox |
399 |
| - payroll: resources.AsyncPayroll |
400 |
| - connect: resources.AsyncConnect |
| 387 | + access_tokens: access_tokens.AsyncAccessTokens |
| 388 | + hris: hris.AsyncHRIS |
| 389 | + providers: providers.AsyncProviders |
| 390 | + account: account.AsyncAccount |
| 391 | + webhooks: webhooks.AsyncWebhooks |
| 392 | + request_forwarding: request_forwarding.AsyncRequestForwarding |
| 393 | + jobs: jobs.AsyncJobs |
| 394 | + sandbox: sandbox.AsyncSandbox |
| 395 | + payroll: payroll.AsyncPayroll |
| 396 | + connect: connect.AsyncConnect |
401 | 397 | with_raw_response: AsyncFinchWithRawResponse
|
402 | 398 | with_streaming_response: AsyncFinchWithStreamedResponse
|
403 | 399 |
|
@@ -479,16 +475,16 @@ def __init__(
|
479 | 475 | _strict_response_validation=_strict_response_validation,
|
480 | 476 | )
|
481 | 477 |
|
482 |
| - self.access_tokens = resources.AsyncAccessTokens(self) |
483 |
| - self.hris = resources.AsyncHRIS(self) |
484 |
| - self.providers = resources.AsyncProviders(self) |
485 |
| - self.account = resources.AsyncAccount(self) |
486 |
| - self.webhooks = resources.AsyncWebhooks(self) |
487 |
| - self.request_forwarding = resources.AsyncRequestForwarding(self) |
488 |
| - self.jobs = resources.AsyncJobs(self) |
489 |
| - self.sandbox = resources.AsyncSandbox(self) |
490 |
| - self.payroll = resources.AsyncPayroll(self) |
491 |
| - self.connect = resources.AsyncConnect(self) |
| 478 | + self.access_tokens = access_tokens.AsyncAccessTokens(self) |
| 479 | + self.hris = hris.AsyncHRIS(self) |
| 480 | + self.providers = providers.AsyncProviders(self) |
| 481 | + self.account = account.AsyncAccount(self) |
| 482 | + self.webhooks = webhooks.AsyncWebhooks(self) |
| 483 | + self.request_forwarding = request_forwarding.AsyncRequestForwarding(self) |
| 484 | + self.jobs = jobs.AsyncJobs(self) |
| 485 | + self.sandbox = sandbox.AsyncSandbox(self) |
| 486 | + self.payroll = payroll.AsyncPayroll(self) |
| 487 | + self.connect = connect.AsyncConnect(self) |
492 | 488 | self.with_raw_response = AsyncFinchWithRawResponse(self)
|
493 | 489 | self.with_streaming_response = AsyncFinchWithStreamedResponse(self)
|
494 | 490 |
|
@@ -725,54 +721,56 @@ def _make_status_error(
|
725 | 721 |
|
726 | 722 | class FinchWithRawResponse:
|
727 | 723 | def __init__(self, client: Finch) -> None:
|
728 |
| - self.access_tokens = resources.AccessTokensWithRawResponse(client.access_tokens) |
729 |
| - self.hris = resources.HRISWithRawResponse(client.hris) |
730 |
| - self.providers = resources.ProvidersWithRawResponse(client.providers) |
731 |
| - self.account = resources.AccountWithRawResponse(client.account) |
732 |
| - self.request_forwarding = resources.RequestForwardingWithRawResponse(client.request_forwarding) |
733 |
| - self.jobs = resources.JobsWithRawResponse(client.jobs) |
734 |
| - self.sandbox = resources.SandboxWithRawResponse(client.sandbox) |
735 |
| - self.payroll = resources.PayrollWithRawResponse(client.payroll) |
736 |
| - self.connect = resources.ConnectWithRawResponse(client.connect) |
| 724 | + self.access_tokens = access_tokens.AccessTokensWithRawResponse(client.access_tokens) |
| 725 | + self.hris = hris.HRISWithRawResponse(client.hris) |
| 726 | + self.providers = providers.ProvidersWithRawResponse(client.providers) |
| 727 | + self.account = account.AccountWithRawResponse(client.account) |
| 728 | + self.request_forwarding = request_forwarding.RequestForwardingWithRawResponse(client.request_forwarding) |
| 729 | + self.jobs = jobs.JobsWithRawResponse(client.jobs) |
| 730 | + self.sandbox = sandbox.SandboxWithRawResponse(client.sandbox) |
| 731 | + self.payroll = payroll.PayrollWithRawResponse(client.payroll) |
| 732 | + self.connect = connect.ConnectWithRawResponse(client.connect) |
737 | 733 |
|
738 | 734 |
|
739 | 735 | class AsyncFinchWithRawResponse:
|
740 | 736 | def __init__(self, client: AsyncFinch) -> None:
|
741 |
| - self.access_tokens = resources.AsyncAccessTokensWithRawResponse(client.access_tokens) |
742 |
| - self.hris = resources.AsyncHRISWithRawResponse(client.hris) |
743 |
| - self.providers = resources.AsyncProvidersWithRawResponse(client.providers) |
744 |
| - self.account = resources.AsyncAccountWithRawResponse(client.account) |
745 |
| - self.request_forwarding = resources.AsyncRequestForwardingWithRawResponse(client.request_forwarding) |
746 |
| - self.jobs = resources.AsyncJobsWithRawResponse(client.jobs) |
747 |
| - self.sandbox = resources.AsyncSandboxWithRawResponse(client.sandbox) |
748 |
| - self.payroll = resources.AsyncPayrollWithRawResponse(client.payroll) |
749 |
| - self.connect = resources.AsyncConnectWithRawResponse(client.connect) |
| 737 | + self.access_tokens = access_tokens.AsyncAccessTokensWithRawResponse(client.access_tokens) |
| 738 | + self.hris = hris.AsyncHRISWithRawResponse(client.hris) |
| 739 | + self.providers = providers.AsyncProvidersWithRawResponse(client.providers) |
| 740 | + self.account = account.AsyncAccountWithRawResponse(client.account) |
| 741 | + self.request_forwarding = request_forwarding.AsyncRequestForwardingWithRawResponse(client.request_forwarding) |
| 742 | + self.jobs = jobs.AsyncJobsWithRawResponse(client.jobs) |
| 743 | + self.sandbox = sandbox.AsyncSandboxWithRawResponse(client.sandbox) |
| 744 | + self.payroll = payroll.AsyncPayrollWithRawResponse(client.payroll) |
| 745 | + self.connect = connect.AsyncConnectWithRawResponse(client.connect) |
750 | 746 |
|
751 | 747 |
|
752 | 748 | class FinchWithStreamedResponse:
|
753 | 749 | def __init__(self, client: Finch) -> None:
|
754 |
| - self.access_tokens = resources.AccessTokensWithStreamingResponse(client.access_tokens) |
755 |
| - self.hris = resources.HRISWithStreamingResponse(client.hris) |
756 |
| - self.providers = resources.ProvidersWithStreamingResponse(client.providers) |
757 |
| - self.account = resources.AccountWithStreamingResponse(client.account) |
758 |
| - self.request_forwarding = resources.RequestForwardingWithStreamingResponse(client.request_forwarding) |
759 |
| - self.jobs = resources.JobsWithStreamingResponse(client.jobs) |
760 |
| - self.sandbox = resources.SandboxWithStreamingResponse(client.sandbox) |
761 |
| - self.payroll = resources.PayrollWithStreamingResponse(client.payroll) |
762 |
| - self.connect = resources.ConnectWithStreamingResponse(client.connect) |
| 750 | + self.access_tokens = access_tokens.AccessTokensWithStreamingResponse(client.access_tokens) |
| 751 | + self.hris = hris.HRISWithStreamingResponse(client.hris) |
| 752 | + self.providers = providers.ProvidersWithStreamingResponse(client.providers) |
| 753 | + self.account = account.AccountWithStreamingResponse(client.account) |
| 754 | + self.request_forwarding = request_forwarding.RequestForwardingWithStreamingResponse(client.request_forwarding) |
| 755 | + self.jobs = jobs.JobsWithStreamingResponse(client.jobs) |
| 756 | + self.sandbox = sandbox.SandboxWithStreamingResponse(client.sandbox) |
| 757 | + self.payroll = payroll.PayrollWithStreamingResponse(client.payroll) |
| 758 | + self.connect = connect.ConnectWithStreamingResponse(client.connect) |
763 | 759 |
|
764 | 760 |
|
765 | 761 | class AsyncFinchWithStreamedResponse:
|
766 | 762 | def __init__(self, client: AsyncFinch) -> None:
|
767 |
| - self.access_tokens = resources.AsyncAccessTokensWithStreamingResponse(client.access_tokens) |
768 |
| - self.hris = resources.AsyncHRISWithStreamingResponse(client.hris) |
769 |
| - self.providers = resources.AsyncProvidersWithStreamingResponse(client.providers) |
770 |
| - self.account = resources.AsyncAccountWithStreamingResponse(client.account) |
771 |
| - self.request_forwarding = resources.AsyncRequestForwardingWithStreamingResponse(client.request_forwarding) |
772 |
| - self.jobs = resources.AsyncJobsWithStreamingResponse(client.jobs) |
773 |
| - self.sandbox = resources.AsyncSandboxWithStreamingResponse(client.sandbox) |
774 |
| - self.payroll = resources.AsyncPayrollWithStreamingResponse(client.payroll) |
775 |
| - self.connect = resources.AsyncConnectWithStreamingResponse(client.connect) |
| 763 | + self.access_tokens = access_tokens.AsyncAccessTokensWithStreamingResponse(client.access_tokens) |
| 764 | + self.hris = hris.AsyncHRISWithStreamingResponse(client.hris) |
| 765 | + self.providers = providers.AsyncProvidersWithStreamingResponse(client.providers) |
| 766 | + self.account = account.AsyncAccountWithStreamingResponse(client.account) |
| 767 | + self.request_forwarding = request_forwarding.AsyncRequestForwardingWithStreamingResponse( |
| 768 | + client.request_forwarding |
| 769 | + ) |
| 770 | + self.jobs = jobs.AsyncJobsWithStreamingResponse(client.jobs) |
| 771 | + self.sandbox = sandbox.AsyncSandboxWithStreamingResponse(client.sandbox) |
| 772 | + self.payroll = payroll.AsyncPayrollWithStreamingResponse(client.payroll) |
| 773 | + self.connect = connect.AsyncConnectWithStreamingResponse(client.connect) |
776 | 774 |
|
777 | 775 |
|
778 | 776 | Client = Finch
|
|
0 commit comments