4
4
5
5
import httpx
6
6
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 (
11
11
to_raw_response_wrapper ,
12
12
to_streamed_response_wrapper ,
13
13
async_to_raw_response_wrapper ,
14
14
async_to_streamed_response_wrapper ,
15
15
)
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
19
43
20
44
__all__ = ["BillingResource" , "AsyncBillingResource" ]
21
45
22
46
23
47
class 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
+
24
60
@cached_property
25
61
def with_raw_response (self ) -> BillingResourceWithRawResponse :
26
62
"""
@@ -108,6 +144,18 @@ def usage(
108
144
109
145
110
146
class 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
+
111
159
@cached_property
112
160
def with_raw_response (self ) -> AsyncBillingResourceWithRawResponse :
113
161
"""
@@ -205,6 +253,18 @@ def __init__(self, billing: BillingResource) -> None:
205
253
billing .usage ,
206
254
)
207
255
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
+
208
268
209
269
class AsyncBillingResourceWithRawResponse :
210
270
def __init__ (self , billing : AsyncBillingResource ) -> None :
@@ -217,6 +277,18 @@ def __init__(self, billing: AsyncBillingResource) -> None:
217
277
billing .usage ,
218
278
)
219
279
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
+
220
292
221
293
class BillingResourceWithStreamingResponse :
222
294
def __init__ (self , billing : BillingResource ) -> None :
@@ -229,6 +301,18 @@ def __init__(self, billing: BillingResource) -> None:
229
301
billing .usage ,
230
302
)
231
303
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
+
232
316
233
317
class AsyncBillingResourceWithStreamingResponse :
234
318
def __init__ (self , billing : AsyncBillingResource ) -> None :
@@ -240,3 +324,15 @@ def __init__(self, billing: AsyncBillingResource) -> None:
240
324
self .usage = async_to_streamed_response_wrapper (
241
325
billing .usage ,
242
326
)
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