dodopayments 1.34.3__py3-none-any.whl → 1.37.1__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 (62) hide show
  1. dodopayments/_version.py +1 -1
  2. dodopayments/resources/addons.py +16 -12
  3. dodopayments/resources/customers/customer_portal.py +2 -4
  4. dodopayments/resources/customers/customers.py +12 -4
  5. dodopayments/resources/discounts.py +16 -6
  6. dodopayments/resources/disputes.py +35 -18
  7. dodopayments/resources/license_keys.py +12 -12
  8. dodopayments/resources/payments.py +67 -24
  9. dodopayments/resources/payouts.py +4 -6
  10. dodopayments/resources/products/images.py +2 -4
  11. dodopayments/resources/products/products.py +46 -16
  12. dodopayments/resources/refunds.py +14 -14
  13. dodopayments/resources/subscriptions.py +44 -14
  14. dodopayments/resources/webhook_events.py +42 -23
  15. dodopayments/types/__init__.py +1 -0
  16. dodopayments/types/addon_create_params.py +2 -4
  17. dodopayments/types/addon_list_params.py +2 -3
  18. dodopayments/types/addon_response.py +2 -4
  19. dodopayments/types/addon_update_params.py +2 -4
  20. dodopayments/types/billing_address.py +1 -1
  21. dodopayments/types/billing_address_param.py +1 -1
  22. dodopayments/types/customer_list_params.py +5 -3
  23. dodopayments/types/customers/customer_portal_create_params.py +1 -2
  24. dodopayments/types/discount.py +1 -0
  25. dodopayments/types/discount_create_params.py +1 -0
  26. dodopayments/types/discount_list_params.py +2 -3
  27. dodopayments/types/discount_update_params.py +1 -0
  28. dodopayments/types/dispute.py +2 -0
  29. dodopayments/types/dispute_list_params.py +17 -11
  30. dodopayments/types/dispute_list_response.py +2 -0
  31. dodopayments/types/dispute_retrieve_response.py +3 -0
  32. dodopayments/types/license_key.py +1 -0
  33. dodopayments/types/license_key_list_params.py +6 -9
  34. dodopayments/types/payment.py +11 -1
  35. dodopayments/types/payment_create_params.py +10 -0
  36. dodopayments/types/payment_create_response.py +6 -0
  37. dodopayments/types/payment_list_params.py +22 -11
  38. dodopayments/types/payout_list_params.py +2 -3
  39. dodopayments/types/payout_list_response.py +2 -0
  40. dodopayments/types/price.py +6 -3
  41. dodopayments/types/price_param.py +4 -0
  42. dodopayments/types/product.py +3 -4
  43. dodopayments/types/product_create_params.py +8 -4
  44. dodopayments/types/product_list_params.py +4 -5
  45. dodopayments/types/product_list_response.py +3 -4
  46. dodopayments/types/product_update_params.py +8 -4
  47. dodopayments/types/products/image_update_params.py +1 -2
  48. dodopayments/types/refund.py +2 -0
  49. dodopayments/types/refund_list_params.py +8 -9
  50. dodopayments/types/subscription.py +7 -0
  51. dodopayments/types/subscription_change_plan_params.py +1 -0
  52. dodopayments/types/subscription_charge_params.py +4 -0
  53. dodopayments/types/subscription_create_params.py +7 -0
  54. dodopayments/types/subscription_create_response.py +6 -0
  55. dodopayments/types/subscription_list_params.py +9 -10
  56. dodopayments/types/subscription_list_response.py +7 -0
  57. dodopayments/types/webhook_event_list_params.py +11 -8
  58. dodopayments/types/webhook_event_type.py +30 -0
  59. {dodopayments-1.34.3.dist-info → dodopayments-1.37.1.dist-info}/METADATA +1 -1
  60. {dodopayments-1.34.3.dist-info → dodopayments-1.37.1.dist-info}/RECORD +62 -61
  61. {dodopayments-1.34.3.dist-info → dodopayments-1.37.1.dist-info}/WHEEL +0 -0
  62. {dodopayments-1.34.3.dist-info → dodopayments-1.37.1.dist-info}/licenses/LICENSE +0 -0
@@ -90,8 +90,9 @@ class ProductsResource(SyncAPIResource):
90
90
  ) -> Product:
91
91
  """
92
92
  Args:
93
- tax_category: Represents the different categories of taxation applicable to various products
94
- and services.
93
+ price: Price configuration for the product
94
+
95
+ tax_category: Tax category applied to this product
95
96
 
96
97
  addons: Addons available for subscription product
97
98
 
@@ -99,10 +100,16 @@ class ProductsResource(SyncAPIResource):
99
100
 
100
101
  description: Optional description of the product
101
102
 
103
+ digital_product_delivery: Choose how you would like you digital product delivered
104
+
102
105
  license_key_activation_message: Optional message displayed during license key activation
103
106
 
104
107
  license_key_activations_limit: The number of times the license key can be activated. Must be 0 or greater
105
108
 
109
+ license_key_duration: Duration configuration for the license key. Set to null if you don't want the
110
+ license key to expire. For subscriptions, the lifetime of the license key is
111
+ tied to the subscription period
112
+
106
113
  license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
107
114
 
108
115
  name: Optional name of the product
@@ -199,6 +206,8 @@ class ProductsResource(SyncAPIResource):
199
206
 
200
207
  description: Description of the product, optional and must be at most 1000 characters.
201
208
 
209
+ digital_product_delivery: Choose how you would like you digital product delivered
210
+
202
211
  image_id: Product image id after its uploaded to S3
203
212
 
204
213
  license_key_activation_message: Message sent to the customer upon license key activation.
@@ -211,6 +220,11 @@ class ProductsResource(SyncAPIResource):
211
220
  Only applicable if `license_key_enabled` is `true`. Represents the maximum
212
221
  number of times the license key can be activated.
213
222
 
223
+ license_key_duration: Duration of the license key if enabled.
224
+
225
+ Only applicable if `license_key_enabled` is `true`. Represents the duration in
226
+ days for which the license key is valid.
227
+
214
228
  license_key_enabled: Whether the product requires a license key.
215
229
 
216
230
  If `true`, additional fields related to license key (duration, activations
@@ -218,8 +232,9 @@ class ProductsResource(SyncAPIResource):
218
232
 
219
233
  name: Name of the product, optional and must be at most 100 characters.
220
234
 
221
- tax_category: Represents the different categories of taxation applicable to various products
222
- and services.
235
+ price: Price details of the product.
236
+
237
+ tax_category: Tax category of the product.
223
238
 
224
239
  extra_headers: Send extra headers
225
240
 
@@ -261,10 +276,10 @@ class ProductsResource(SyncAPIResource):
261
276
  self,
262
277
  *,
263
278
  archived: bool | NotGiven = NOT_GIVEN,
264
- brand_id: Optional[str] | NotGiven = NOT_GIVEN,
265
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
266
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
267
- recurring: Optional[bool] | NotGiven = NOT_GIVEN,
279
+ brand_id: str | NotGiven = NOT_GIVEN,
280
+ page_number: int | NotGiven = NOT_GIVEN,
281
+ page_size: int | NotGiven = NOT_GIVEN,
282
+ recurring: bool | NotGiven = NOT_GIVEN,
268
283
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
269
284
  # The extra values given here take precedence over values defined on the client or passed to this method.
270
285
  extra_headers: Headers | None = None,
@@ -464,8 +479,9 @@ class AsyncProductsResource(AsyncAPIResource):
464
479
  ) -> Product:
465
480
  """
466
481
  Args:
467
- tax_category: Represents the different categories of taxation applicable to various products
468
- and services.
482
+ price: Price configuration for the product
483
+
484
+ tax_category: Tax category applied to this product
469
485
 
470
486
  addons: Addons available for subscription product
471
487
 
@@ -473,10 +489,16 @@ class AsyncProductsResource(AsyncAPIResource):
473
489
 
474
490
  description: Optional description of the product
475
491
 
492
+ digital_product_delivery: Choose how you would like you digital product delivered
493
+
476
494
  license_key_activation_message: Optional message displayed during license key activation
477
495
 
478
496
  license_key_activations_limit: The number of times the license key can be activated. Must be 0 or greater
479
497
 
498
+ license_key_duration: Duration configuration for the license key. Set to null if you don't want the
499
+ license key to expire. For subscriptions, the lifetime of the license key is
500
+ tied to the subscription period
501
+
480
502
  license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
481
503
 
482
504
  name: Optional name of the product
@@ -573,6 +595,8 @@ class AsyncProductsResource(AsyncAPIResource):
573
595
 
574
596
  description: Description of the product, optional and must be at most 1000 characters.
575
597
 
598
+ digital_product_delivery: Choose how you would like you digital product delivered
599
+
576
600
  image_id: Product image id after its uploaded to S3
577
601
 
578
602
  license_key_activation_message: Message sent to the customer upon license key activation.
@@ -585,6 +609,11 @@ class AsyncProductsResource(AsyncAPIResource):
585
609
  Only applicable if `license_key_enabled` is `true`. Represents the maximum
586
610
  number of times the license key can be activated.
587
611
 
612
+ license_key_duration: Duration of the license key if enabled.
613
+
614
+ Only applicable if `license_key_enabled` is `true`. Represents the duration in
615
+ days for which the license key is valid.
616
+
588
617
  license_key_enabled: Whether the product requires a license key.
589
618
 
590
619
  If `true`, additional fields related to license key (duration, activations
@@ -592,8 +621,9 @@ class AsyncProductsResource(AsyncAPIResource):
592
621
 
593
622
  name: Name of the product, optional and must be at most 100 characters.
594
623
 
595
- tax_category: Represents the different categories of taxation applicable to various products
596
- and services.
624
+ price: Price details of the product.
625
+
626
+ tax_category: Tax category of the product.
597
627
 
598
628
  extra_headers: Send extra headers
599
629
 
@@ -635,10 +665,10 @@ class AsyncProductsResource(AsyncAPIResource):
635
665
  self,
636
666
  *,
637
667
  archived: bool | NotGiven = NOT_GIVEN,
638
- brand_id: Optional[str] | NotGiven = NOT_GIVEN,
639
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
640
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
641
- recurring: Optional[bool] | NotGiven = NOT_GIVEN,
668
+ brand_id: str | NotGiven = NOT_GIVEN,
669
+ page_number: int | NotGiven = NOT_GIVEN,
670
+ page_size: int | NotGiven = NOT_GIVEN,
671
+ recurring: bool | NotGiven = NOT_GIVEN,
642
672
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
643
673
  # The extra values given here take precedence over values defined on the client or passed to this method.
644
674
  extra_headers: Headers | None = None,
@@ -4,10 +4,11 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Union, Iterable, Optional
6
6
  from datetime import datetime
7
+ from typing_extensions import Literal
7
8
 
8
9
  import httpx
9
10
 
10
- from ..types import RefundStatus, refund_list_params, refund_create_params
11
+ from ..types import refund_list_params, refund_create_params
11
12
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
13
  from .._utils import maybe_transform, async_maybe_transform
13
14
  from .._compat import cached_property
@@ -21,7 +22,6 @@ from .._response import (
21
22
  from ..pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumberPagination
22
23
  from .._base_client import AsyncPaginator, make_request_options
23
24
  from ..types.refund import Refund
24
- from ..types.refund_status import RefundStatus
25
25
 
26
26
  __all__ = ["RefundsResource", "AsyncRefundsResource"]
27
27
 
@@ -125,12 +125,12 @@ class RefundsResource(SyncAPIResource):
125
125
  def list(
126
126
  self,
127
127
  *,
128
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
129
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
130
- customer_id: Optional[str] | NotGiven = NOT_GIVEN,
131
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
132
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
133
- status: Optional[RefundStatus] | NotGiven = NOT_GIVEN,
128
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
129
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
130
+ customer_id: str | NotGiven = NOT_GIVEN,
131
+ page_number: int | NotGiven = NOT_GIVEN,
132
+ page_size: int | NotGiven = NOT_GIVEN,
133
+ status: Literal["succeeded", "failed", "pending", "review"] | NotGiven = NOT_GIVEN,
134
134
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
135
135
  # The extra values given here take precedence over values defined on the client or passed to this method.
136
136
  extra_headers: Headers | None = None,
@@ -283,12 +283,12 @@ class AsyncRefundsResource(AsyncAPIResource):
283
283
  def list(
284
284
  self,
285
285
  *,
286
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
287
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
288
- customer_id: Optional[str] | NotGiven = NOT_GIVEN,
289
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
290
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
291
- status: Optional[RefundStatus] | NotGiven = NOT_GIVEN,
286
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
287
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
288
+ customer_id: str | NotGiven = NOT_GIVEN,
289
+ page_number: int | NotGiven = NOT_GIVEN,
290
+ page_size: int | NotGiven = NOT_GIVEN,
291
+ status: Literal["succeeded", "failed", "pending", "review"] | NotGiven = NOT_GIVEN,
292
292
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
293
293
  # The extra values given here take precedence over values defined on the client or passed to this method.
294
294
  extra_headers: Headers | None = None,
@@ -112,6 +112,10 @@ class SubscriptionsResource(SyncAPIResource):
112
112
  ) -> SubscriptionCreateResponse:
113
113
  """
114
114
  Args:
115
+ billing: Billing address information for the subscription
116
+
117
+ customer: Customer details for the subscription
118
+
115
119
  product_id: Unique identifier of the product to subscribe to
116
120
 
117
121
  quantity: Number of units to subscribe for. Must be at least 1.
@@ -125,8 +129,13 @@ class SubscriptionsResource(SyncAPIResource):
125
129
  Availability still depends on other factors (e.g., customer location, merchant
126
130
  settings).
127
131
 
132
+ billing_currency: Fix the currency in which the end customer is billed. If Dodo Payments cannot
133
+ support that currency for this transaction, it will not proceed
134
+
128
135
  discount_code: Discount Code to apply to the subscription
129
136
 
137
+ metadata: Additional metadata for the subscription Defaults to empty if not specified
138
+
130
139
  payment_link: If true, generates a payment link. Defaults to false if not specified.
131
140
 
132
141
  return_url: Optional URL to redirect after successful subscription creation
@@ -257,13 +266,14 @@ class SubscriptionsResource(SyncAPIResource):
257
266
  def list(
258
267
  self,
259
268
  *,
260
- brand_id: Optional[str] | NotGiven = NOT_GIVEN,
261
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
262
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
263
- customer_id: Optional[str] | NotGiven = NOT_GIVEN,
264
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
265
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
266
- status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
269
+ brand_id: str | NotGiven = NOT_GIVEN,
270
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
271
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
272
+ customer_id: str | NotGiven = NOT_GIVEN,
273
+ page_number: int | NotGiven = NOT_GIVEN,
274
+ page_size: int | NotGiven = NOT_GIVEN,
275
+ status: Literal["pending", "active", "on_hold", "paused", "cancelled", "failed", "expired"]
276
+ | NotGiven = NOT_GIVEN,
267
277
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
268
278
  # The extra values given here take precedence over values defined on the client or passed to this method.
269
279
  extra_headers: Headers | None = None,
@@ -338,6 +348,8 @@ class SubscriptionsResource(SyncAPIResource):
338
348
  Args:
339
349
  product_id: Unique identifier of the product to subscribe to
340
350
 
351
+ proration_billing_mode: Proration Billing Mode
352
+
341
353
  quantity: Number of units to subscribe for. Must be at least 1.
342
354
 
343
355
  addons: Addons for the new plan. Note : Leaving this empty would remove any existing
@@ -390,6 +402,9 @@ class SubscriptionsResource(SyncAPIResource):
390
402
  Represented in the lowest denomination of the currency (e.g.,
391
403
  cents for USD). For example, to charge $1.00, pass `100`.
392
404
 
405
+ metadata: Metadata for the payment. If not passed, the metadata of the subscription will
406
+ be taken
407
+
393
408
  extra_headers: Send extra headers
394
409
 
395
410
  extra_query: Add additional query parameters to the request
@@ -487,6 +502,10 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
487
502
  ) -> SubscriptionCreateResponse:
488
503
  """
489
504
  Args:
505
+ billing: Billing address information for the subscription
506
+
507
+ customer: Customer details for the subscription
508
+
490
509
  product_id: Unique identifier of the product to subscribe to
491
510
 
492
511
  quantity: Number of units to subscribe for. Must be at least 1.
@@ -500,8 +519,13 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
500
519
  Availability still depends on other factors (e.g., customer location, merchant
501
520
  settings).
502
521
 
522
+ billing_currency: Fix the currency in which the end customer is billed. If Dodo Payments cannot
523
+ support that currency for this transaction, it will not proceed
524
+
503
525
  discount_code: Discount Code to apply to the subscription
504
526
 
527
+ metadata: Additional metadata for the subscription Defaults to empty if not specified
528
+
505
529
  payment_link: If true, generates a payment link. Defaults to false if not specified.
506
530
 
507
531
  return_url: Optional URL to redirect after successful subscription creation
@@ -632,13 +656,14 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
632
656
  def list(
633
657
  self,
634
658
  *,
635
- brand_id: Optional[str] | NotGiven = NOT_GIVEN,
636
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
637
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
638
- customer_id: Optional[str] | NotGiven = NOT_GIVEN,
639
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
640
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
641
- status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
659
+ brand_id: str | NotGiven = NOT_GIVEN,
660
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
661
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
662
+ customer_id: str | NotGiven = NOT_GIVEN,
663
+ page_number: int | NotGiven = NOT_GIVEN,
664
+ page_size: int | NotGiven = NOT_GIVEN,
665
+ status: Literal["pending", "active", "on_hold", "paused", "cancelled", "failed", "expired"]
666
+ | NotGiven = NOT_GIVEN,
642
667
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
643
668
  # The extra values given here take precedence over values defined on the client or passed to this method.
644
669
  extra_headers: Headers | None = None,
@@ -713,6 +738,8 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
713
738
  Args:
714
739
  product_id: Unique identifier of the product to subscribe to
715
740
 
741
+ proration_billing_mode: Proration Billing Mode
742
+
716
743
  quantity: Number of units to subscribe for. Must be at least 1.
717
744
 
718
745
  addons: Addons for the new plan. Note : Leaving this empty would remove any existing
@@ -765,6 +792,9 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
765
792
  Represented in the lowest denomination of the currency (e.g.,
766
793
  cents for USD). For example, to charge $1.00, pass `100`.
767
794
 
795
+ metadata: Metadata for the payment. If not passed, the metadata of the subscription will
796
+ be taken
797
+
768
798
  extra_headers: Send extra headers
769
799
 
770
800
  extra_query: Add additional query parameters to the request
@@ -2,7 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Optional
5
+ import typing_extensions
6
+ from typing import Union
6
7
  from datetime import datetime
7
8
 
8
9
  import httpx
@@ -45,6 +46,7 @@ class WebhookEventsResource(SyncAPIResource):
45
46
  """
46
47
  return WebhookEventsResourceWithStreamingResponse(self)
47
48
 
49
+ @typing_extensions.deprecated("deprecated")
48
50
  def retrieve(
49
51
  self,
50
52
  webhook_event_id: str,
@@ -79,13 +81,14 @@ class WebhookEventsResource(SyncAPIResource):
79
81
  def list(
80
82
  self,
81
83
  *,
82
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
83
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
84
- limit: Optional[int] | NotGiven = NOT_GIVEN,
85
- object_id: Optional[str] | NotGiven = NOT_GIVEN,
86
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
87
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
88
- webhook_id: Optional[str] | NotGiven = NOT_GIVEN,
84
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
85
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
86
+ limit: int | NotGiven = NOT_GIVEN,
87
+ object_id: str | NotGiven = NOT_GIVEN,
88
+ page_number: int | NotGiven = NOT_GIVEN,
89
+ page_size: int | NotGiven = NOT_GIVEN,
90
+ webhook_event_id: str | NotGiven = NOT_GIVEN,
91
+ webhook_id: str | NotGiven = NOT_GIVEN,
89
92
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
90
93
  # The extra values given here take precedence over values defined on the client or passed to this method.
91
94
  extra_headers: Headers | None = None,
@@ -107,6 +110,8 @@ class WebhookEventsResource(SyncAPIResource):
107
110
 
108
111
  page_size: Page size default is 10 max is 100
109
112
 
113
+ webhook_event_id: Filter by webhook event id
114
+
110
115
  webhook_id: Filter by webhook destination
111
116
 
112
117
  extra_headers: Send extra headers
@@ -133,6 +138,7 @@ class WebhookEventsResource(SyncAPIResource):
133
138
  "object_id": object_id,
134
139
  "page_number": page_number,
135
140
  "page_size": page_size,
141
+ "webhook_event_id": webhook_event_id,
136
142
  "webhook_id": webhook_id,
137
143
  },
138
144
  webhook_event_list_params.WebhookEventListParams,
@@ -162,6 +168,7 @@ class AsyncWebhookEventsResource(AsyncAPIResource):
162
168
  """
163
169
  return AsyncWebhookEventsResourceWithStreamingResponse(self)
164
170
 
171
+ @typing_extensions.deprecated("deprecated")
165
172
  async def retrieve(
166
173
  self,
167
174
  webhook_event_id: str,
@@ -196,13 +203,14 @@ class AsyncWebhookEventsResource(AsyncAPIResource):
196
203
  def list(
197
204
  self,
198
205
  *,
199
- created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
200
- created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
201
- limit: Optional[int] | NotGiven = NOT_GIVEN,
202
- object_id: Optional[str] | NotGiven = NOT_GIVEN,
203
- page_number: Optional[int] | NotGiven = NOT_GIVEN,
204
- page_size: Optional[int] | NotGiven = NOT_GIVEN,
205
- webhook_id: Optional[str] | NotGiven = NOT_GIVEN,
206
+ created_at_gte: Union[str, datetime] | NotGiven = NOT_GIVEN,
207
+ created_at_lte: Union[str, datetime] | NotGiven = NOT_GIVEN,
208
+ limit: int | NotGiven = NOT_GIVEN,
209
+ object_id: str | NotGiven = NOT_GIVEN,
210
+ page_number: int | NotGiven = NOT_GIVEN,
211
+ page_size: int | NotGiven = NOT_GIVEN,
212
+ webhook_event_id: str | NotGiven = NOT_GIVEN,
213
+ webhook_id: str | NotGiven = NOT_GIVEN,
206
214
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
207
215
  # The extra values given here take precedence over values defined on the client or passed to this method.
208
216
  extra_headers: Headers | None = None,
@@ -224,6 +232,8 @@ class AsyncWebhookEventsResource(AsyncAPIResource):
224
232
 
225
233
  page_size: Page size default is 10 max is 100
226
234
 
235
+ webhook_event_id: Filter by webhook event id
236
+
227
237
  webhook_id: Filter by webhook destination
228
238
 
229
239
  extra_headers: Send extra headers
@@ -250,6 +260,7 @@ class AsyncWebhookEventsResource(AsyncAPIResource):
250
260
  "object_id": object_id,
251
261
  "page_number": page_number,
252
262
  "page_size": page_size,
263
+ "webhook_event_id": webhook_event_id,
253
264
  "webhook_id": webhook_id,
254
265
  },
255
266
  webhook_event_list_params.WebhookEventListParams,
@@ -263,8 +274,10 @@ class WebhookEventsResourceWithRawResponse:
263
274
  def __init__(self, webhook_events: WebhookEventsResource) -> None:
264
275
  self._webhook_events = webhook_events
265
276
 
266
- self.retrieve = to_raw_response_wrapper(
267
- webhook_events.retrieve,
277
+ self.retrieve = ( # pyright: ignore[reportDeprecated]
278
+ to_raw_response_wrapper(
279
+ webhook_events.retrieve # pyright: ignore[reportDeprecated],
280
+ )
268
281
  )
269
282
  self.list = to_raw_response_wrapper(
270
283
  webhook_events.list,
@@ -275,8 +288,10 @@ class AsyncWebhookEventsResourceWithRawResponse:
275
288
  def __init__(self, webhook_events: AsyncWebhookEventsResource) -> None:
276
289
  self._webhook_events = webhook_events
277
290
 
278
- self.retrieve = async_to_raw_response_wrapper(
279
- webhook_events.retrieve,
291
+ self.retrieve = ( # pyright: ignore[reportDeprecated]
292
+ async_to_raw_response_wrapper(
293
+ webhook_events.retrieve # pyright: ignore[reportDeprecated],
294
+ )
280
295
  )
281
296
  self.list = async_to_raw_response_wrapper(
282
297
  webhook_events.list,
@@ -287,8 +302,10 @@ class WebhookEventsResourceWithStreamingResponse:
287
302
  def __init__(self, webhook_events: WebhookEventsResource) -> None:
288
303
  self._webhook_events = webhook_events
289
304
 
290
- self.retrieve = to_streamed_response_wrapper(
291
- webhook_events.retrieve,
305
+ self.retrieve = ( # pyright: ignore[reportDeprecated]
306
+ to_streamed_response_wrapper(
307
+ webhook_events.retrieve # pyright: ignore[reportDeprecated],
308
+ )
292
309
  )
293
310
  self.list = to_streamed_response_wrapper(
294
311
  webhook_events.list,
@@ -299,8 +316,10 @@ class AsyncWebhookEventsResourceWithStreamingResponse:
299
316
  def __init__(self, webhook_events: AsyncWebhookEventsResource) -> None:
300
317
  self._webhook_events = webhook_events
301
318
 
302
- self.retrieve = async_to_streamed_response_wrapper(
303
- webhook_events.retrieve,
319
+ self.retrieve = ( # pyright: ignore[reportDeprecated]
320
+ async_to_streamed_response_wrapper(
321
+ webhook_events.retrieve # pyright: ignore[reportDeprecated],
322
+ )
304
323
  )
305
324
  self.list = async_to_streamed_response_wrapper(
306
325
  webhook_events.list,
@@ -28,6 +28,7 @@ from .addon_list_params import AddonListParams as AddonListParams
28
28
  from .license_key_status import LicenseKeyStatus as LicenseKeyStatus
29
29
  from .payout_list_params import PayoutListParams as PayoutListParams
30
30
  from .refund_list_params import RefundListParams as RefundListParams
31
+ from .webhook_event_type import WebhookEventType as WebhookEventType
31
32
  from .addon_create_params import AddonCreateParams as AddonCreateParams
32
33
  from .addon_update_params import AddonUpdateParams as AddonUpdateParams
33
34
  from .brand_create_params import BrandCreateParams as BrandCreateParams
@@ -13,6 +13,7 @@ __all__ = ["AddonCreateParams"]
13
13
 
14
14
  class AddonCreateParams(TypedDict, total=False):
15
15
  currency: Required[Currency]
16
+ """The currency of the Addon"""
16
17
 
17
18
  name: Required[str]
18
19
  """Name of the Addon"""
@@ -21,10 +22,7 @@ class AddonCreateParams(TypedDict, total=False):
21
22
  """Amount of the addon"""
22
23
 
23
24
  tax_category: Required[TaxCategory]
24
- """
25
- Represents the different categories of taxation applicable to various products
26
- and services.
27
- """
25
+ """Tax category applied to this Addon"""
28
26
 
29
27
  description: Optional[str]
30
28
  """Optional description of the Addon"""
@@ -2,15 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
5
  from typing_extensions import TypedDict
7
6
 
8
7
  __all__ = ["AddonListParams"]
9
8
 
10
9
 
11
10
  class AddonListParams(TypedDict, total=False):
12
- page_number: Optional[int]
11
+ page_number: int
13
12
  """Page number default is 0"""
14
13
 
15
- page_size: Optional[int]
14
+ page_size: int
16
15
  """Page size default is 10 max is 100"""
@@ -21,6 +21,7 @@ class AddonResponse(BaseModel):
21
21
  """Created time"""
22
22
 
23
23
  currency: Currency
24
+ """Currency of the Addon"""
24
25
 
25
26
  name: str
26
27
  """Name of the Addon"""
@@ -29,10 +30,7 @@ class AddonResponse(BaseModel):
29
30
  """Amount of the addon"""
30
31
 
31
32
  tax_category: TaxCategory
32
- """
33
- Represents the different categories of taxation applicable to various products
34
- and services.
35
- """
33
+ """Tax category applied to this Addon"""
36
34
 
37
35
  updated_at: datetime
38
36
  """Updated time"""
@@ -13,6 +13,7 @@ __all__ = ["AddonUpdateParams"]
13
13
 
14
14
  class AddonUpdateParams(TypedDict, total=False):
15
15
  currency: Optional[Currency]
16
+ """The currency of the Addon"""
16
17
 
17
18
  description: Optional[str]
18
19
  """Description of the Addon, optional and must be at most 1000 characters."""
@@ -27,7 +28,4 @@ class AddonUpdateParams(TypedDict, total=False):
27
28
  """Amount of the addon"""
28
29
 
29
30
  tax_category: Optional[TaxCategory]
30
- """
31
- Represents the different categories of taxation applicable to various products
32
- and services.
33
- """
31
+ """Tax category of the Addon."""
@@ -11,7 +11,7 @@ class BillingAddress(BaseModel):
11
11
  """City name"""
12
12
 
13
13
  country: CountryCode
14
- """ISO country code alpha2 variant"""
14
+ """Two-letter ISO country code (ISO 3166-1 alpha-2)"""
15
15
 
16
16
  state: str
17
17
  """State or province name"""
@@ -14,7 +14,7 @@ class BillingAddressParam(TypedDict, total=False):
14
14
  """City name"""
15
15
 
16
16
  country: Required[CountryCode]
17
- """ISO country code alpha2 variant"""
17
+ """Two-letter ISO country code (ISO 3166-1 alpha-2)"""
18
18
 
19
19
  state: Required[str]
20
20
  """State or province name"""
@@ -2,15 +2,17 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
5
  from typing_extensions import TypedDict
7
6
 
8
7
  __all__ = ["CustomerListParams"]
9
8
 
10
9
 
11
10
  class CustomerListParams(TypedDict, total=False):
12
- page_number: Optional[int]
11
+ email: str
12
+ """Filter by customer email"""
13
+
14
+ page_number: int
13
15
  """Page number default is 0"""
14
16
 
15
- page_size: Optional[int]
17
+ page_size: int
16
18
  """Page size default is 10 max is 100"""
@@ -2,12 +2,11 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
5
  from typing_extensions import TypedDict
7
6
 
8
7
  __all__ = ["CustomerPortalCreateParams"]
9
8
 
10
9
 
11
10
  class CustomerPortalCreateParams(TypedDict, total=False):
12
- send_email: Optional[bool]
11
+ send_email: bool
13
12
  """If true, will send link to user."""
@@ -37,6 +37,7 @@ class Discount(BaseModel):
37
37
  """How many times this discount has been used."""
38
38
 
39
39
  type: DiscountType
40
+ """The type of discount, e.g. `percentage`, `flat`, or `flat_per_unit`."""
40
41
 
41
42
  expires_at: Optional[datetime] = None
42
43
  """Optional date/time after which discount is expired."""
@@ -25,6 +25,7 @@ class DiscountCreateParams(TypedDict, total=False):
25
25
  """
26
26
 
27
27
  type: Required[DiscountType]
28
+ """The discount type (e.g. `percentage`, `flat`, or `flat_per_unit`)."""
28
29
 
29
30
  code: Optional[str]
30
31
  """Optionally supply a code (will be uppercased).