dodopayments 1.53.4__py3-none-any.whl → 1.55.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dodopayments might be problematic. Click here for more details.

Files changed (43) hide show
  1. dodopayments/__init__.py +3 -1
  2. dodopayments/_base_client.py +9 -9
  3. dodopayments/_client.py +12 -12
  4. dodopayments/_qs.py +7 -7
  5. dodopayments/_types.py +18 -11
  6. dodopayments/_utils/_transform.py +2 -2
  7. dodopayments/_utils/_utils.py +4 -4
  8. dodopayments/_version.py +1 -1
  9. dodopayments/resources/addons.py +29 -29
  10. dodopayments/resources/brands.py +29 -29
  11. dodopayments/resources/checkout_sessions.py +35 -27
  12. dodopayments/resources/customers/customer_portal.py +5 -5
  13. dodopayments/resources/customers/customers.py +21 -21
  14. dodopayments/resources/customers/wallets/ledger_entries.py +15 -15
  15. dodopayments/resources/customers/wallets/wallets.py +3 -3
  16. dodopayments/resources/discounts.py +43 -43
  17. dodopayments/resources/disputes.py +19 -19
  18. dodopayments/resources/invoices/payments.py +5 -5
  19. dodopayments/resources/license_key_instances.py +13 -13
  20. dodopayments/resources/license_keys.py +23 -23
  21. dodopayments/resources/licenses.py +9 -9
  22. dodopayments/resources/meters.py +21 -21
  23. dodopayments/resources/misc.py +3 -3
  24. dodopayments/resources/payments.py +49 -41
  25. dodopayments/resources/payouts.py +26 -7
  26. dodopayments/resources/products/images.py +5 -5
  27. dodopayments/resources/products/products.py +71 -71
  28. dodopayments/resources/refunds.py +23 -23
  29. dodopayments/resources/subscriptions.py +95 -87
  30. dodopayments/resources/usage_events.py +21 -21
  31. dodopayments/resources/webhooks/headers.py +5 -5
  32. dodopayments/resources/webhooks/webhooks.py +43 -43
  33. dodopayments/types/checkout_session_create_params.py +6 -0
  34. dodopayments/types/customer_limited_details.py +5 -0
  35. dodopayments/types/payment_create_params.py +3 -0
  36. dodopayments/types/payout_list_params.py +11 -1
  37. dodopayments/types/subscription.py +3 -0
  38. dodopayments/types/subscription_create_params.py +3 -0
  39. dodopayments/types/subscription_list_response.py +3 -0
  40. {dodopayments-1.53.4.dist-info → dodopayments-1.55.0.dist-info}/METADATA +1 -1
  41. {dodopayments-1.53.4.dist-info → dodopayments-1.55.0.dist-info}/RECORD +43 -43
  42. {dodopayments-1.53.4.dist-info → dodopayments-1.55.0.dist-info}/WHEEL +0 -0
  43. {dodopayments-1.53.4.dist-info → dodopayments-1.55.0.dist-info}/licenses/LICENSE +0 -0
@@ -9,7 +9,7 @@ from typing_extensions import Literal
9
9
  import httpx
10
10
 
11
11
  from ..types import refund_list_params, refund_create_params
12
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
13
13
  from .._utils import maybe_transform, async_maybe_transform
14
14
  from .._compat import cached_property
15
15
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -51,14 +51,14 @@ class RefundsResource(SyncAPIResource):
51
51
  self,
52
52
  *,
53
53
  payment_id: str,
54
- items: Optional[Iterable[refund_create_params.Item]] | NotGiven = NOT_GIVEN,
55
- reason: Optional[str] | NotGiven = NOT_GIVEN,
54
+ items: Optional[Iterable[refund_create_params.Item]] | Omit = omit,
55
+ reason: Optional[str] | Omit = omit,
56
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
58
  extra_headers: Headers | None = None,
59
59
  extra_query: Query | None = None,
60
60
  extra_body: Body | None = None,
61
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
62
62
  ) -> Refund:
63
63
  """
64
64
  Args:
@@ -101,7 +101,7 @@ class RefundsResource(SyncAPIResource):
101
101
  extra_headers: Headers | None = None,
102
102
  extra_query: Query | None = None,
103
103
  extra_body: Body | None = None,
104
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
104
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
105
105
  ) -> Refund:
106
106
  """
107
107
  Args:
@@ -126,18 +126,18 @@ class RefundsResource(SyncAPIResource):
126
126
  def list(
127
127
  self,
128
128
  *,
129
- created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
130
- created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
131
- customer_id: str | NotGiven = NOT_GIVEN,
132
- page_number: int | NotGiven = NOT_GIVEN,
133
- page_size: int | NotGiven = NOT_GIVEN,
134
- status: Literal["succeeded", "failed", "pending", "review"] | NotGiven = NOT_GIVEN,
129
+ created_at_gte: Union[str, datetime] | Omit = omit,
130
+ created_at_lte: Union[str, datetime] | Omit = omit,
131
+ customer_id: str | Omit = omit,
132
+ page_number: int | Omit = omit,
133
+ page_size: int | Omit = omit,
134
+ status: Literal["succeeded", "failed", "pending", "review"] | Omit = omit,
135
135
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
136
136
  # The extra values given here take precedence over values defined on the client or passed to this method.
137
137
  extra_headers: Headers | None = None,
138
138
  extra_query: Query | None = None,
139
139
  extra_body: Body | None = None,
140
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
140
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
141
141
  ) -> SyncDefaultPageNumberPagination[RefundListResponse]:
142
142
  """
143
143
  Args:
@@ -209,14 +209,14 @@ class AsyncRefundsResource(AsyncAPIResource):
209
209
  self,
210
210
  *,
211
211
  payment_id: str,
212
- items: Optional[Iterable[refund_create_params.Item]] | NotGiven = NOT_GIVEN,
213
- reason: Optional[str] | NotGiven = NOT_GIVEN,
212
+ items: Optional[Iterable[refund_create_params.Item]] | Omit = omit,
213
+ reason: Optional[str] | Omit = omit,
214
214
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
215
215
  # The extra values given here take precedence over values defined on the client or passed to this method.
216
216
  extra_headers: Headers | None = None,
217
217
  extra_query: Query | None = None,
218
218
  extra_body: Body | None = None,
219
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
219
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
220
220
  ) -> Refund:
221
221
  """
222
222
  Args:
@@ -259,7 +259,7 @@ class AsyncRefundsResource(AsyncAPIResource):
259
259
  extra_headers: Headers | None = None,
260
260
  extra_query: Query | None = None,
261
261
  extra_body: Body | None = None,
262
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
262
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
263
263
  ) -> Refund:
264
264
  """
265
265
  Args:
@@ -284,18 +284,18 @@ class AsyncRefundsResource(AsyncAPIResource):
284
284
  def list(
285
285
  self,
286
286
  *,
287
- created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
288
- created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
289
- customer_id: str | NotGiven = NOT_GIVEN,
290
- page_number: int | NotGiven = NOT_GIVEN,
291
- page_size: int | NotGiven = NOT_GIVEN,
292
- status: Literal["succeeded", "failed", "pending", "review"] | NotGiven = NOT_GIVEN,
287
+ created_at_gte: Union[str, datetime] | Omit = omit,
288
+ created_at_lte: Union[str, datetime] | Omit = omit,
289
+ customer_id: str | Omit = omit,
290
+ page_number: int | Omit = omit,
291
+ page_size: int | Omit = omit,
292
+ status: Literal["succeeded", "failed", "pending", "review"] | Omit = omit,
293
293
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294
294
  # The extra values given here take precedence over values defined on the client or passed to this method.
295
295
  extra_headers: Headers | None = None,
296
296
  extra_query: Query | None = None,
297
297
  extra_body: Body | None = None,
298
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
298
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
299
299
  ) -> AsyncPaginator[RefundListResponse, AsyncDefaultPageNumberPagination[RefundListResponse]]:
300
300
  """
301
301
  Args:
@@ -18,7 +18,7 @@ from ..types import (
18
18
  subscription_change_plan_params,
19
19
  subscription_retrieve_usage_history_params,
20
20
  )
21
- from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
21
+ from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
22
22
  from .._utils import maybe_transform, async_maybe_transform
23
23
  from .._compat import cached_property
24
24
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -73,23 +73,24 @@ class SubscriptionsResource(SyncAPIResource):
73
73
  customer: CustomerRequestParam,
74
74
  product_id: str,
75
75
  quantity: int,
76
- addons: Optional[Iterable[AttachAddonParam]] | NotGiven = NOT_GIVEN,
77
- allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | NotGiven = NOT_GIVEN,
78
- billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
79
- discount_code: Optional[str] | NotGiven = NOT_GIVEN,
80
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
81
- on_demand: Optional[OnDemandSubscriptionParam] | NotGiven = NOT_GIVEN,
82
- payment_link: Optional[bool] | NotGiven = NOT_GIVEN,
83
- return_url: Optional[str] | NotGiven = NOT_GIVEN,
84
- show_saved_payment_methods: bool | NotGiven = NOT_GIVEN,
85
- tax_id: Optional[str] | NotGiven = NOT_GIVEN,
86
- trial_period_days: Optional[int] | NotGiven = NOT_GIVEN,
76
+ addons: Optional[Iterable[AttachAddonParam]] | Omit = omit,
77
+ allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | Omit = omit,
78
+ billing_currency: Optional[Currency] | Omit = omit,
79
+ discount_code: Optional[str] | Omit = omit,
80
+ force_3ds: Optional[bool] | Omit = omit,
81
+ metadata: Dict[str, str] | Omit = omit,
82
+ on_demand: Optional[OnDemandSubscriptionParam] | Omit = omit,
83
+ payment_link: Optional[bool] | Omit = omit,
84
+ return_url: Optional[str] | Omit = omit,
85
+ show_saved_payment_methods: bool | Omit = omit,
86
+ tax_id: Optional[str] | Omit = omit,
87
+ trial_period_days: Optional[int] | Omit = omit,
87
88
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
88
89
  # The extra values given here take precedence over values defined on the client or passed to this method.
89
90
  extra_headers: Headers | None = None,
90
91
  extra_query: Query | None = None,
91
92
  extra_body: Body | None = None,
92
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
93
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
93
94
  ) -> SubscriptionCreateResponse:
94
95
  """
95
96
  Args:
@@ -115,6 +116,8 @@ class SubscriptionsResource(SyncAPIResource):
115
116
 
116
117
  discount_code: Discount Code to apply to the subscription
117
118
 
119
+ force_3ds: Override merchant default 3DS behaviour for this subscription
120
+
118
121
  metadata: Additional metadata for the subscription Defaults to empty if not specified
119
122
 
120
123
  payment_link: If true, generates a payment link. Defaults to false if not specified.
@@ -149,6 +152,7 @@ class SubscriptionsResource(SyncAPIResource):
149
152
  "allowed_payment_method_types": allowed_payment_method_types,
150
153
  "billing_currency": billing_currency,
151
154
  "discount_code": discount_code,
155
+ "force_3ds": force_3ds,
152
156
  "metadata": metadata,
153
157
  "on_demand": on_demand,
154
158
  "payment_link": payment_link,
@@ -174,7 +178,7 @@ class SubscriptionsResource(SyncAPIResource):
174
178
  extra_headers: Headers | None = None,
175
179
  extra_query: Query | None = None,
176
180
  extra_body: Body | None = None,
177
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
181
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
178
182
  ) -> Subscription:
179
183
  """
180
184
  Args:
@@ -200,19 +204,19 @@ class SubscriptionsResource(SyncAPIResource):
200
204
  self,
201
205
  subscription_id: str,
202
206
  *,
203
- billing: Optional[BillingAddressParam] | NotGiven = NOT_GIVEN,
204
- cancel_at_next_billing_date: Optional[bool] | NotGiven = NOT_GIVEN,
205
- disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
206
- metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
207
- next_billing_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
208
- status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
209
- tax_id: Optional[str] | NotGiven = NOT_GIVEN,
207
+ billing: Optional[BillingAddressParam] | Omit = omit,
208
+ cancel_at_next_billing_date: Optional[bool] | Omit = omit,
209
+ disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | Omit = omit,
210
+ metadata: Optional[Dict[str, str]] | Omit = omit,
211
+ next_billing_date: Union[str, datetime, None] | Omit = omit,
212
+ status: Optional[SubscriptionStatus] | Omit = omit,
213
+ tax_id: Optional[str] | Omit = omit,
210
214
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
211
215
  # The extra values given here take precedence over values defined on the client or passed to this method.
212
216
  extra_headers: Headers | None = None,
213
217
  extra_query: Query | None = None,
214
218
  extra_body: Body | None = None,
215
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
219
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
216
220
  ) -> Subscription:
217
221
  """
218
222
  Args:
@@ -251,19 +255,19 @@ class SubscriptionsResource(SyncAPIResource):
251
255
  def list(
252
256
  self,
253
257
  *,
254
- brand_id: str | NotGiven = NOT_GIVEN,
255
- created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
256
- created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
257
- customer_id: str | NotGiven = NOT_GIVEN,
258
- page_number: int | NotGiven = NOT_GIVEN,
259
- page_size: int | NotGiven = NOT_GIVEN,
260
- status: Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"] | NotGiven = NOT_GIVEN,
258
+ brand_id: str | Omit = omit,
259
+ created_at_gte: Union[str, datetime] | Omit = omit,
260
+ created_at_lte: Union[str, datetime] | Omit = omit,
261
+ customer_id: str | Omit = omit,
262
+ page_number: int | Omit = omit,
263
+ page_size: int | Omit = omit,
264
+ status: Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"] | Omit = omit,
261
265
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262
266
  # The extra values given here take precedence over values defined on the client or passed to this method.
263
267
  extra_headers: Headers | None = None,
264
268
  extra_query: Query | None = None,
265
269
  extra_body: Body | None = None,
266
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
270
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
267
271
  ) -> SyncDefaultPageNumberPagination[SubscriptionListResponse]:
268
272
  """
269
273
  Args:
@@ -320,13 +324,13 @@ class SubscriptionsResource(SyncAPIResource):
320
324
  product_id: str,
321
325
  proration_billing_mode: Literal["prorated_immediately", "full_immediately", "difference_immediately"],
322
326
  quantity: int,
323
- addons: Optional[Iterable[AttachAddonParam]] | NotGiven = NOT_GIVEN,
327
+ addons: Optional[Iterable[AttachAddonParam]] | Omit = omit,
324
328
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
325
329
  # The extra values given here take precedence over values defined on the client or passed to this method.
326
330
  extra_headers: Headers | None = None,
327
331
  extra_query: Query | None = None,
328
332
  extra_body: Body | None = None,
329
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
333
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
330
334
  ) -> None:
331
335
  """
332
336
  Args:
@@ -372,17 +376,17 @@ class SubscriptionsResource(SyncAPIResource):
372
376
  subscription_id: str,
373
377
  *,
374
378
  product_price: int,
375
- adaptive_currency_fees_inclusive: Optional[bool] | NotGiven = NOT_GIVEN,
376
- customer_balance_config: Optional[subscription_charge_params.CustomerBalanceConfig] | NotGiven = NOT_GIVEN,
377
- metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
378
- product_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
379
- product_description: Optional[str] | NotGiven = NOT_GIVEN,
379
+ adaptive_currency_fees_inclusive: Optional[bool] | Omit = omit,
380
+ customer_balance_config: Optional[subscription_charge_params.CustomerBalanceConfig] | Omit = omit,
381
+ metadata: Optional[Dict[str, str]] | Omit = omit,
382
+ product_currency: Optional[Currency] | Omit = omit,
383
+ product_description: Optional[str] | Omit = omit,
380
384
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
381
385
  # The extra values given here take precedence over values defined on the client or passed to this method.
382
386
  extra_headers: Headers | None = None,
383
387
  extra_query: Query | None = None,
384
388
  extra_body: Body | None = None,
385
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
389
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
386
390
  ) -> SubscriptionChargeResponse:
387
391
  """Args:
388
392
  product_price: The product price.
@@ -438,17 +442,17 @@ class SubscriptionsResource(SyncAPIResource):
438
442
  self,
439
443
  subscription_id: str,
440
444
  *,
441
- end_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
442
- meter_id: Optional[str] | NotGiven = NOT_GIVEN,
443
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
444
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
445
- start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
445
+ end_date: Union[str, datetime, None] | Omit = omit,
446
+ meter_id: Optional[str] | Omit = omit,
447
+ page_number: Optional[int] | Omit = omit,
448
+ page_size: Optional[int] | Omit = omit,
449
+ start_date: Union[str, datetime, None] | Omit = omit,
446
450
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
447
451
  # The extra values given here take precedence over values defined on the client or passed to this method.
448
452
  extra_headers: Headers | None = None,
449
453
  extra_query: Query | None = None,
450
454
  extra_body: Body | None = None,
451
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
455
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
452
456
  ) -> SyncDefaultPageNumberPagination[SubscriptionRetrieveUsageHistoryResponse]:
453
457
  """
454
458
  Get detailed usage history for a subscription that includes usage-based billing
@@ -565,23 +569,24 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
565
569
  customer: CustomerRequestParam,
566
570
  product_id: str,
567
571
  quantity: int,
568
- addons: Optional[Iterable[AttachAddonParam]] | NotGiven = NOT_GIVEN,
569
- allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | NotGiven = NOT_GIVEN,
570
- billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
571
- discount_code: Optional[str] | NotGiven = NOT_GIVEN,
572
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
573
- on_demand: Optional[OnDemandSubscriptionParam] | NotGiven = NOT_GIVEN,
574
- payment_link: Optional[bool] | NotGiven = NOT_GIVEN,
575
- return_url: Optional[str] | NotGiven = NOT_GIVEN,
576
- show_saved_payment_methods: bool | NotGiven = NOT_GIVEN,
577
- tax_id: Optional[str] | NotGiven = NOT_GIVEN,
578
- trial_period_days: Optional[int] | NotGiven = NOT_GIVEN,
572
+ addons: Optional[Iterable[AttachAddonParam]] | Omit = omit,
573
+ allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | Omit = omit,
574
+ billing_currency: Optional[Currency] | Omit = omit,
575
+ discount_code: Optional[str] | Omit = omit,
576
+ force_3ds: Optional[bool] | Omit = omit,
577
+ metadata: Dict[str, str] | Omit = omit,
578
+ on_demand: Optional[OnDemandSubscriptionParam] | Omit = omit,
579
+ payment_link: Optional[bool] | Omit = omit,
580
+ return_url: Optional[str] | Omit = omit,
581
+ show_saved_payment_methods: bool | Omit = omit,
582
+ tax_id: Optional[str] | Omit = omit,
583
+ trial_period_days: Optional[int] | Omit = omit,
579
584
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
580
585
  # The extra values given here take precedence over values defined on the client or passed to this method.
581
586
  extra_headers: Headers | None = None,
582
587
  extra_query: Query | None = None,
583
588
  extra_body: Body | None = None,
584
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
589
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
585
590
  ) -> SubscriptionCreateResponse:
586
591
  """
587
592
  Args:
@@ -607,6 +612,8 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
607
612
 
608
613
  discount_code: Discount Code to apply to the subscription
609
614
 
615
+ force_3ds: Override merchant default 3DS behaviour for this subscription
616
+
610
617
  metadata: Additional metadata for the subscription Defaults to empty if not specified
611
618
 
612
619
  payment_link: If true, generates a payment link. Defaults to false if not specified.
@@ -641,6 +648,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
641
648
  "allowed_payment_method_types": allowed_payment_method_types,
642
649
  "billing_currency": billing_currency,
643
650
  "discount_code": discount_code,
651
+ "force_3ds": force_3ds,
644
652
  "metadata": metadata,
645
653
  "on_demand": on_demand,
646
654
  "payment_link": payment_link,
@@ -666,7 +674,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
666
674
  extra_headers: Headers | None = None,
667
675
  extra_query: Query | None = None,
668
676
  extra_body: Body | None = None,
669
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
677
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
670
678
  ) -> Subscription:
671
679
  """
672
680
  Args:
@@ -692,19 +700,19 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
692
700
  self,
693
701
  subscription_id: str,
694
702
  *,
695
- billing: Optional[BillingAddressParam] | NotGiven = NOT_GIVEN,
696
- cancel_at_next_billing_date: Optional[bool] | NotGiven = NOT_GIVEN,
697
- disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
698
- metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
699
- next_billing_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
700
- status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
701
- tax_id: Optional[str] | NotGiven = NOT_GIVEN,
703
+ billing: Optional[BillingAddressParam] | Omit = omit,
704
+ cancel_at_next_billing_date: Optional[bool] | Omit = omit,
705
+ disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | Omit = omit,
706
+ metadata: Optional[Dict[str, str]] | Omit = omit,
707
+ next_billing_date: Union[str, datetime, None] | Omit = omit,
708
+ status: Optional[SubscriptionStatus] | Omit = omit,
709
+ tax_id: Optional[str] | Omit = omit,
702
710
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
703
711
  # The extra values given here take precedence over values defined on the client or passed to this method.
704
712
  extra_headers: Headers | None = None,
705
713
  extra_query: Query | None = None,
706
714
  extra_body: Body | None = None,
707
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
715
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
708
716
  ) -> Subscription:
709
717
  """
710
718
  Args:
@@ -743,19 +751,19 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
743
751
  def list(
744
752
  self,
745
753
  *,
746
- brand_id: str | NotGiven = NOT_GIVEN,
747
- created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
748
- created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
749
- customer_id: str | NotGiven = NOT_GIVEN,
750
- page_number: int | NotGiven = NOT_GIVEN,
751
- page_size: int | NotGiven = NOT_GIVEN,
752
- status: Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"] | NotGiven = NOT_GIVEN,
754
+ brand_id: str | Omit = omit,
755
+ created_at_gte: Union[str, datetime] | Omit = omit,
756
+ created_at_lte: Union[str, datetime] | Omit = omit,
757
+ customer_id: str | Omit = omit,
758
+ page_number: int | Omit = omit,
759
+ page_size: int | Omit = omit,
760
+ status: Literal["pending", "active", "on_hold", "cancelled", "failed", "expired"] | Omit = omit,
753
761
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
754
762
  # The extra values given here take precedence over values defined on the client or passed to this method.
755
763
  extra_headers: Headers | None = None,
756
764
  extra_query: Query | None = None,
757
765
  extra_body: Body | None = None,
758
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
766
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
759
767
  ) -> AsyncPaginator[SubscriptionListResponse, AsyncDefaultPageNumberPagination[SubscriptionListResponse]]:
760
768
  """
761
769
  Args:
@@ -812,13 +820,13 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
812
820
  product_id: str,
813
821
  proration_billing_mode: Literal["prorated_immediately", "full_immediately", "difference_immediately"],
814
822
  quantity: int,
815
- addons: Optional[Iterable[AttachAddonParam]] | NotGiven = NOT_GIVEN,
823
+ addons: Optional[Iterable[AttachAddonParam]] | Omit = omit,
816
824
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
817
825
  # The extra values given here take precedence over values defined on the client or passed to this method.
818
826
  extra_headers: Headers | None = None,
819
827
  extra_query: Query | None = None,
820
828
  extra_body: Body | None = None,
821
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
829
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
822
830
  ) -> None:
823
831
  """
824
832
  Args:
@@ -864,17 +872,17 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
864
872
  subscription_id: str,
865
873
  *,
866
874
  product_price: int,
867
- adaptive_currency_fees_inclusive: Optional[bool] | NotGiven = NOT_GIVEN,
868
- customer_balance_config: Optional[subscription_charge_params.CustomerBalanceConfig] | NotGiven = NOT_GIVEN,
869
- metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
870
- product_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
871
- product_description: Optional[str] | NotGiven = NOT_GIVEN,
875
+ adaptive_currency_fees_inclusive: Optional[bool] | Omit = omit,
876
+ customer_balance_config: Optional[subscription_charge_params.CustomerBalanceConfig] | Omit = omit,
877
+ metadata: Optional[Dict[str, str]] | Omit = omit,
878
+ product_currency: Optional[Currency] | Omit = omit,
879
+ product_description: Optional[str] | Omit = omit,
872
880
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
873
881
  # The extra values given here take precedence over values defined on the client or passed to this method.
874
882
  extra_headers: Headers | None = None,
875
883
  extra_query: Query | None = None,
876
884
  extra_body: Body | None = None,
877
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
885
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
878
886
  ) -> SubscriptionChargeResponse:
879
887
  """Args:
880
888
  product_price: The product price.
@@ -930,17 +938,17 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
930
938
  self,
931
939
  subscription_id: str,
932
940
  *,
933
- end_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
934
- meter_id: Optional[str] | NotGiven = NOT_GIVEN,
935
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
936
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
937
- start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
941
+ end_date: Union[str, datetime, None] | Omit = omit,
942
+ meter_id: Optional[str] | Omit = omit,
943
+ page_number: Optional[int] | Omit = omit,
944
+ page_size: Optional[int] | Omit = omit,
945
+ start_date: Union[str, datetime, None] | Omit = omit,
938
946
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
939
947
  # The extra values given here take precedence over values defined on the client or passed to this method.
940
948
  extra_headers: Headers | None = None,
941
949
  extra_query: Query | None = None,
942
950
  extra_body: Body | None = None,
943
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
951
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
944
952
  ) -> AsyncPaginator[
945
953
  SubscriptionRetrieveUsageHistoryResponse,
946
954
  AsyncDefaultPageNumberPagination[SubscriptionRetrieveUsageHistoryResponse],
@@ -8,7 +8,7 @@ from datetime import datetime
8
8
  import httpx
9
9
 
10
10
  from ..types import usage_event_list_params, usage_event_ingest_params
11
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
12
12
  from .._utils import maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -56,7 +56,7 @@ class UsageEventsResource(SyncAPIResource):
56
56
  extra_headers: Headers | None = None,
57
57
  extra_query: Query | None = None,
58
58
  extra_body: Body | None = None,
59
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
59
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
60
60
  ) -> Event:
61
61
  """Fetch detailed information about a single event using its unique event ID.
62
62
 
@@ -111,19 +111,19 @@ class UsageEventsResource(SyncAPIResource):
111
111
  def list(
112
112
  self,
113
113
  *,
114
- customer_id: str | NotGiven = NOT_GIVEN,
115
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
116
- event_name: str | NotGiven = NOT_GIVEN,
117
- meter_id: str | NotGiven = NOT_GIVEN,
118
- page_number: int | NotGiven = NOT_GIVEN,
119
- page_size: int | NotGiven = NOT_GIVEN,
120
- start: Union[str, datetime] | NotGiven = NOT_GIVEN,
114
+ customer_id: str | Omit = omit,
115
+ end: Union[str, datetime] | Omit = omit,
116
+ event_name: str | Omit = omit,
117
+ meter_id: str | Omit = omit,
118
+ page_number: int | Omit = omit,
119
+ page_size: int | Omit = omit,
120
+ start: Union[str, datetime] | Omit = omit,
121
121
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
122
122
  # The extra values given here take precedence over values defined on the client or passed to this method.
123
123
  extra_headers: Headers | None = None,
124
124
  extra_query: Query | None = None,
125
125
  extra_body: Body | None = None,
126
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
126
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
127
127
  ) -> SyncDefaultPageNumberPagination[Event]:
128
128
  """Fetch events from your account with powerful filtering capabilities.
129
129
 
@@ -219,7 +219,7 @@ class UsageEventsResource(SyncAPIResource):
219
219
  extra_headers: Headers | None = None,
220
220
  extra_query: Query | None = None,
221
221
  extra_body: Body | None = None,
222
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
222
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
223
223
  ) -> UsageEventIngestResponse:
224
224
  """
225
225
  This endpoint allows you to ingest custom events that can be used for:
@@ -311,7 +311,7 @@ class AsyncUsageEventsResource(AsyncAPIResource):
311
311
  extra_headers: Headers | None = None,
312
312
  extra_query: Query | None = None,
313
313
  extra_body: Body | None = None,
314
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
314
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
315
315
  ) -> Event:
316
316
  """Fetch detailed information about a single event using its unique event ID.
317
317
 
@@ -366,19 +366,19 @@ class AsyncUsageEventsResource(AsyncAPIResource):
366
366
  def list(
367
367
  self,
368
368
  *,
369
- customer_id: str | NotGiven = NOT_GIVEN,
370
- end: Union[str, datetime] | NotGiven = NOT_GIVEN,
371
- event_name: str | NotGiven = NOT_GIVEN,
372
- meter_id: str | NotGiven = NOT_GIVEN,
373
- page_number: int | NotGiven = NOT_GIVEN,
374
- page_size: int | NotGiven = NOT_GIVEN,
375
- start: Union[str, datetime] | NotGiven = NOT_GIVEN,
369
+ customer_id: str | Omit = omit,
370
+ end: Union[str, datetime] | Omit = omit,
371
+ event_name: str | Omit = omit,
372
+ meter_id: str | Omit = omit,
373
+ page_number: int | Omit = omit,
374
+ page_size: int | Omit = omit,
375
+ start: Union[str, datetime] | Omit = omit,
376
376
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
377
377
  # The extra values given here take precedence over values defined on the client or passed to this method.
378
378
  extra_headers: Headers | None = None,
379
379
  extra_query: Query | None = None,
380
380
  extra_body: Body | None = None,
381
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
381
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
382
382
  ) -> AsyncPaginator[Event, AsyncDefaultPageNumberPagination[Event]]:
383
383
  """Fetch events from your account with powerful filtering capabilities.
384
384
 
@@ -474,7 +474,7 @@ class AsyncUsageEventsResource(AsyncAPIResource):
474
474
  extra_headers: Headers | None = None,
475
475
  extra_query: Query | None = None,
476
476
  extra_body: Body | None = None,
477
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
477
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
478
478
  ) -> UsageEventIngestResponse:
479
479
  """
480
480
  This endpoint allows you to ingest custom events that can be used for:
@@ -6,7 +6,7 @@ from typing import Dict
6
6
 
7
7
  import httpx
8
8
 
9
- from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
9
+ from ..._types import Body, Query, Headers, NoneType, NotGiven, not_given
10
10
  from ..._utils import maybe_transform, async_maybe_transform
11
11
  from ..._compat import cached_property
12
12
  from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -52,7 +52,7 @@ class HeadersResource(SyncAPIResource):
52
52
  extra_headers: Headers | None = None,
53
53
  extra_query: Query | None = None,
54
54
  extra_body: Body | None = None,
55
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
55
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
56
56
  ) -> HeaderRetrieveResponse:
57
57
  """
58
58
  Get a webhook by id
@@ -86,7 +86,7 @@ class HeadersResource(SyncAPIResource):
86
86
  extra_headers: Headers | None = None,
87
87
  extra_query: Query | None = None,
88
88
  extra_body: Body | None = None,
89
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
89
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
90
90
  ) -> None:
91
91
  """
92
92
  Patch a webhook by id
@@ -144,7 +144,7 @@ class AsyncHeadersResource(AsyncAPIResource):
144
144
  extra_headers: Headers | None = None,
145
145
  extra_query: Query | None = None,
146
146
  extra_body: Body | None = None,
147
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
147
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
148
148
  ) -> HeaderRetrieveResponse:
149
149
  """
150
150
  Get a webhook by id
@@ -178,7 +178,7 @@ class AsyncHeadersResource(AsyncAPIResource):
178
178
  extra_headers: Headers | None = None,
179
179
  extra_query: Query | None = None,
180
180
  extra_body: Body | None = None,
181
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
181
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
182
182
  ) -> None:
183
183
  """
184
184
  Patch a webhook by id