dodopayments 1.34.2__py3-none-any.whl → 1.37.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.
Files changed (60) 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/addon_create_params.py +2 -4
  16. dodopayments/types/addon_list_params.py +2 -3
  17. dodopayments/types/addon_response.py +2 -4
  18. dodopayments/types/addon_update_params.py +2 -4
  19. dodopayments/types/billing_address.py +1 -1
  20. dodopayments/types/billing_address_param.py +1 -1
  21. dodopayments/types/customer_list_params.py +5 -3
  22. dodopayments/types/customers/customer_portal_create_params.py +1 -2
  23. dodopayments/types/discount.py +1 -0
  24. dodopayments/types/discount_create_params.py +1 -0
  25. dodopayments/types/discount_list_params.py +2 -3
  26. dodopayments/types/discount_update_params.py +1 -0
  27. dodopayments/types/dispute.py +2 -0
  28. dodopayments/types/dispute_list_params.py +17 -11
  29. dodopayments/types/dispute_list_response.py +2 -0
  30. dodopayments/types/dispute_retrieve_response.py +3 -0
  31. dodopayments/types/license_key.py +1 -0
  32. dodopayments/types/license_key_list_params.py +6 -9
  33. dodopayments/types/payment.py +11 -1
  34. dodopayments/types/payment_create_params.py +10 -0
  35. dodopayments/types/payment_create_response.py +6 -0
  36. dodopayments/types/payment_list_params.py +22 -11
  37. dodopayments/types/payout_list_params.py +2 -3
  38. dodopayments/types/payout_list_response.py +2 -0
  39. dodopayments/types/price.py +6 -3
  40. dodopayments/types/price_param.py +4 -0
  41. dodopayments/types/product.py +3 -4
  42. dodopayments/types/product_create_params.py +8 -4
  43. dodopayments/types/product_list_params.py +4 -5
  44. dodopayments/types/product_list_response.py +3 -4
  45. dodopayments/types/product_update_params.py +8 -4
  46. dodopayments/types/products/image_update_params.py +1 -2
  47. dodopayments/types/refund.py +2 -0
  48. dodopayments/types/refund_list_params.py +8 -9
  49. dodopayments/types/subscription.py +7 -0
  50. dodopayments/types/subscription_change_plan_params.py +1 -0
  51. dodopayments/types/subscription_charge_params.py +4 -0
  52. dodopayments/types/subscription_create_params.py +7 -0
  53. dodopayments/types/subscription_create_response.py +6 -0
  54. dodopayments/types/subscription_list_params.py +9 -10
  55. dodopayments/types/subscription_list_response.py +7 -0
  56. dodopayments/types/webhook_event_list_params.py +11 -8
  57. {dodopayments-1.34.2.dist-info → dodopayments-1.37.0.dist-info}/METADATA +1 -1
  58. {dodopayments-1.34.2.dist-info → dodopayments-1.37.0.dist-info}/RECORD +60 -60
  59. {dodopayments-1.34.2.dist-info → dodopayments-1.37.0.dist-info}/WHEEL +0 -0
  60. {dodopayments-1.34.2.dist-info → dodopayments-1.37.0.dist-info}/licenses/LICENSE +0 -0
@@ -37,5 +37,6 @@ class DiscountUpdateParams(TypedDict, total=False):
37
37
  """
38
38
 
39
39
  type: Optional[DiscountType]
40
+ """If present, update the discount type."""
40
41
 
41
42
  usage_limit: Optional[int]
@@ -30,8 +30,10 @@ class Dispute(BaseModel):
30
30
  """The unique identifier of the dispute."""
31
31
 
32
32
  dispute_stage: DisputeStage
33
+ """The current stage of the dispute process."""
33
34
 
34
35
  dispute_status: DisputeStatus
36
+ """The current status of the dispute."""
35
37
 
36
38
  payment_id: str
37
39
  """The unique identifier of the payment associated with the dispute."""
@@ -2,35 +2,41 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Optional
5
+ from typing import Union
6
6
  from datetime import datetime
7
- from typing_extensions import Annotated, TypedDict
7
+ from typing_extensions import Literal, Annotated, TypedDict
8
8
 
9
9
  from .._utils import PropertyInfo
10
- from .dispute_stage import DisputeStage
11
- from .dispute_status import DisputeStatus
12
10
 
13
11
  __all__ = ["DisputeListParams"]
14
12
 
15
13
 
16
14
  class DisputeListParams(TypedDict, total=False):
17
- created_at_gte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
15
+ created_at_gte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
18
16
  """Get events after this created time"""
19
17
 
20
- created_at_lte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
18
+ created_at_lte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
21
19
  """Get events created before this time"""
22
20
 
23
- customer_id: Optional[str]
21
+ customer_id: str
24
22
  """Filter by customer_id"""
25
23
 
26
- dispute_stage: Optional[DisputeStage]
24
+ dispute_stage: Literal["pre_dispute", "dispute", "pre_arbitration"]
27
25
  """Filter by dispute stage"""
28
26
 
29
- dispute_status: Optional[DisputeStatus]
27
+ dispute_status: Literal[
28
+ "dispute_opened",
29
+ "dispute_expired",
30
+ "dispute_accepted",
31
+ "dispute_cancelled",
32
+ "dispute_challenged",
33
+ "dispute_won",
34
+ "dispute_lost",
35
+ ]
30
36
  """Filter by dispute status"""
31
37
 
32
- page_number: Optional[int]
38
+ page_number: int
33
39
  """Page number default is 0"""
34
40
 
35
- page_size: Optional[int]
41
+ page_size: int
36
42
  """Page size default is 10 max is 100"""
@@ -29,8 +29,10 @@ class DisputeListResponse(BaseModel):
29
29
  """The unique identifier of the dispute."""
30
30
 
31
31
  dispute_stage: DisputeStage
32
+ """The current stage of the dispute process."""
32
33
 
33
34
  dispute_status: DisputeStatus
35
+ """The current status of the dispute."""
34
36
 
35
37
  payment_id: str
36
38
  """The unique identifier of the payment associated with the dispute."""
@@ -28,13 +28,16 @@ class DisputeRetrieveResponse(BaseModel):
28
28
  """The currency of the disputed amount, represented as an ISO 4217 currency code."""
29
29
 
30
30
  customer: CustomerLimitedDetails
31
+ """The customer who filed the dispute"""
31
32
 
32
33
  dispute_id: str
33
34
  """The unique identifier of the dispute."""
34
35
 
35
36
  dispute_stage: DisputeStage
37
+ """The current stage of the dispute process."""
36
38
 
37
39
  dispute_status: DisputeStatus
40
+ """The current status of the dispute."""
38
41
 
39
42
  payment_id: str
40
43
  """The unique identifier of the payment associated with the dispute."""
@@ -35,6 +35,7 @@ class LicenseKey(BaseModel):
35
35
  """The unique identifier of the product associated with the license key."""
36
36
 
37
37
  status: LicenseKeyStatus
38
+ """The current status of the license key (e.g., active, inactive, expired)."""
38
39
 
39
40
  activations_limit: Optional[int] = None
40
41
  """The maximum number of activations allowed for this license key."""
@@ -2,26 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
- from typing_extensions import TypedDict
7
-
8
- from .license_key_status import LicenseKeyStatus
5
+ from typing_extensions import Literal, TypedDict
9
6
 
10
7
  __all__ = ["LicenseKeyListParams"]
11
8
 
12
9
 
13
10
  class LicenseKeyListParams(TypedDict, total=False):
14
- customer_id: Optional[str]
11
+ customer_id: str
15
12
  """Filter by customer ID"""
16
13
 
17
- page_number: Optional[int]
14
+ page_number: int
18
15
  """Page number default is 0"""
19
16
 
20
- page_size: Optional[int]
17
+ page_size: int
21
18
  """Page size default is 10 max is 100"""
22
19
 
23
- product_id: Optional[str]
20
+ product_id: str
24
21
  """Filter by product ID"""
25
22
 
26
- status: Optional[LicenseKeyStatus]
23
+ status: Literal["active", "expired", "disabled"]
27
24
  """Filter by license key status"""
@@ -23,6 +23,7 @@ class ProductCart(BaseModel):
23
23
 
24
24
  class Payment(BaseModel):
25
25
  billing: BillingAddress
26
+ """Billing address details for payments"""
26
27
 
27
28
  brand_id: str
28
29
  """brand id this payment belongs to"""
@@ -34,8 +35,10 @@ class Payment(BaseModel):
34
35
  """Timestamp when the payment was created"""
35
36
 
36
37
  currency: Currency
38
+ """Currency used for the payment"""
37
39
 
38
40
  customer: CustomerLimitedDetails
41
+ """Details about the customer who made the payment"""
39
42
 
40
43
  digital_products_delivered: bool
41
44
  """brand id this payment belongs to"""
@@ -44,6 +47,7 @@ class Payment(BaseModel):
44
47
  """List of disputes associated with this payment"""
45
48
 
46
49
  metadata: Dict[str, str]
50
+ """Additional custom data associated with the payment"""
47
51
 
48
52
  payment_id: str
49
53
  """Unique identifier for the payment"""
@@ -59,6 +63,11 @@ class Payment(BaseModel):
59
63
  """
60
64
 
61
65
  settlement_currency: Currency
66
+ """
67
+ The currency in which the settlement_amount will be credited to your Dodo
68
+ balance. This may differ from the customer's payment currency in adaptive
69
+ pricing scenarios.
70
+ """
62
71
 
63
72
  total_amount: int
64
73
  """
@@ -67,7 +76,7 @@ class Payment(BaseModel):
67
76
  """
68
77
 
69
78
  card_issuing_country: Optional[CountryCode] = None
70
- """ISO country code alpha2 variant"""
79
+ """ISO2 country code of the card"""
71
80
 
72
81
  card_last_four: Optional[str] = None
73
82
  """The last four digits of the card"""
@@ -107,6 +116,7 @@ class Payment(BaseModel):
107
116
  """
108
117
 
109
118
  status: Optional[IntentStatus] = None
119
+ """Current status of the payment intent"""
110
120
 
111
121
  subscription_id: Optional[str] = None
112
122
  """Identifier of the subscription if payment is part of a subscription"""
@@ -15,8 +15,10 @@ __all__ = ["PaymentCreateParams"]
15
15
 
16
16
  class PaymentCreateParams(TypedDict, total=False):
17
17
  billing: Required[BillingAddressParam]
18
+ """Billing address details for the payment"""
18
19
 
19
20
  customer: Required[CustomerRequestParam]
21
+ """Customer information for the payment"""
20
22
 
21
23
  product_cart: Required[Iterable[OneTimeProductCartItemParam]]
22
24
  """List of products in the cart. Must contain at least 1 and at most 100 items."""
@@ -54,11 +56,19 @@ class PaymentCreateParams(TypedDict, total=False):
54
56
  """
55
57
 
56
58
  billing_currency: Optional[Currency]
59
+ """
60
+ Fix the currency in which the end customer is billed. If Dodo Payments cannot
61
+ support that currency for this transaction, it will not proceed
62
+ """
57
63
 
58
64
  discount_code: Optional[str]
59
65
  """Discount Code to apply to the transaction"""
60
66
 
61
67
  metadata: Dict[str, str]
68
+ """
69
+ Additional metadata associated with the payment. Defaults to empty if not
70
+ provided.
71
+ """
62
72
 
63
73
  payment_link: Optional[bool]
64
74
  """Whether to generate a payment link. Defaults to false if not specified."""
@@ -1,6 +1,7 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, List, Optional
4
+ from datetime import datetime
4
5
 
5
6
  from .._models import BaseModel
6
7
  from .customer_limited_details import CustomerLimitedDetails
@@ -17,8 +18,10 @@ class PaymentCreateResponse(BaseModel):
17
18
  """
18
19
 
19
20
  customer: CustomerLimitedDetails
21
+ """Limited details about the customer making the payment"""
20
22
 
21
23
  metadata: Dict[str, str]
24
+ """Additional metadata associated with the payment"""
22
25
 
23
26
  payment_id: str
24
27
  """Unique identifier for the payment"""
@@ -29,6 +32,9 @@ class PaymentCreateResponse(BaseModel):
29
32
  discount_id: Optional[str] = None
30
33
  """The discount id if discount is applied"""
31
34
 
35
+ expires_on: Optional[datetime] = None
36
+ """Expiry timestamp of the payment link"""
37
+
32
38
  payment_link: Optional[str] = None
33
39
  """Optional URL to a hosted payment page"""
34
40
 
@@ -2,37 +2,48 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Optional
5
+ from typing import Union
6
6
  from datetime import datetime
7
- from typing_extensions import Annotated, TypedDict
7
+ from typing_extensions import Literal, Annotated, TypedDict
8
8
 
9
9
  from .._utils import PropertyInfo
10
- from .intent_status import IntentStatus
11
10
 
12
11
  __all__ = ["PaymentListParams"]
13
12
 
14
13
 
15
14
  class PaymentListParams(TypedDict, total=False):
16
- brand_id: Optional[str]
15
+ brand_id: str
17
16
  """filter by Brand id"""
18
17
 
19
- created_at_gte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
18
+ created_at_gte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
20
19
  """Get events after this created time"""
21
20
 
22
- created_at_lte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
21
+ created_at_lte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
23
22
  """Get events created before this time"""
24
23
 
25
- customer_id: Optional[str]
24
+ customer_id: str
26
25
  """Filter by customer id"""
27
26
 
28
- page_number: Optional[int]
27
+ page_number: int
29
28
  """Page number default is 0"""
30
29
 
31
- page_size: Optional[int]
30
+ page_size: int
32
31
  """Page size default is 10 max is 100"""
33
32
 
34
- status: Optional[IntentStatus]
33
+ status: Literal[
34
+ "succeeded",
35
+ "failed",
36
+ "cancelled",
37
+ "processing",
38
+ "requires_customer_action",
39
+ "requires_merchant_action",
40
+ "requires_payment_method",
41
+ "requires_confirmation",
42
+ "requires_capture",
43
+ "partially_captured",
44
+ "partially_captured_and_capturable",
45
+ ]
35
46
  """Filter by status"""
36
47
 
37
- subscription_id: Optional[str]
48
+ subscription_id: str
38
49
  """Filter by subscription id"""
@@ -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__ = ["PayoutListParams"]
9
8
 
10
9
 
11
10
  class PayoutListParams(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"""
@@ -24,6 +24,7 @@ class PayoutListResponse(BaseModel):
24
24
  """The timestamp when the payout was created, in UTC."""
25
25
 
26
26
  currency: Currency
27
+ """The currency of the payout, represented as an ISO 4217 currency code."""
27
28
 
28
29
  fee: int
29
30
  """The fee charged for processing the payout."""
@@ -38,6 +39,7 @@ class PayoutListResponse(BaseModel):
38
39
  """The total value of refunds associated with the payout."""
39
40
 
40
41
  status: Literal["not_initiated", "in_progress", "on_hold", "failed", "success"]
42
+ """The current status of the payout."""
41
43
 
42
44
  tax: int
43
45
  """The tax applied to the payout."""
@@ -1,9 +1,8 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Union, Optional
4
- from typing_extensions import Literal, Annotated, TypeAlias
4
+ from typing_extensions import Literal, TypeAlias
5
5
 
6
- from .._utils import PropertyInfo
7
6
  from .._models import BaseModel
8
7
  from .currency import Currency
9
8
  from .time_interval import TimeInterval
@@ -13,6 +12,7 @@ __all__ = ["Price", "OneTimePrice", "RecurringPrice"]
13
12
 
14
13
  class OneTimePrice(BaseModel):
15
14
  currency: Currency
15
+ """The currency in which the payment is made."""
16
16
 
17
17
  discount: float
18
18
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -53,6 +53,7 @@ class OneTimePrice(BaseModel):
53
53
 
54
54
  class RecurringPrice(BaseModel):
55
55
  currency: Currency
56
+ """The currency in which the payment is made."""
56
57
 
57
58
  discount: float
58
59
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -64,6 +65,7 @@ class RecurringPrice(BaseModel):
64
65
  """
65
66
 
66
67
  payment_frequency_interval: TimeInterval
68
+ """The time interval for the payment frequency (e.g., day, month, year)."""
67
69
 
68
70
  price: int
69
71
  """The payment amount.
@@ -85,6 +87,7 @@ class RecurringPrice(BaseModel):
85
87
  """
86
88
 
87
89
  subscription_period_interval: TimeInterval
90
+ """The time interval for the subscription period (e.g., day, month, year)."""
88
91
 
89
92
  type: Literal["recurring_price"]
90
93
 
@@ -95,4 +98,4 @@ class RecurringPrice(BaseModel):
95
98
  """Number of days for the trial period. A value of `0` indicates no trial period."""
96
99
 
97
100
 
98
- Price: TypeAlias = Annotated[Union[OneTimePrice, RecurringPrice], PropertyInfo(discriminator="type")]
101
+ Price: TypeAlias = Union[OneTimePrice, RecurringPrice]
@@ -13,6 +13,7 @@ __all__ = ["PriceParam", "OneTimePrice", "RecurringPrice"]
13
13
 
14
14
  class OneTimePrice(TypedDict, total=False):
15
15
  currency: Required[Currency]
16
+ """The currency in which the payment is made."""
16
17
 
17
18
  discount: Required[float]
18
19
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -53,6 +54,7 @@ class OneTimePrice(TypedDict, total=False):
53
54
 
54
55
  class RecurringPrice(TypedDict, total=False):
55
56
  currency: Required[Currency]
57
+ """The currency in which the payment is made."""
56
58
 
57
59
  discount: Required[float]
58
60
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -64,6 +66,7 @@ class RecurringPrice(TypedDict, total=False):
64
66
  """
65
67
 
66
68
  payment_frequency_interval: Required[TimeInterval]
69
+ """The time interval for the payment frequency (e.g., day, month, year)."""
67
70
 
68
71
  price: Required[int]
69
72
  """The payment amount.
@@ -85,6 +88,7 @@ class RecurringPrice(TypedDict, total=False):
85
88
  """
86
89
 
87
90
  subscription_period_interval: Required[TimeInterval]
91
+ """The time interval for the subscription period (e.g., day, month, year)."""
88
92
 
89
93
  type: Required[Literal["recurring_price"]]
90
94
 
@@ -46,15 +46,13 @@ class Product(BaseModel):
46
46
  """Indicates whether the product requires a license key."""
47
47
 
48
48
  price: Price
49
+ """Pricing information for the product."""
49
50
 
50
51
  product_id: str
51
52
  """Unique identifier for the product."""
52
53
 
53
54
  tax_category: TaxCategory
54
- """
55
- Represents the different categories of taxation applicable to various products
56
- and services.
57
- """
55
+ """Tax category associated with the product."""
58
56
 
59
57
  updated_at: datetime
60
58
  """Timestamp when the product was last updated."""
@@ -77,6 +75,7 @@ class Product(BaseModel):
77
75
  """Limit on the number of activations for the license key, if enabled."""
78
76
 
79
77
  license_key_duration: Optional[LicenseKeyDuration] = None
78
+ """Duration of the license key validity, if enabled."""
80
79
 
81
80
  name: Optional[str] = None
82
81
  """Name of the product, optional."""
@@ -14,12 +14,10 @@ __all__ = ["ProductCreateParams", "DigitalProductDelivery"]
14
14
 
15
15
  class ProductCreateParams(TypedDict, total=False):
16
16
  price: Required[PriceParam]
17
+ """Price configuration for the product"""
17
18
 
18
19
  tax_category: Required[TaxCategory]
19
- """
20
- Represents the different categories of taxation applicable to various products
21
- and services.
22
- """
20
+ """Tax category applied to this product"""
23
21
 
24
22
  addons: Optional[List[str]]
25
23
  """Addons available for subscription product"""
@@ -31,6 +29,7 @@ class ProductCreateParams(TypedDict, total=False):
31
29
  """Optional description of the product"""
32
30
 
33
31
  digital_product_delivery: Optional[DigitalProductDelivery]
32
+ """Choose how you would like you digital product delivered"""
34
33
 
35
34
  license_key_activation_message: Optional[str]
36
35
  """Optional message displayed during license key activation"""
@@ -39,6 +38,11 @@ class ProductCreateParams(TypedDict, total=False):
39
38
  """The number of times the license key can be activated. Must be 0 or greater"""
40
39
 
41
40
  license_key_duration: Optional[LicenseKeyDurationParam]
41
+ """
42
+ Duration configuration for the license key. Set to null if you don't want the
43
+ license key to expire. For subscriptions, the lifetime of the license key is
44
+ tied to the subscription period
45
+ """
42
46
 
43
47
  license_key_enabled: Optional[bool]
44
48
  """
@@ -2,7 +2,6 @@
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__ = ["ProductListParams"]
@@ -12,16 +11,16 @@ class ProductListParams(TypedDict, total=False):
12
11
  archived: bool
13
12
  """List archived products"""
14
13
 
15
- brand_id: Optional[str]
14
+ brand_id: str
16
15
  """filter by Brand id"""
17
16
 
18
- page_number: Optional[int]
17
+ page_number: int
19
18
  """Page number default is 0"""
20
19
 
21
- page_size: Optional[int]
20
+ page_size: int
22
21
  """Page size default is 10 max is 100"""
23
22
 
24
- recurring: Optional[bool]
23
+ recurring: bool
25
24
  """Filter products by pricing type:
26
25
 
27
26
  - `true`: Show only recurring pricing products (e.g. subscriptions)
@@ -25,15 +25,13 @@ class ProductListResponse(BaseModel):
25
25
  """Unique identifier for the product."""
26
26
 
27
27
  tax_category: TaxCategory
28
- """
29
- Represents the different categories of taxation applicable to various products
30
- and services.
31
- """
28
+ """Tax category associated with the product."""
32
29
 
33
30
  updated_at: datetime
34
31
  """Timestamp when the product was last updated."""
35
32
 
36
33
  currency: Optional[Currency] = None
34
+ """Currency of the price"""
37
35
 
38
36
  description: Optional[str] = None
39
37
  """Description of the product, optional."""
@@ -58,6 +56,7 @@ class ProductListResponse(BaseModel):
58
56
  """
59
57
 
60
58
  price_detail: Optional[Price] = None
59
+ """Details of the price"""
61
60
 
62
61
  tax_inclusive: Optional[bool] = None
63
62
  """Indicates if the price is tax inclusive"""
@@ -22,6 +22,7 @@ class ProductUpdateParams(TypedDict, total=False):
22
22
  """Description of the product, optional and must be at most 1000 characters."""
23
23
 
24
24
  digital_product_delivery: Optional[DigitalProductDelivery]
25
+ """Choose how you would like you digital product delivered"""
25
26
 
26
27
  image_id: Optional[str]
27
28
  """Product image id after its uploaded to S3"""
@@ -41,6 +42,11 @@ class ProductUpdateParams(TypedDict, total=False):
41
42
  """
42
43
 
43
44
  license_key_duration: Optional[LicenseKeyDurationParam]
45
+ """Duration of the license key if enabled.
46
+
47
+ Only applicable if `license_key_enabled` is `true`. Represents the duration in
48
+ days for which the license key is valid.
49
+ """
44
50
 
45
51
  license_key_enabled: Optional[bool]
46
52
  """Whether the product requires a license key.
@@ -53,12 +59,10 @@ class ProductUpdateParams(TypedDict, total=False):
53
59
  """Name of the product, optional and must be at most 100 characters."""
54
60
 
55
61
  price: Optional[PriceParam]
62
+ """Price details of the product."""
56
63
 
57
64
  tax_category: Optional[TaxCategory]
58
- """
59
- Represents the different categories of taxation applicable to various products
60
- and services.
61
- """
65
+ """Tax category of the product."""
62
66
 
63
67
 
64
68
  class DigitalProductDelivery(TypedDict, total=False):
@@ -2,11 +2,10 @@
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__ = ["ImageUpdateParams"]
9
8
 
10
9
 
11
10
  class ImageUpdateParams(TypedDict, total=False):
12
- force_update: Optional[bool]
11
+ force_update: bool
@@ -27,11 +27,13 @@ class Refund(BaseModel):
27
27
  """The unique identifier of the refund."""
28
28
 
29
29
  status: RefundStatus
30
+ """The current status of the refund."""
30
31
 
31
32
  amount: Optional[int] = None
32
33
  """The refunded amount."""
33
34
 
34
35
  currency: Optional[Currency] = None
36
+ """The currency of the refund, represented as an ISO 4217 currency code."""
35
37
 
36
38
  reason: Optional[str] = None
37
39
  """The reason provided for the refund, if any. Optional."""
@@ -2,31 +2,30 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Optional
5
+ from typing import Union
6
6
  from datetime import datetime
7
- from typing_extensions import Annotated, TypedDict
7
+ from typing_extensions import Literal, Annotated, TypedDict
8
8
 
9
9
  from .._utils import PropertyInfo
10
- from .refund_status import RefundStatus
11
10
 
12
11
  __all__ = ["RefundListParams"]
13
12
 
14
13
 
15
14
  class RefundListParams(TypedDict, total=False):
16
- created_at_gte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
15
+ created_at_gte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
17
16
  """Get events after this created time"""
18
17
 
19
- created_at_lte: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
18
+ created_at_lte: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
20
19
  """Get events created before this time"""
21
20
 
22
- customer_id: Optional[str]
21
+ customer_id: str
23
22
  """Filter by customer_id"""
24
23
 
25
- page_number: Optional[int]
24
+ page_number: int
26
25
  """Page number default is 0"""
27
26
 
28
- page_size: Optional[int]
27
+ page_size: int
29
28
  """Page size default is 10 max is 100"""
30
29
 
31
- status: Optional[RefundStatus]
30
+ status: Literal["succeeded", "failed", "pending", "review"]
32
31
  """Filter by status"""