|
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, 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 |
| - request_forwarding: resources.RequestForwarding |
60 |
| - jobs: resources.Jobs |
61 |
| - sandbox: resources.Sandbox |
62 |
| - payroll: resources.Payroll |
63 |
| - connect: resources.Connect |
| 51 | + access_tokens: access_tokens.AccessTokens |
| 52 | + hris: hris.HRIS |
| 53 | + providers: providers.Providers |
| 54 | + account: account.Account |
| 55 | + request_forwarding: request_forwarding.RequestForwarding |
| 56 | + jobs: jobs.Jobs |
| 57 | + sandbox: sandbox.Sandbox |
| 58 | + payroll: payroll.Payroll |
| 59 | + connect: connect.Connect |
64 | 60 | with_raw_response: FinchWithRawResponse
|
65 | 61 | with_streaming_response: FinchWithStreamedResponse
|
66 | 62 |
|
@@ -142,15 +138,15 @@ def __init__(
|
142 | 138 | _strict_response_validation=_strict_response_validation,
|
143 | 139 | )
|
144 | 140 |
|
145 |
| - self.access_tokens = resources.AccessTokens(self) |
146 |
| - self.hris = resources.HRIS(self) |
147 |
| - self.providers = resources.Providers(self) |
148 |
| - self.account = resources.Account(self) |
149 |
| - self.request_forwarding = resources.RequestForwarding(self) |
150 |
| - self.jobs = resources.Jobs(self) |
151 |
| - self.sandbox = resources.Sandbox(self) |
152 |
| - self.payroll = resources.Payroll(self) |
153 |
| - self.connect = resources.Connect(self) |
| 141 | + self.access_tokens = access_tokens.AccessTokens(self) |
| 142 | + self.hris = hris.HRIS(self) |
| 143 | + self.providers = providers.Providers(self) |
| 144 | + self.account = account.Account(self) |
| 145 | + self.request_forwarding = request_forwarding.RequestForwarding(self) |
| 146 | + self.jobs = jobs.Jobs(self) |
| 147 | + self.sandbox = sandbox.Sandbox(self) |
| 148 | + self.payroll = payroll.Payroll(self) |
| 149 | + self.connect = connect.Connect(self) |
154 | 150 | self.with_raw_response = FinchWithRawResponse(self)
|
155 | 151 | self.with_streaming_response = FinchWithStreamedResponse(self)
|
156 | 152 |
|
@@ -322,15 +318,15 @@ def _make_status_error(
|
322 | 318 |
|
323 | 319 |
|
324 | 320 | class AsyncFinch(AsyncAPIClient):
|
325 |
| - access_tokens: resources.AsyncAccessTokens |
326 |
| - hris: resources.AsyncHRIS |
327 |
| - providers: resources.AsyncProviders |
328 |
| - account: resources.AsyncAccount |
329 |
| - request_forwarding: resources.AsyncRequestForwarding |
330 |
| - jobs: resources.AsyncJobs |
331 |
| - sandbox: resources.AsyncSandbox |
332 |
| - payroll: resources.AsyncPayroll |
333 |
| - connect: resources.AsyncConnect |
| 321 | + access_tokens: access_tokens.AsyncAccessTokens |
| 322 | + hris: hris.AsyncHRIS |
| 323 | + providers: providers.AsyncProviders |
| 324 | + account: account.AsyncAccount |
| 325 | + request_forwarding: request_forwarding.AsyncRequestForwarding |
| 326 | + jobs: jobs.AsyncJobs |
| 327 | + sandbox: sandbox.AsyncSandbox |
| 328 | + payroll: payroll.AsyncPayroll |
| 329 | + connect: connect.AsyncConnect |
334 | 330 | with_raw_response: AsyncFinchWithRawResponse
|
335 | 331 | with_streaming_response: AsyncFinchWithStreamedResponse
|
336 | 332 |
|
@@ -412,15 +408,15 @@ def __init__(
|
412 | 408 | _strict_response_validation=_strict_response_validation,
|
413 | 409 | )
|
414 | 410 |
|
415 |
| - self.access_tokens = resources.AsyncAccessTokens(self) |
416 |
| - self.hris = resources.AsyncHRIS(self) |
417 |
| - self.providers = resources.AsyncProviders(self) |
418 |
| - self.account = resources.AsyncAccount(self) |
419 |
| - self.request_forwarding = resources.AsyncRequestForwarding(self) |
420 |
| - self.jobs = resources.AsyncJobs(self) |
421 |
| - self.sandbox = resources.AsyncSandbox(self) |
422 |
| - self.payroll = resources.AsyncPayroll(self) |
423 |
| - self.connect = resources.AsyncConnect(self) |
| 411 | + self.access_tokens = access_tokens.AsyncAccessTokens(self) |
| 412 | + self.hris = hris.AsyncHRIS(self) |
| 413 | + self.providers = providers.AsyncProviders(self) |
| 414 | + self.account = account.AsyncAccount(self) |
| 415 | + self.request_forwarding = request_forwarding.AsyncRequestForwarding(self) |
| 416 | + self.jobs = jobs.AsyncJobs(self) |
| 417 | + self.sandbox = sandbox.AsyncSandbox(self) |
| 418 | + self.payroll = payroll.AsyncPayroll(self) |
| 419 | + self.connect = connect.AsyncConnect(self) |
424 | 420 | self.with_raw_response = AsyncFinchWithRawResponse(self)
|
425 | 421 | self.with_streaming_response = AsyncFinchWithStreamedResponse(self)
|
426 | 422 |
|
@@ -593,54 +589,56 @@ def _make_status_error(
|
593 | 589 |
|
594 | 590 | class FinchWithRawResponse:
|
595 | 591 | def __init__(self, client: Finch) -> None:
|
596 |
| - self.access_tokens = resources.AccessTokensWithRawResponse(client.access_tokens) |
597 |
| - self.hris = resources.HRISWithRawResponse(client.hris) |
598 |
| - self.providers = resources.ProvidersWithRawResponse(client.providers) |
599 |
| - self.account = resources.AccountWithRawResponse(client.account) |
600 |
| - self.request_forwarding = resources.RequestForwardingWithRawResponse(client.request_forwarding) |
601 |
| - self.jobs = resources.JobsWithRawResponse(client.jobs) |
602 |
| - self.sandbox = resources.SandboxWithRawResponse(client.sandbox) |
603 |
| - self.payroll = resources.PayrollWithRawResponse(client.payroll) |
604 |
| - self.connect = resources.ConnectWithRawResponse(client.connect) |
| 592 | + self.access_tokens = access_tokens.AccessTokensWithRawResponse(client.access_tokens) |
| 593 | + self.hris = hris.HRISWithRawResponse(client.hris) |
| 594 | + self.providers = providers.ProvidersWithRawResponse(client.providers) |
| 595 | + self.account = account.AccountWithRawResponse(client.account) |
| 596 | + self.request_forwarding = request_forwarding.RequestForwardingWithRawResponse(client.request_forwarding) |
| 597 | + self.jobs = jobs.JobsWithRawResponse(client.jobs) |
| 598 | + self.sandbox = sandbox.SandboxWithRawResponse(client.sandbox) |
| 599 | + self.payroll = payroll.PayrollWithRawResponse(client.payroll) |
| 600 | + self.connect = connect.ConnectWithRawResponse(client.connect) |
605 | 601 |
|
606 | 602 |
|
607 | 603 | class AsyncFinchWithRawResponse:
|
608 | 604 | def __init__(self, client: AsyncFinch) -> None:
|
609 |
| - self.access_tokens = resources.AsyncAccessTokensWithRawResponse(client.access_tokens) |
610 |
| - self.hris = resources.AsyncHRISWithRawResponse(client.hris) |
611 |
| - self.providers = resources.AsyncProvidersWithRawResponse(client.providers) |
612 |
| - self.account = resources.AsyncAccountWithRawResponse(client.account) |
613 |
| - self.request_forwarding = resources.AsyncRequestForwardingWithRawResponse(client.request_forwarding) |
614 |
| - self.jobs = resources.AsyncJobsWithRawResponse(client.jobs) |
615 |
| - self.sandbox = resources.AsyncSandboxWithRawResponse(client.sandbox) |
616 |
| - self.payroll = resources.AsyncPayrollWithRawResponse(client.payroll) |
617 |
| - self.connect = resources.AsyncConnectWithRawResponse(client.connect) |
| 605 | + self.access_tokens = access_tokens.AsyncAccessTokensWithRawResponse(client.access_tokens) |
| 606 | + self.hris = hris.AsyncHRISWithRawResponse(client.hris) |
| 607 | + self.providers = providers.AsyncProvidersWithRawResponse(client.providers) |
| 608 | + self.account = account.AsyncAccountWithRawResponse(client.account) |
| 609 | + self.request_forwarding = request_forwarding.AsyncRequestForwardingWithRawResponse(client.request_forwarding) |
| 610 | + self.jobs = jobs.AsyncJobsWithRawResponse(client.jobs) |
| 611 | + self.sandbox = sandbox.AsyncSandboxWithRawResponse(client.sandbox) |
| 612 | + self.payroll = payroll.AsyncPayrollWithRawResponse(client.payroll) |
| 613 | + self.connect = connect.AsyncConnectWithRawResponse(client.connect) |
618 | 614 |
|
619 | 615 |
|
620 | 616 | class FinchWithStreamedResponse:
|
621 | 617 | def __init__(self, client: Finch) -> None:
|
622 |
| - self.access_tokens = resources.AccessTokensWithStreamingResponse(client.access_tokens) |
623 |
| - self.hris = resources.HRISWithStreamingResponse(client.hris) |
624 |
| - self.providers = resources.ProvidersWithStreamingResponse(client.providers) |
625 |
| - self.account = resources.AccountWithStreamingResponse(client.account) |
626 |
| - self.request_forwarding = resources.RequestForwardingWithStreamingResponse(client.request_forwarding) |
627 |
| - self.jobs = resources.JobsWithStreamingResponse(client.jobs) |
628 |
| - self.sandbox = resources.SandboxWithStreamingResponse(client.sandbox) |
629 |
| - self.payroll = resources.PayrollWithStreamingResponse(client.payroll) |
630 |
| - self.connect = resources.ConnectWithStreamingResponse(client.connect) |
| 618 | + self.access_tokens = access_tokens.AccessTokensWithStreamingResponse(client.access_tokens) |
| 619 | + self.hris = hris.HRISWithStreamingResponse(client.hris) |
| 620 | + self.providers = providers.ProvidersWithStreamingResponse(client.providers) |
| 621 | + self.account = account.AccountWithStreamingResponse(client.account) |
| 622 | + self.request_forwarding = request_forwarding.RequestForwardingWithStreamingResponse(client.request_forwarding) |
| 623 | + self.jobs = jobs.JobsWithStreamingResponse(client.jobs) |
| 624 | + self.sandbox = sandbox.SandboxWithStreamingResponse(client.sandbox) |
| 625 | + self.payroll = payroll.PayrollWithStreamingResponse(client.payroll) |
| 626 | + self.connect = connect.ConnectWithStreamingResponse(client.connect) |
631 | 627 |
|
632 | 628 |
|
633 | 629 | class AsyncFinchWithStreamedResponse:
|
634 | 630 | def __init__(self, client: AsyncFinch) -> None:
|
635 |
| - self.access_tokens = resources.AsyncAccessTokensWithStreamingResponse(client.access_tokens) |
636 |
| - self.hris = resources.AsyncHRISWithStreamingResponse(client.hris) |
637 |
| - self.providers = resources.AsyncProvidersWithStreamingResponse(client.providers) |
638 |
| - self.account = resources.AsyncAccountWithStreamingResponse(client.account) |
639 |
| - self.request_forwarding = resources.AsyncRequestForwardingWithStreamingResponse(client.request_forwarding) |
640 |
| - self.jobs = resources.AsyncJobsWithStreamingResponse(client.jobs) |
641 |
| - self.sandbox = resources.AsyncSandboxWithStreamingResponse(client.sandbox) |
642 |
| - self.payroll = resources.AsyncPayrollWithStreamingResponse(client.payroll) |
643 |
| - self.connect = resources.AsyncConnectWithStreamingResponse(client.connect) |
| 631 | + self.access_tokens = access_tokens.AsyncAccessTokensWithStreamingResponse(client.access_tokens) |
| 632 | + self.hris = hris.AsyncHRISWithStreamingResponse(client.hris) |
| 633 | + self.providers = providers.AsyncProvidersWithStreamingResponse(client.providers) |
| 634 | + self.account = account.AsyncAccountWithStreamingResponse(client.account) |
| 635 | + self.request_forwarding = request_forwarding.AsyncRequestForwardingWithStreamingResponse( |
| 636 | + client.request_forwarding |
| 637 | + ) |
| 638 | + self.jobs = jobs.AsyncJobsWithStreamingResponse(client.jobs) |
| 639 | + self.sandbox = sandbox.AsyncSandboxWithStreamingResponse(client.sandbox) |
| 640 | + self.payroll = payroll.AsyncPayrollWithStreamingResponse(client.payroll) |
| 641 | + self.connect = connect.AsyncConnectWithStreamingResponse(client.connect) |
644 | 642 |
|
645 | 643 |
|
646 | 644 | Client = Finch
|
|
0 commit comments