|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from ..._compat import cached_property |
| 6 | +from ..._resource import SyncAPIResource, AsyncAPIResource |
| 7 | +from .sub_number_orders import ( |
| 8 | + SubNumberOrdersResource, |
| 9 | + AsyncSubNumberOrdersResource, |
| 10 | + SubNumberOrdersResourceWithRawResponse, |
| 11 | + AsyncSubNumberOrdersResourceWithRawResponse, |
| 12 | + SubNumberOrdersResourceWithStreamingResponse, |
| 13 | + AsyncSubNumberOrdersResourceWithStreamingResponse, |
| 14 | +) |
| 15 | + |
| 16 | +__all__ = ["ExternalRequirementsResource", "AsyncExternalRequirementsResource"] |
| 17 | + |
| 18 | + |
| 19 | +class ExternalRequirementsResource(SyncAPIResource): |
| 20 | + @cached_property |
| 21 | + def sub_number_orders(self) -> SubNumberOrdersResource: |
| 22 | + """Requirement Groups""" |
| 23 | + return SubNumberOrdersResource(self._client) |
| 24 | + |
| 25 | + @cached_property |
| 26 | + def with_raw_response(self) -> ExternalRequirementsResourceWithRawResponse: |
| 27 | + """ |
| 28 | + This property can be used as a prefix for any HTTP method call to return |
| 29 | + the raw response object instead of the parsed content. |
| 30 | +
|
| 31 | + For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers |
| 32 | + """ |
| 33 | + return ExternalRequirementsResourceWithRawResponse(self) |
| 34 | + |
| 35 | + @cached_property |
| 36 | + def with_streaming_response(self) -> ExternalRequirementsResourceWithStreamingResponse: |
| 37 | + """ |
| 38 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 39 | +
|
| 40 | + For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response |
| 41 | + """ |
| 42 | + return ExternalRequirementsResourceWithStreamingResponse(self) |
| 43 | + |
| 44 | + |
| 45 | +class AsyncExternalRequirementsResource(AsyncAPIResource): |
| 46 | + @cached_property |
| 47 | + def sub_number_orders(self) -> AsyncSubNumberOrdersResource: |
| 48 | + """Requirement Groups""" |
| 49 | + return AsyncSubNumberOrdersResource(self._client) |
| 50 | + |
| 51 | + @cached_property |
| 52 | + def with_raw_response(self) -> AsyncExternalRequirementsResourceWithRawResponse: |
| 53 | + """ |
| 54 | + This property can be used as a prefix for any HTTP method call to return |
| 55 | + the raw response object instead of the parsed content. |
| 56 | +
|
| 57 | + For more information, see https://www.github.com/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers |
| 58 | + """ |
| 59 | + return AsyncExternalRequirementsResourceWithRawResponse(self) |
| 60 | + |
| 61 | + @cached_property |
| 62 | + def with_streaming_response(self) -> AsyncExternalRequirementsResourceWithStreamingResponse: |
| 63 | + """ |
| 64 | + An alternative to `.with_raw_response` that doesn't eagerly read the response body. |
| 65 | +
|
| 66 | + For more information, see https://www.github.com/team-telnyx/telnyx-python#with_streaming_response |
| 67 | + """ |
| 68 | + return AsyncExternalRequirementsResourceWithStreamingResponse(self) |
| 69 | + |
| 70 | + |
| 71 | +class ExternalRequirementsResourceWithRawResponse: |
| 72 | + def __init__(self, external_requirements: ExternalRequirementsResource) -> None: |
| 73 | + self._external_requirements = external_requirements |
| 74 | + |
| 75 | + @cached_property |
| 76 | + def sub_number_orders(self) -> SubNumberOrdersResourceWithRawResponse: |
| 77 | + """Requirement Groups""" |
| 78 | + return SubNumberOrdersResourceWithRawResponse(self._external_requirements.sub_number_orders) |
| 79 | + |
| 80 | + |
| 81 | +class AsyncExternalRequirementsResourceWithRawResponse: |
| 82 | + def __init__(self, external_requirements: AsyncExternalRequirementsResource) -> None: |
| 83 | + self._external_requirements = external_requirements |
| 84 | + |
| 85 | + @cached_property |
| 86 | + def sub_number_orders(self) -> AsyncSubNumberOrdersResourceWithRawResponse: |
| 87 | + """Requirement Groups""" |
| 88 | + return AsyncSubNumberOrdersResourceWithRawResponse(self._external_requirements.sub_number_orders) |
| 89 | + |
| 90 | + |
| 91 | +class ExternalRequirementsResourceWithStreamingResponse: |
| 92 | + def __init__(self, external_requirements: ExternalRequirementsResource) -> None: |
| 93 | + self._external_requirements = external_requirements |
| 94 | + |
| 95 | + @cached_property |
| 96 | + def sub_number_orders(self) -> SubNumberOrdersResourceWithStreamingResponse: |
| 97 | + """Requirement Groups""" |
| 98 | + return SubNumberOrdersResourceWithStreamingResponse(self._external_requirements.sub_number_orders) |
| 99 | + |
| 100 | + |
| 101 | +class AsyncExternalRequirementsResourceWithStreamingResponse: |
| 102 | + def __init__(self, external_requirements: AsyncExternalRequirementsResource) -> None: |
| 103 | + self._external_requirements = external_requirements |
| 104 | + |
| 105 | + @cached_property |
| 106 | + def sub_number_orders(self) -> AsyncSubNumberOrdersResourceWithStreamingResponse: |
| 107 | + """Requirement Groups""" |
| 108 | + return AsyncSubNumberOrdersResourceWithStreamingResponse(self._external_requirements.sub_number_orders) |
0 commit comments