44
55import httpx
66
7- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8- from ..._compat import cached_property
9- from ..._resource import SyncAPIResource, AsyncAPIResource
10- from ..._response import (
7+ from .... _types import NOT_GIVEN, Body, Query, Headers, NotGiven
8+ from .... _compat import cached_property
9+ from .... _resource import SyncAPIResource, AsyncAPIResource
10+ from .... _response import (
1111 to_raw_response_wrapper,
1212 to_streamed_response_wrapper,
1313 async_to_raw_response_wrapper,
1414 async_to_streamed_response_wrapper,
1515)
16- from ..._base_client import make_request_options
17- from ...types.organizations.organization_billing_usage_schema import OrganizationBillingUsageSchema
18- from ...types.organizations.organization_billing_invoices_schema import OrganizationBillingInvoicesSchema
16+ from .card_details import (
17+ CardDetailsResource,
18+ AsyncCardDetailsResource,
19+ CardDetailsResourceWithRawResponse,
20+ AsyncCardDetailsResourceWithRawResponse,
21+ CardDetailsResourceWithStreamingResponse,
22+ AsyncCardDetailsResourceWithStreamingResponse,
23+ )
24+ from .plan_details import (
25+ PlanDetailsResource,
26+ AsyncPlanDetailsResource,
27+ PlanDetailsResourceWithRawResponse,
28+ AsyncPlanDetailsResourceWithRawResponse,
29+ PlanDetailsResourceWithStreamingResponse,
30+ AsyncPlanDetailsResourceWithStreamingResponse,
31+ )
32+ from .setup_intent import (
33+ SetupIntentResource,
34+ AsyncSetupIntentResource,
35+ SetupIntentResourceWithRawResponse,
36+ AsyncSetupIntentResourceWithRawResponse,
37+ SetupIntentResourceWithStreamingResponse,
38+ AsyncSetupIntentResourceWithStreamingResponse,
39+ )
40+ from ...._base_client import make_request_options
41+ from ....types.organizations.organization_billing_usage_schema import OrganizationBillingUsageSchema
42+ from ....types.organizations.organization_billing_invoices_schema import OrganizationBillingInvoicesSchema
1943
2044__all__ = ["BillingResource", "AsyncBillingResource"]
2145
2246
2347class BillingResource(SyncAPIResource):
48+ @cached_property
49+ def card_details(self) -> CardDetailsResource:
50+ return CardDetailsResource(self._client)
51+
52+ @cached_property
53+ def setup_intent(self) -> SetupIntentResource:
54+ return SetupIntentResource(self._client)
55+
56+ @cached_property
57+ def plan_details(self) -> PlanDetailsResource:
58+ return PlanDetailsResource(self._client)
59+
2460 @cached_property
2561 def with_raw_response(self) -> BillingResourceWithRawResponse:
2662 """
@@ -108,6 +144,18 @@ def usage(
108144
109145
110146class AsyncBillingResource(AsyncAPIResource):
147+ @cached_property
148+ def card_details(self) -> AsyncCardDetailsResource:
149+ return AsyncCardDetailsResource(self._client)
150+
151+ @cached_property
152+ def setup_intent(self) -> AsyncSetupIntentResource:
153+ return AsyncSetupIntentResource(self._client)
154+
155+ @cached_property
156+ def plan_details(self) -> AsyncPlanDetailsResource:
157+ return AsyncPlanDetailsResource(self._client)
158+
111159 @cached_property
112160 def with_raw_response(self) -> AsyncBillingResourceWithRawResponse:
113161 """
@@ -205,6 +253,18 @@ def __init__(self, billing: BillingResource) -> None:
205253 billing.usage,
206254 )
207255
256+ @cached_property
257+ def card_details(self) -> CardDetailsResourceWithRawResponse:
258+ return CardDetailsResourceWithRawResponse(self._billing.card_details)
259+
260+ @cached_property
261+ def setup_intent(self) -> SetupIntentResourceWithRawResponse:
262+ return SetupIntentResourceWithRawResponse(self._billing.setup_intent)
263+
264+ @cached_property
265+ def plan_details(self) -> PlanDetailsResourceWithRawResponse:
266+ return PlanDetailsResourceWithRawResponse(self._billing.plan_details)
267+
208268
209269class AsyncBillingResourceWithRawResponse:
210270 def __init__(self, billing: AsyncBillingResource) -> None:
@@ -217,6 +277,18 @@ def __init__(self, billing: AsyncBillingResource) -> None:
217277 billing.usage,
218278 )
219279
280+ @cached_property
281+ def card_details(self) -> AsyncCardDetailsResourceWithRawResponse:
282+ return AsyncCardDetailsResourceWithRawResponse(self._billing.card_details)
283+
284+ @cached_property
285+ def setup_intent(self) -> AsyncSetupIntentResourceWithRawResponse:
286+ return AsyncSetupIntentResourceWithRawResponse(self._billing.setup_intent)
287+
288+ @cached_property
289+ def plan_details(self) -> AsyncPlanDetailsResourceWithRawResponse:
290+ return AsyncPlanDetailsResourceWithRawResponse(self._billing.plan_details)
291+
220292
221293class BillingResourceWithStreamingResponse:
222294 def __init__(self, billing: BillingResource) -> None:
@@ -229,6 +301,18 @@ def __init__(self, billing: BillingResource) -> None:
229301 billing.usage,
230302 )
231303
304+ @cached_property
305+ def card_details(self) -> CardDetailsResourceWithStreamingResponse:
306+ return CardDetailsResourceWithStreamingResponse(self._billing.card_details)
307+
308+ @cached_property
309+ def setup_intent(self) -> SetupIntentResourceWithStreamingResponse:
310+ return SetupIntentResourceWithStreamingResponse(self._billing.setup_intent)
311+
312+ @cached_property
313+ def plan_details(self) -> PlanDetailsResourceWithStreamingResponse:
314+ return PlanDetailsResourceWithStreamingResponse(self._billing.plan_details)
315+
232316
233317class AsyncBillingResourceWithStreamingResponse:
234318 def __init__(self, billing: AsyncBillingResource) -> None:
@@ -240,3 +324,15 @@ def __init__(self, billing: AsyncBillingResource) -> None:
240324 self.usage = async_to_streamed_response_wrapper(
241325 billing.usage,
242326 )
327+
328+ @cached_property
329+ def card_details(self) -> AsyncCardDetailsResourceWithStreamingResponse:
330+ return AsyncCardDetailsResourceWithStreamingResponse(self._billing.card_details)
331+
332+ @cached_property
333+ def setup_intent(self) -> AsyncSetupIntentResourceWithStreamingResponse:
334+ return AsyncSetupIntentResourceWithStreamingResponse(self._billing.setup_intent)
335+
336+ @cached_property
337+ def plan_details(self) -> AsyncPlanDetailsResourceWithStreamingResponse:
338+ return AsyncPlanDetailsResourceWithStreamingResponse(self._billing.plan_details)
0 commit comments