dodopayments 1.44.0__py3-none-any.whl → 1.47.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 (46) hide show
  1. dodopayments/_client.py +20 -0
  2. dodopayments/_version.py +1 -1
  3. dodopayments/pagination.py +64 -1
  4. dodopayments/resources/__init__.py +28 -0
  5. dodopayments/resources/discounts.py +24 -0
  6. dodopayments/resources/products/products.py +17 -1
  7. dodopayments/resources/webhooks/__init__.py +33 -0
  8. dodopayments/resources/webhooks/headers.py +255 -0
  9. dodopayments/resources/webhooks/webhooks.py +676 -0
  10. dodopayments/resources/your_webhook_url.py +224 -0
  11. dodopayments/types/__init__.py +17 -1
  12. dodopayments/types/addon_cart_response_item_param.py +13 -0
  13. dodopayments/types/customer_limited_details_param.py +18 -0
  14. dodopayments/types/customer_request_param.py +2 -2
  15. dodopayments/types/discount.py +7 -0
  16. dodopayments/types/discount_create_params.py +7 -0
  17. dodopayments/types/discount_update_params.py +7 -0
  18. dodopayments/types/dispute_param.py +45 -0
  19. dodopayments/types/get_dispute_param.py +52 -0
  20. dodopayments/types/license_key_param.py +53 -0
  21. dodopayments/types/new_customer_param.py +16 -0
  22. dodopayments/types/payment_param.py +131 -0
  23. dodopayments/types/product.py +4 -1
  24. dodopayments/types/product_create_params.py +4 -1
  25. dodopayments/types/product_list_response.py +4 -1
  26. dodopayments/types/product_update_params.py +4 -1
  27. dodopayments/types/refund_param.py +42 -0
  28. dodopayments/types/subscription.py +3 -0
  29. dodopayments/types/subscription_list_response.py +3 -0
  30. dodopayments/types/subscription_param.py +97 -0
  31. dodopayments/types/webhook_create_params.py +40 -0
  32. dodopayments/types/webhook_create_response.py +42 -0
  33. dodopayments/types/webhook_list_params.py +16 -0
  34. dodopayments/types/webhook_list_response.py +42 -0
  35. dodopayments/types/webhook_retrieve_response.py +42 -0
  36. dodopayments/types/webhook_update_params.py +33 -0
  37. dodopayments/types/webhook_update_response.py +42 -0
  38. dodopayments/types/webhooks/__init__.py +6 -0
  39. dodopayments/types/webhooks/header_retrieve_response.py +15 -0
  40. dodopayments/types/webhooks/header_update_params.py +13 -0
  41. dodopayments/types/your_webhook_url_create_params.py +66 -0
  42. {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/METADATA +1 -1
  43. {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/RECORD +45 -22
  44. dodopayments/types/create_new_customer_param.py +0 -23
  45. {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/WHEEL +0 -0
  46. {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,224 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from datetime import datetime
7
+
8
+ import httpx
9
+
10
+ from ..types import WebhookEventType, your_webhook_url_create_params
11
+ from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
12
+ from .._utils import maybe_transform, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from .._base_client import make_request_options
22
+ from ..types.webhook_event_type import WebhookEventType
23
+
24
+ __all__ = ["YourWebhookURLResource", "AsyncYourWebhookURLResource"]
25
+
26
+
27
+ class YourWebhookURLResource(SyncAPIResource):
28
+ @cached_property
29
+ def with_raw_response(self) -> YourWebhookURLResourceWithRawResponse:
30
+ """
31
+ This property can be used as a prefix for any HTTP method call to return
32
+ the raw response object instead of the parsed content.
33
+
34
+ For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
35
+ """
36
+ return YourWebhookURLResourceWithRawResponse(self)
37
+
38
+ @cached_property
39
+ def with_streaming_response(self) -> YourWebhookURLResourceWithStreamingResponse:
40
+ """
41
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
+
43
+ For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
44
+ """
45
+ return YourWebhookURLResourceWithStreamingResponse(self)
46
+
47
+ def create(
48
+ self,
49
+ *,
50
+ business_id: str,
51
+ data: Union[
52
+ your_webhook_url_create_params.DataPayment,
53
+ your_webhook_url_create_params.DataSubscription,
54
+ your_webhook_url_create_params.DataRefund,
55
+ your_webhook_url_create_params.DataDispute,
56
+ your_webhook_url_create_params.DataLicenseKey,
57
+ ],
58
+ timestamp: Union[str, datetime],
59
+ type: WebhookEventType,
60
+ webhook_id: str,
61
+ webhook_signature: str,
62
+ webhook_timestamp: str,
63
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64
+ # The extra values given here take precedence over values defined on the client or passed to this method.
65
+ extra_headers: Headers | None = None,
66
+ extra_query: Query | None = None,
67
+ extra_body: Body | None = None,
68
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
69
+ ) -> None:
70
+ """
71
+ Args:
72
+ data: The latest data at the time of delivery attempt
73
+
74
+ timestamp: The timestamp of when the event occurred (not necessarily the same of when it
75
+ was delivered)
76
+
77
+ type: Event types for Dodo events
78
+
79
+ extra_headers: Send extra headers
80
+
81
+ extra_query: Add additional query parameters to the request
82
+
83
+ extra_body: Add additional JSON properties to the request
84
+
85
+ timeout: Override the client-level default timeout for this request, in seconds
86
+ """
87
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
88
+ extra_headers.update(
89
+ {"webhook-id": webhook_id, "webhook-signature": webhook_signature, "webhook-timestamp": webhook_timestamp}
90
+ )
91
+ return self._post(
92
+ "/your-webhook-url",
93
+ body=maybe_transform(
94
+ {
95
+ "business_id": business_id,
96
+ "data": data,
97
+ "timestamp": timestamp,
98
+ "type": type,
99
+ },
100
+ your_webhook_url_create_params.YourWebhookURLCreateParams,
101
+ ),
102
+ options=make_request_options(
103
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
104
+ ),
105
+ cast_to=NoneType,
106
+ )
107
+
108
+
109
+ class AsyncYourWebhookURLResource(AsyncAPIResource):
110
+ @cached_property
111
+ def with_raw_response(self) -> AsyncYourWebhookURLResourceWithRawResponse:
112
+ """
113
+ This property can be used as a prefix for any HTTP method call to return
114
+ the raw response object instead of the parsed content.
115
+
116
+ For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
117
+ """
118
+ return AsyncYourWebhookURLResourceWithRawResponse(self)
119
+
120
+ @cached_property
121
+ def with_streaming_response(self) -> AsyncYourWebhookURLResourceWithStreamingResponse:
122
+ """
123
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
124
+
125
+ For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
126
+ """
127
+ return AsyncYourWebhookURLResourceWithStreamingResponse(self)
128
+
129
+ async def create(
130
+ self,
131
+ *,
132
+ business_id: str,
133
+ data: Union[
134
+ your_webhook_url_create_params.DataPayment,
135
+ your_webhook_url_create_params.DataSubscription,
136
+ your_webhook_url_create_params.DataRefund,
137
+ your_webhook_url_create_params.DataDispute,
138
+ your_webhook_url_create_params.DataLicenseKey,
139
+ ],
140
+ timestamp: Union[str, datetime],
141
+ type: WebhookEventType,
142
+ webhook_id: str,
143
+ webhook_signature: str,
144
+ webhook_timestamp: str,
145
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
146
+ # The extra values given here take precedence over values defined on the client or passed to this method.
147
+ extra_headers: Headers | None = None,
148
+ extra_query: Query | None = None,
149
+ extra_body: Body | None = None,
150
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
151
+ ) -> None:
152
+ """
153
+ Args:
154
+ data: The latest data at the time of delivery attempt
155
+
156
+ timestamp: The timestamp of when the event occurred (not necessarily the same of when it
157
+ was delivered)
158
+
159
+ type: Event types for Dodo events
160
+
161
+ extra_headers: Send extra headers
162
+
163
+ extra_query: Add additional query parameters to the request
164
+
165
+ extra_body: Add additional JSON properties to the request
166
+
167
+ timeout: Override the client-level default timeout for this request, in seconds
168
+ """
169
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
170
+ extra_headers.update(
171
+ {"webhook-id": webhook_id, "webhook-signature": webhook_signature, "webhook-timestamp": webhook_timestamp}
172
+ )
173
+ return await self._post(
174
+ "/your-webhook-url",
175
+ body=await async_maybe_transform(
176
+ {
177
+ "business_id": business_id,
178
+ "data": data,
179
+ "timestamp": timestamp,
180
+ "type": type,
181
+ },
182
+ your_webhook_url_create_params.YourWebhookURLCreateParams,
183
+ ),
184
+ options=make_request_options(
185
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
186
+ ),
187
+ cast_to=NoneType,
188
+ )
189
+
190
+
191
+ class YourWebhookURLResourceWithRawResponse:
192
+ def __init__(self, your_webhook_url: YourWebhookURLResource) -> None:
193
+ self._your_webhook_url = your_webhook_url
194
+
195
+ self.create = to_raw_response_wrapper(
196
+ your_webhook_url.create,
197
+ )
198
+
199
+
200
+ class AsyncYourWebhookURLResourceWithRawResponse:
201
+ def __init__(self, your_webhook_url: AsyncYourWebhookURLResource) -> None:
202
+ self._your_webhook_url = your_webhook_url
203
+
204
+ self.create = async_to_raw_response_wrapper(
205
+ your_webhook_url.create,
206
+ )
207
+
208
+
209
+ class YourWebhookURLResourceWithStreamingResponse:
210
+ def __init__(self, your_webhook_url: YourWebhookURLResource) -> None:
211
+ self._your_webhook_url = your_webhook_url
212
+
213
+ self.create = to_streamed_response_wrapper(
214
+ your_webhook_url.create,
215
+ )
216
+
217
+
218
+ class AsyncYourWebhookURLResourceWithStreamingResponse:
219
+ def __init__(self, your_webhook_url: AsyncYourWebhookURLResource) -> None:
220
+ self._your_webhook_url = your_webhook_url
221
+
222
+ self.create = async_to_streamed_response_wrapper(
223
+ your_webhook_url.create,
224
+ )
@@ -15,21 +15,28 @@ from .get_dispute import GetDispute as GetDispute
15
15
  from .license_key import LicenseKey as LicenseKey
16
16
  from .price_param import PriceParam as PriceParam
17
17
  from .country_code import CountryCode as CountryCode
18
+ from .refund_param import RefundParam as RefundParam
18
19
  from .subscription import Subscription as Subscription
19
20
  from .tax_category import TaxCategory as TaxCategory
20
21
  from .discount_type import DiscountType as DiscountType
22
+ from .dispute_param import DisputeParam as DisputeParam
21
23
  from .dispute_stage import DisputeStage as DisputeStage
22
24
  from .intent_status import IntentStatus as IntentStatus
25
+ from .payment_param import PaymentParam as PaymentParam
23
26
  from .refund_status import RefundStatus as RefundStatus
24
27
  from .time_interval import TimeInterval as TimeInterval
25
28
  from .addon_response import AddonResponse as AddonResponse
26
29
  from .dispute_status import DisputeStatus as DisputeStatus
27
30
  from .billing_address import BillingAddress as BillingAddress
28
31
  from .addon_list_params import AddonListParams as AddonListParams
32
+ from .get_dispute_param import GetDisputeParam as GetDisputeParam
33
+ from .license_key_param import LicenseKeyParam as LicenseKeyParam
29
34
  from .attach_addon_param import AttachAddonParam as AttachAddonParam
30
35
  from .license_key_status import LicenseKeyStatus as LicenseKeyStatus
36
+ from .new_customer_param import NewCustomerParam as NewCustomerParam
31
37
  from .payout_list_params import PayoutListParams as PayoutListParams
32
38
  from .refund_list_params import RefundListParams as RefundListParams
39
+ from .subscription_param import SubscriptionParam as SubscriptionParam
33
40
  from .webhook_event_type import WebhookEventType as WebhookEventType
34
41
  from .addon_create_params import AddonCreateParams as AddonCreateParams
35
42
  from .addon_update_params import AddonUpdateParams as AddonUpdateParams
@@ -40,6 +47,7 @@ from .dispute_list_params import DisputeListParams as DisputeListParams
40
47
  from .payment_list_params import PaymentListParams as PaymentListParams
41
48
  from .product_list_params import ProductListParams as ProductListParams
42
49
  from .subscription_status import SubscriptionStatus as SubscriptionStatus
50
+ from .webhook_list_params import WebhookListParams as WebhookListParams
43
51
  from .customer_list_params import CustomerListParams as CustomerListParams
44
52
  from .discount_list_params import DiscountListParams as DiscountListParams
45
53
  from .license_key_duration import LicenseKeyDuration as LicenseKeyDuration
@@ -54,6 +62,9 @@ from .payment_list_response import PaymentListResponse as PaymentListResponse
54
62
  from .product_create_params import ProductCreateParams as ProductCreateParams
55
63
  from .product_list_response import ProductListResponse as ProductListResponse
56
64
  from .product_update_params import ProductUpdateParams as ProductUpdateParams
65
+ from .webhook_create_params import WebhookCreateParams as WebhookCreateParams
66
+ from .webhook_list_response import WebhookListResponse as WebhookListResponse
67
+ from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams
57
68
  from .customer_create_params import CustomerCreateParams as CustomerCreateParams
58
69
  from .customer_request_param import CustomerRequestParam as CustomerRequestParam
59
70
  from .customer_update_params import CustomerUpdateParams as CustomerUpdateParams
@@ -64,13 +75,15 @@ from .license_activate_params import LicenseActivateParams as LicenseActivatePar
64
75
  from .license_key_list_params import LicenseKeyListParams as LicenseKeyListParams
65
76
  from .license_validate_params import LicenseValidateParams as LicenseValidateParams
66
77
  from .payment_create_response import PaymentCreateResponse as PaymentCreateResponse
78
+ from .webhook_create_response import WebhookCreateResponse as WebhookCreateResponse
79
+ from .webhook_update_response import WebhookUpdateResponse as WebhookUpdateResponse
67
80
  from .addon_cart_response_item import AddonCartResponseItem as AddonCartResponseItem
68
81
  from .customer_limited_details import CustomerLimitedDetails as CustomerLimitedDetails
69
82
  from .subscription_list_params import SubscriptionListParams as SubscriptionListParams
70
- from .create_new_customer_param import CreateNewCustomerParam as CreateNewCustomerParam
71
83
  from .license_deactivate_params import LicenseDeactivateParams as LicenseDeactivateParams
72
84
  from .license_key_update_params import LicenseKeyUpdateParams as LicenseKeyUpdateParams
73
85
  from .license_validate_response import LicenseValidateResponse as LicenseValidateResponse
86
+ from .webhook_retrieve_response import WebhookRetrieveResponse as WebhookRetrieveResponse
74
87
  from .license_key_duration_param import LicenseKeyDurationParam as LicenseKeyDurationParam
75
88
  from .one_time_product_cart_item import OneTimeProductCartItem as OneTimeProductCartItem
76
89
  from .subscription_charge_params import SubscriptionChargeParams as SubscriptionChargeParams
@@ -83,7 +96,10 @@ from .brand_update_images_response import BrandUpdateImagesResponse as BrandUpda
83
96
  from .subscription_charge_response import SubscriptionChargeResponse as SubscriptionChargeResponse
84
97
  from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
85
98
  from .product_update_files_response import ProductUpdateFilesResponse as ProductUpdateFilesResponse
99
+ from .addon_cart_response_item_param import AddonCartResponseItemParam as AddonCartResponseItemParam
86
100
  from .attach_existing_customer_param import AttachExistingCustomerParam as AttachExistingCustomerParam
101
+ from .customer_limited_details_param import CustomerLimitedDetailsParam as CustomerLimitedDetailsParam
102
+ from .your_webhook_url_create_params import YourWebhookURLCreateParams as YourWebhookURLCreateParams
87
103
  from .subscription_change_plan_params import SubscriptionChangePlanParams as SubscriptionChangePlanParams
88
104
  from .license_key_instance_list_params import LicenseKeyInstanceListParams as LicenseKeyInstanceListParams
89
105
  from .one_time_product_cart_item_param import OneTimeProductCartItemParam as OneTimeProductCartItemParam
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["AddonCartResponseItemParam"]
8
+
9
+
10
+ class AddonCartResponseItemParam(TypedDict, total=False):
11
+ addon_id: Required[str]
12
+
13
+ quantity: Required[int]
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["CustomerLimitedDetailsParam"]
8
+
9
+
10
+ class CustomerLimitedDetailsParam(TypedDict, total=False):
11
+ customer_id: Required[str]
12
+ """Unique identifier for the customer"""
13
+
14
+ email: Required[str]
15
+ """Email address of the customer"""
16
+
17
+ name: Required[str]
18
+ """Full name of the customer"""
@@ -5,9 +5,9 @@ from __future__ import annotations
5
5
  from typing import Union
6
6
  from typing_extensions import TypeAlias
7
7
 
8
- from .create_new_customer_param import CreateNewCustomerParam
8
+ from .new_customer_param import NewCustomerParam
9
9
  from .attach_existing_customer_param import AttachExistingCustomerParam
10
10
 
11
11
  __all__ = ["CustomerRequestParam"]
12
12
 
13
- CustomerRequestParam: TypeAlias = Union[AttachExistingCustomerParam, CreateNewCustomerParam]
13
+ CustomerRequestParam: TypeAlias = Union[AttachExistingCustomerParam, NewCustomerParam]
@@ -45,5 +45,12 @@ class Discount(BaseModel):
45
45
  name: Optional[str] = None
46
46
  """Name for the Discount"""
47
47
 
48
+ subscription_cycles: Optional[int] = None
49
+ """
50
+ Number of subscription billing cycles this discount is valid for. If not
51
+ provided, the discount will be applied indefinitely to all recurring payments
52
+ related to the subscription.
53
+ """
54
+
48
55
  usage_limit: Optional[int] = None
49
56
  """Usage limit for this discount, if any."""
@@ -42,5 +42,12 @@ class DiscountCreateParams(TypedDict, total=False):
42
42
  restricted_to: Optional[List[str]]
43
43
  """List of product IDs to restrict usage (if any)."""
44
44
 
45
+ subscription_cycles: Optional[int]
46
+ """
47
+ Number of subscription billing cycles this discount is valid for. If not
48
+ provided, the discount will be applied indefinitely to all recurring payments
49
+ related to the subscription.
50
+ """
51
+
45
52
  usage_limit: Optional[int]
46
53
  """How many times this discount can be used (if any). Must be >= 1 if provided."""
@@ -36,6 +36,13 @@ class DiscountUpdateParams(TypedDict, total=False):
36
36
  restrictions, send empty array
37
37
  """
38
38
 
39
+ subscription_cycles: Optional[int]
40
+ """
41
+ Number of subscription billing cycles this discount is valid for. If not
42
+ provided, the discount will be applied indefinitely to all recurring payments
43
+ related to the subscription.
44
+ """
45
+
39
46
  type: Optional[DiscountType]
40
47
  """If present, update the discount type."""
41
48
 
@@ -0,0 +1,45 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from datetime import datetime
7
+ from typing_extensions import Required, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+ from .dispute_stage import DisputeStage
11
+ from .dispute_status import DisputeStatus
12
+
13
+ __all__ = ["DisputeParam"]
14
+
15
+
16
+ class DisputeParam(TypedDict, total=False):
17
+ amount: Required[str]
18
+ """
19
+ The amount involved in the dispute, represented as a string to accommodate
20
+ precision.
21
+ """
22
+
23
+ business_id: Required[str]
24
+ """The unique identifier of the business involved in the dispute."""
25
+
26
+ created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
27
+ """The timestamp of when the dispute was created, in UTC."""
28
+
29
+ currency: Required[str]
30
+ """The currency of the disputed amount, represented as an ISO 4217 currency code."""
31
+
32
+ dispute_id: Required[str]
33
+ """The unique identifier of the dispute."""
34
+
35
+ dispute_stage: Required[DisputeStage]
36
+ """The current stage of the dispute process."""
37
+
38
+ dispute_status: Required[DisputeStatus]
39
+ """The current status of the dispute."""
40
+
41
+ payment_id: Required[str]
42
+ """The unique identifier of the payment associated with the dispute."""
43
+
44
+ remarks: Optional[str]
45
+ """Remarks"""
@@ -0,0 +1,52 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from datetime import datetime
7
+ from typing_extensions import Required, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+ from .dispute_stage import DisputeStage
11
+ from .dispute_status import DisputeStatus
12
+ from .customer_limited_details_param import CustomerLimitedDetailsParam
13
+
14
+ __all__ = ["GetDisputeParam"]
15
+
16
+
17
+ class GetDisputeParam(TypedDict, total=False):
18
+ amount: Required[str]
19
+ """
20
+ The amount involved in the dispute, represented as a string to accommodate
21
+ precision.
22
+ """
23
+
24
+ business_id: Required[str]
25
+ """The unique identifier of the business involved in the dispute."""
26
+
27
+ created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
28
+ """The timestamp of when the dispute was created, in UTC."""
29
+
30
+ currency: Required[str]
31
+ """The currency of the disputed amount, represented as an ISO 4217 currency code."""
32
+
33
+ customer: Required[CustomerLimitedDetailsParam]
34
+ """The customer who filed the dispute"""
35
+
36
+ dispute_id: Required[str]
37
+ """The unique identifier of the dispute."""
38
+
39
+ dispute_stage: Required[DisputeStage]
40
+ """The current stage of the dispute process."""
41
+
42
+ dispute_status: Required[DisputeStatus]
43
+ """The current status of the dispute."""
44
+
45
+ payment_id: Required[str]
46
+ """The unique identifier of the payment associated with the dispute."""
47
+
48
+ reason: Optional[str]
49
+ """Reason for the dispute"""
50
+
51
+ remarks: Optional[str]
52
+ """Remarks"""
@@ -0,0 +1,53 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from datetime import datetime
7
+ from typing_extensions import Required, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+ from .license_key_status import LicenseKeyStatus
11
+
12
+ __all__ = ["LicenseKeyParam"]
13
+
14
+
15
+ class LicenseKeyParam(TypedDict, total=False):
16
+ id: Required[str]
17
+ """The unique identifier of the license key."""
18
+
19
+ business_id: Required[str]
20
+ """The unique identifier of the business associated with the license key."""
21
+
22
+ created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
23
+ """The timestamp indicating when the license key was created, in UTC."""
24
+
25
+ customer_id: Required[str]
26
+ """The unique identifier of the customer associated with the license key."""
27
+
28
+ instances_count: Required[int]
29
+ """The current number of instances activated for this license key."""
30
+
31
+ key: Required[str]
32
+ """The license key string."""
33
+
34
+ payment_id: Required[str]
35
+ """The unique identifier of the payment associated with the license key."""
36
+
37
+ product_id: Required[str]
38
+ """The unique identifier of the product associated with the license key."""
39
+
40
+ status: Required[LicenseKeyStatus]
41
+ """The current status of the license key (e.g., active, inactive, expired)."""
42
+
43
+ activations_limit: Optional[int]
44
+ """The maximum number of activations allowed for this license key."""
45
+
46
+ expires_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
47
+ """The timestamp indicating when the license key expires, in UTC."""
48
+
49
+ subscription_id: Optional[str]
50
+ """
51
+ The unique identifier of the subscription associated with the license key, if
52
+ any.
53
+ """
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["NewCustomerParam"]
9
+
10
+
11
+ class NewCustomerParam(TypedDict, total=False):
12
+ email: Required[str]
13
+
14
+ name: Required[str]
15
+
16
+ phone_number: Optional[str]