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.
- dodopayments/_client.py +20 -0
- dodopayments/_version.py +1 -1
- dodopayments/pagination.py +64 -1
- dodopayments/resources/__init__.py +28 -0
- dodopayments/resources/discounts.py +24 -0
- dodopayments/resources/products/products.py +17 -1
- dodopayments/resources/webhooks/__init__.py +33 -0
- dodopayments/resources/webhooks/headers.py +255 -0
- dodopayments/resources/webhooks/webhooks.py +676 -0
- dodopayments/resources/your_webhook_url.py +224 -0
- dodopayments/types/__init__.py +17 -1
- dodopayments/types/addon_cart_response_item_param.py +13 -0
- dodopayments/types/customer_limited_details_param.py +18 -0
- dodopayments/types/customer_request_param.py +2 -2
- dodopayments/types/discount.py +7 -0
- dodopayments/types/discount_create_params.py +7 -0
- dodopayments/types/discount_update_params.py +7 -0
- dodopayments/types/dispute_param.py +45 -0
- dodopayments/types/get_dispute_param.py +52 -0
- dodopayments/types/license_key_param.py +53 -0
- dodopayments/types/new_customer_param.py +16 -0
- dodopayments/types/payment_param.py +131 -0
- dodopayments/types/product.py +4 -1
- dodopayments/types/product_create_params.py +4 -1
- dodopayments/types/product_list_response.py +4 -1
- dodopayments/types/product_update_params.py +4 -1
- dodopayments/types/refund_param.py +42 -0
- dodopayments/types/subscription.py +3 -0
- dodopayments/types/subscription_list_response.py +3 -0
- dodopayments/types/subscription_param.py +97 -0
- dodopayments/types/webhook_create_params.py +40 -0
- dodopayments/types/webhook_create_response.py +42 -0
- dodopayments/types/webhook_list_params.py +16 -0
- dodopayments/types/webhook_list_response.py +42 -0
- dodopayments/types/webhook_retrieve_response.py +42 -0
- dodopayments/types/webhook_update_params.py +33 -0
- dodopayments/types/webhook_update_response.py +42 -0
- dodopayments/types/webhooks/__init__.py +6 -0
- dodopayments/types/webhooks/header_retrieve_response.py +15 -0
- dodopayments/types/webhooks/header_update_params.py +13 -0
- dodopayments/types/your_webhook_url_create_params.py +66 -0
- {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/METADATA +1 -1
- {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/RECORD +45 -22
- dodopayments/types/create_new_customer_param.py +0 -23
- {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/WHEEL +0 -0
- {dodopayments-1.44.0.dist-info → dodopayments-1.47.0.dist-info}/licenses/LICENSE +0 -0
dodopayments/_client.py
CHANGED
|
@@ -33,6 +33,7 @@ from .resources import (
|
|
|
33
33
|
discounts,
|
|
34
34
|
license_keys,
|
|
35
35
|
subscriptions,
|
|
36
|
+
your_webhook_url,
|
|
36
37
|
license_key_instances,
|
|
37
38
|
)
|
|
38
39
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
@@ -44,6 +45,7 @@ from ._base_client import (
|
|
|
44
45
|
)
|
|
45
46
|
from .resources.invoices import invoices
|
|
46
47
|
from .resources.products import products
|
|
48
|
+
from .resources.webhooks import webhooks
|
|
47
49
|
from .resources.customers import customers
|
|
48
50
|
|
|
49
51
|
__all__ = [
|
|
@@ -80,6 +82,8 @@ class DodoPayments(SyncAPIClient):
|
|
|
80
82
|
discounts: discounts.DiscountsResource
|
|
81
83
|
addons: addons.AddonsResource
|
|
82
84
|
brands: brands.BrandsResource
|
|
85
|
+
webhooks: webhooks.WebhooksResource
|
|
86
|
+
your_webhook_url: your_webhook_url.YourWebhookURLResource
|
|
83
87
|
with_raw_response: DodoPaymentsWithRawResponse
|
|
84
88
|
with_streaming_response: DodoPaymentsWithStreamedResponse
|
|
85
89
|
|
|
@@ -176,6 +180,8 @@ class DodoPayments(SyncAPIClient):
|
|
|
176
180
|
self.discounts = discounts.DiscountsResource(self)
|
|
177
181
|
self.addons = addons.AddonsResource(self)
|
|
178
182
|
self.brands = brands.BrandsResource(self)
|
|
183
|
+
self.webhooks = webhooks.WebhooksResource(self)
|
|
184
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResource(self)
|
|
179
185
|
self.with_raw_response = DodoPaymentsWithRawResponse(self)
|
|
180
186
|
self.with_streaming_response = DodoPaymentsWithStreamedResponse(self)
|
|
181
187
|
|
|
@@ -302,6 +308,8 @@ class AsyncDodoPayments(AsyncAPIClient):
|
|
|
302
308
|
discounts: discounts.AsyncDiscountsResource
|
|
303
309
|
addons: addons.AsyncAddonsResource
|
|
304
310
|
brands: brands.AsyncBrandsResource
|
|
311
|
+
webhooks: webhooks.AsyncWebhooksResource
|
|
312
|
+
your_webhook_url: your_webhook_url.AsyncYourWebhookURLResource
|
|
305
313
|
with_raw_response: AsyncDodoPaymentsWithRawResponse
|
|
306
314
|
with_streaming_response: AsyncDodoPaymentsWithStreamedResponse
|
|
307
315
|
|
|
@@ -398,6 +406,8 @@ class AsyncDodoPayments(AsyncAPIClient):
|
|
|
398
406
|
self.discounts = discounts.AsyncDiscountsResource(self)
|
|
399
407
|
self.addons = addons.AsyncAddonsResource(self)
|
|
400
408
|
self.brands = brands.AsyncBrandsResource(self)
|
|
409
|
+
self.webhooks = webhooks.AsyncWebhooksResource(self)
|
|
410
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResource(self)
|
|
401
411
|
self.with_raw_response = AsyncDodoPaymentsWithRawResponse(self)
|
|
402
412
|
self.with_streaming_response = AsyncDodoPaymentsWithStreamedResponse(self)
|
|
403
413
|
|
|
@@ -527,6 +537,8 @@ class DodoPaymentsWithRawResponse:
|
|
|
527
537
|
self.discounts = discounts.DiscountsResourceWithRawResponse(client.discounts)
|
|
528
538
|
self.addons = addons.AddonsResourceWithRawResponse(client.addons)
|
|
529
539
|
self.brands = brands.BrandsResourceWithRawResponse(client.brands)
|
|
540
|
+
self.webhooks = webhooks.WebhooksResourceWithRawResponse(client.webhooks)
|
|
541
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResourceWithRawResponse(client.your_webhook_url)
|
|
530
542
|
|
|
531
543
|
|
|
532
544
|
class AsyncDodoPaymentsWithRawResponse:
|
|
@@ -548,6 +560,8 @@ class AsyncDodoPaymentsWithRawResponse:
|
|
|
548
560
|
self.discounts = discounts.AsyncDiscountsResourceWithRawResponse(client.discounts)
|
|
549
561
|
self.addons = addons.AsyncAddonsResourceWithRawResponse(client.addons)
|
|
550
562
|
self.brands = brands.AsyncBrandsResourceWithRawResponse(client.brands)
|
|
563
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithRawResponse(client.webhooks)
|
|
564
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResourceWithRawResponse(client.your_webhook_url)
|
|
551
565
|
|
|
552
566
|
|
|
553
567
|
class DodoPaymentsWithStreamedResponse:
|
|
@@ -569,6 +583,8 @@ class DodoPaymentsWithStreamedResponse:
|
|
|
569
583
|
self.discounts = discounts.DiscountsResourceWithStreamingResponse(client.discounts)
|
|
570
584
|
self.addons = addons.AddonsResourceWithStreamingResponse(client.addons)
|
|
571
585
|
self.brands = brands.BrandsResourceWithStreamingResponse(client.brands)
|
|
586
|
+
self.webhooks = webhooks.WebhooksResourceWithStreamingResponse(client.webhooks)
|
|
587
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResourceWithStreamingResponse(client.your_webhook_url)
|
|
572
588
|
|
|
573
589
|
|
|
574
590
|
class AsyncDodoPaymentsWithStreamedResponse:
|
|
@@ -590,6 +606,10 @@ class AsyncDodoPaymentsWithStreamedResponse:
|
|
|
590
606
|
self.discounts = discounts.AsyncDiscountsResourceWithStreamingResponse(client.discounts)
|
|
591
607
|
self.addons = addons.AsyncAddonsResourceWithStreamingResponse(client.addons)
|
|
592
608
|
self.brands = brands.AsyncBrandsResourceWithStreamingResponse(client.brands)
|
|
609
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithStreamingResponse(client.webhooks)
|
|
610
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResourceWithStreamingResponse(
|
|
611
|
+
client.your_webhook_url
|
|
612
|
+
)
|
|
593
613
|
|
|
594
614
|
|
|
595
615
|
Client = DodoPayments
|
dodopayments/_version.py
CHANGED
dodopayments/pagination.py
CHANGED
|
@@ -5,7 +5,12 @@ from typing_extensions import override
|
|
|
5
5
|
|
|
6
6
|
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
|
|
7
7
|
|
|
8
|
-
__all__ = [
|
|
8
|
+
__all__ = [
|
|
9
|
+
"SyncDefaultPageNumberPagination",
|
|
10
|
+
"AsyncDefaultPageNumberPagination",
|
|
11
|
+
"SyncCursorPagePagination",
|
|
12
|
+
"AsyncCursorPagePagination",
|
|
13
|
+
]
|
|
9
14
|
|
|
10
15
|
_T = TypeVar("_T")
|
|
11
16
|
|
|
@@ -42,3 +47,61 @@ class AsyncDefaultPageNumberPagination(BaseAsyncPage[_T], BasePage[_T], Generic[
|
|
|
42
47
|
last_page = cast("int | None", self._options.params.get("page_number")) or 1
|
|
43
48
|
|
|
44
49
|
return PageInfo(params={"page_number": last_page + 1})
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class SyncCursorPagePagination(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
|
53
|
+
data: List[_T]
|
|
54
|
+
iterator: Optional[str] = None
|
|
55
|
+
done: Optional[bool] = None
|
|
56
|
+
|
|
57
|
+
@override
|
|
58
|
+
def _get_page_items(self) -> List[_T]:
|
|
59
|
+
data = self.data
|
|
60
|
+
if not data:
|
|
61
|
+
return []
|
|
62
|
+
return data
|
|
63
|
+
|
|
64
|
+
@override
|
|
65
|
+
def has_next_page(self) -> bool:
|
|
66
|
+
done = self.done
|
|
67
|
+
if done is not None and done is False:
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
return super().has_next_page()
|
|
71
|
+
|
|
72
|
+
@override
|
|
73
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
74
|
+
iterator = self.iterator
|
|
75
|
+
if not iterator:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
return PageInfo(params={"iterator": iterator})
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AsyncCursorPagePagination(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
82
|
+
data: List[_T]
|
|
83
|
+
iterator: Optional[str] = None
|
|
84
|
+
done: Optional[bool] = None
|
|
85
|
+
|
|
86
|
+
@override
|
|
87
|
+
def _get_page_items(self) -> List[_T]:
|
|
88
|
+
data = self.data
|
|
89
|
+
if not data:
|
|
90
|
+
return []
|
|
91
|
+
return data
|
|
92
|
+
|
|
93
|
+
@override
|
|
94
|
+
def has_next_page(self) -> bool:
|
|
95
|
+
done = self.done
|
|
96
|
+
if done is not None and done is False:
|
|
97
|
+
return False
|
|
98
|
+
|
|
99
|
+
return super().has_next_page()
|
|
100
|
+
|
|
101
|
+
@override
|
|
102
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
103
|
+
iterator = self.iterator
|
|
104
|
+
if not iterator:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
return PageInfo(params={"iterator": iterator})
|
|
@@ -80,6 +80,14 @@ from .products import (
|
|
|
80
80
|
ProductsResourceWithStreamingResponse,
|
|
81
81
|
AsyncProductsResourceWithStreamingResponse,
|
|
82
82
|
)
|
|
83
|
+
from .webhooks import (
|
|
84
|
+
WebhooksResource,
|
|
85
|
+
AsyncWebhooksResource,
|
|
86
|
+
WebhooksResourceWithRawResponse,
|
|
87
|
+
AsyncWebhooksResourceWithRawResponse,
|
|
88
|
+
WebhooksResourceWithStreamingResponse,
|
|
89
|
+
AsyncWebhooksResourceWithStreamingResponse,
|
|
90
|
+
)
|
|
83
91
|
from .customers import (
|
|
84
92
|
CustomersResource,
|
|
85
93
|
AsyncCustomersResource,
|
|
@@ -112,6 +120,14 @@ from .subscriptions import (
|
|
|
112
120
|
SubscriptionsResourceWithStreamingResponse,
|
|
113
121
|
AsyncSubscriptionsResourceWithStreamingResponse,
|
|
114
122
|
)
|
|
123
|
+
from .your_webhook_url import (
|
|
124
|
+
YourWebhookURLResource,
|
|
125
|
+
AsyncYourWebhookURLResource,
|
|
126
|
+
YourWebhookURLResourceWithRawResponse,
|
|
127
|
+
AsyncYourWebhookURLResourceWithRawResponse,
|
|
128
|
+
YourWebhookURLResourceWithStreamingResponse,
|
|
129
|
+
AsyncYourWebhookURLResourceWithStreamingResponse,
|
|
130
|
+
)
|
|
115
131
|
from .license_key_instances import (
|
|
116
132
|
LicenseKeyInstancesResource,
|
|
117
133
|
AsyncLicenseKeyInstancesResource,
|
|
@@ -212,4 +228,16 @@ __all__ = [
|
|
|
212
228
|
"AsyncBrandsResourceWithRawResponse",
|
|
213
229
|
"BrandsResourceWithStreamingResponse",
|
|
214
230
|
"AsyncBrandsResourceWithStreamingResponse",
|
|
231
|
+
"WebhooksResource",
|
|
232
|
+
"AsyncWebhooksResource",
|
|
233
|
+
"WebhooksResourceWithRawResponse",
|
|
234
|
+
"AsyncWebhooksResourceWithRawResponse",
|
|
235
|
+
"WebhooksResourceWithStreamingResponse",
|
|
236
|
+
"AsyncWebhooksResourceWithStreamingResponse",
|
|
237
|
+
"YourWebhookURLResource",
|
|
238
|
+
"AsyncYourWebhookURLResource",
|
|
239
|
+
"YourWebhookURLResourceWithRawResponse",
|
|
240
|
+
"AsyncYourWebhookURLResourceWithRawResponse",
|
|
241
|
+
"YourWebhookURLResourceWithStreamingResponse",
|
|
242
|
+
"AsyncYourWebhookURLResourceWithStreamingResponse",
|
|
215
243
|
]
|
|
@@ -55,6 +55,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
55
55
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
56
56
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
57
57
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
58
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
58
59
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
59
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
60
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -88,6 +89,10 @@ class DiscountsResource(SyncAPIResource):
|
|
|
88
89
|
|
|
89
90
|
restricted_to: List of product IDs to restrict usage (if any).
|
|
90
91
|
|
|
92
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
93
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
94
|
+
related to the subscription.
|
|
95
|
+
|
|
91
96
|
usage_limit: How many times this discount can be used (if any). Must be >= 1 if provided.
|
|
92
97
|
|
|
93
98
|
extra_headers: Send extra headers
|
|
@@ -108,6 +113,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
108
113
|
"expires_at": expires_at,
|
|
109
114
|
"name": name,
|
|
110
115
|
"restricted_to": restricted_to,
|
|
116
|
+
"subscription_cycles": subscription_cycles,
|
|
111
117
|
"usage_limit": usage_limit,
|
|
112
118
|
},
|
|
113
119
|
discount_create_params.DiscountCreateParams,
|
|
@@ -160,6 +166,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
160
166
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
161
167
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
168
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
169
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
163
170
|
type: Optional[DiscountType] | NotGiven = NOT_GIVEN,
|
|
164
171
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
165
172
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -187,6 +194,10 @@ class DiscountsResource(SyncAPIResource):
|
|
|
187
194
|
restricted_to: If present, replaces all restricted product IDs with this new set. To remove all
|
|
188
195
|
restrictions, send empty array
|
|
189
196
|
|
|
197
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
198
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
199
|
+
related to the subscription.
|
|
200
|
+
|
|
190
201
|
type: If present, update the discount type.
|
|
191
202
|
|
|
192
203
|
extra_headers: Send extra headers
|
|
@@ -208,6 +219,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
208
219
|
"expires_at": expires_at,
|
|
209
220
|
"name": name,
|
|
210
221
|
"restricted_to": restricted_to,
|
|
222
|
+
"subscription_cycles": subscription_cycles,
|
|
211
223
|
"type": type,
|
|
212
224
|
"usage_limit": usage_limit,
|
|
213
225
|
},
|
|
@@ -330,6 +342,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
330
342
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
331
343
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
332
344
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
345
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
333
346
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
334
347
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
335
348
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -363,6 +376,10 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
363
376
|
|
|
364
377
|
restricted_to: List of product IDs to restrict usage (if any).
|
|
365
378
|
|
|
379
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
380
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
381
|
+
related to the subscription.
|
|
382
|
+
|
|
366
383
|
usage_limit: How many times this discount can be used (if any). Must be >= 1 if provided.
|
|
367
384
|
|
|
368
385
|
extra_headers: Send extra headers
|
|
@@ -383,6 +400,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
383
400
|
"expires_at": expires_at,
|
|
384
401
|
"name": name,
|
|
385
402
|
"restricted_to": restricted_to,
|
|
403
|
+
"subscription_cycles": subscription_cycles,
|
|
386
404
|
"usage_limit": usage_limit,
|
|
387
405
|
},
|
|
388
406
|
discount_create_params.DiscountCreateParams,
|
|
@@ -435,6 +453,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
435
453
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
436
454
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
437
455
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
456
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
438
457
|
type: Optional[DiscountType] | NotGiven = NOT_GIVEN,
|
|
439
458
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
440
459
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -462,6 +481,10 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
462
481
|
restricted_to: If present, replaces all restricted product IDs with this new set. To remove all
|
|
463
482
|
restrictions, send empty array
|
|
464
483
|
|
|
484
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
485
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
486
|
+
related to the subscription.
|
|
487
|
+
|
|
465
488
|
type: If present, update the discount type.
|
|
466
489
|
|
|
467
490
|
extra_headers: Send extra headers
|
|
@@ -483,6 +506,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
483
506
|
"expires_at": expires_at,
|
|
484
507
|
"name": name,
|
|
485
508
|
"restricted_to": restricted_to,
|
|
509
|
+
"subscription_cycles": subscription_cycles,
|
|
486
510
|
"type": type,
|
|
487
511
|
"usage_limit": usage_limit,
|
|
488
512
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Optional
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -80,6 +80,7 @@ class ProductsResource(SyncAPIResource):
|
|
|
80
80
|
license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
81
81
|
license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
|
|
82
82
|
license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
83
|
+
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
83
84
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
84
85
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
85
86
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -112,6 +113,8 @@ class ProductsResource(SyncAPIResource):
|
|
|
112
113
|
|
|
113
114
|
license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
|
|
114
115
|
|
|
116
|
+
metadata: Additional metadata for the product
|
|
117
|
+
|
|
115
118
|
name: Optional name of the product
|
|
116
119
|
|
|
117
120
|
extra_headers: Send extra headers
|
|
@@ -136,6 +139,7 @@ class ProductsResource(SyncAPIResource):
|
|
|
136
139
|
"license_key_activations_limit": license_key_activations_limit,
|
|
137
140
|
"license_key_duration": license_key_duration,
|
|
138
141
|
"license_key_enabled": license_key_enabled,
|
|
142
|
+
"metadata": metadata,
|
|
139
143
|
"name": name,
|
|
140
144
|
},
|
|
141
145
|
product_create_params.ProductCreateParams,
|
|
@@ -190,6 +194,7 @@ class ProductsResource(SyncAPIResource):
|
|
|
190
194
|
license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
191
195
|
license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
|
|
192
196
|
license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
197
|
+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
193
198
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
194
199
|
price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
|
|
195
200
|
tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
|
|
@@ -230,6 +235,8 @@ class ProductsResource(SyncAPIResource):
|
|
|
230
235
|
If `true`, additional fields related to license key (duration, activations
|
|
231
236
|
limit, activation message) become applicable.
|
|
232
237
|
|
|
238
|
+
metadata: Additional metadata for the product
|
|
239
|
+
|
|
233
240
|
name: Name of the product, optional and must be at most 100 characters.
|
|
234
241
|
|
|
235
242
|
price: Price details of the product.
|
|
@@ -260,6 +267,7 @@ class ProductsResource(SyncAPIResource):
|
|
|
260
267
|
"license_key_activations_limit": license_key_activations_limit,
|
|
261
268
|
"license_key_duration": license_key_duration,
|
|
262
269
|
"license_key_enabled": license_key_enabled,
|
|
270
|
+
"metadata": metadata,
|
|
263
271
|
"name": name,
|
|
264
272
|
"price": price,
|
|
265
273
|
"tax_category": tax_category,
|
|
@@ -469,6 +477,7 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
469
477
|
license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
470
478
|
license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
|
|
471
479
|
license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
480
|
+
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
472
481
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
473
482
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
474
483
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -501,6 +510,8 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
501
510
|
|
|
502
511
|
license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
|
|
503
512
|
|
|
513
|
+
metadata: Additional metadata for the product
|
|
514
|
+
|
|
504
515
|
name: Optional name of the product
|
|
505
516
|
|
|
506
517
|
extra_headers: Send extra headers
|
|
@@ -525,6 +536,7 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
525
536
|
"license_key_activations_limit": license_key_activations_limit,
|
|
526
537
|
"license_key_duration": license_key_duration,
|
|
527
538
|
"license_key_enabled": license_key_enabled,
|
|
539
|
+
"metadata": metadata,
|
|
528
540
|
"name": name,
|
|
529
541
|
},
|
|
530
542
|
product_create_params.ProductCreateParams,
|
|
@@ -579,6 +591,7 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
579
591
|
license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
580
592
|
license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
|
|
581
593
|
license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
594
|
+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
582
595
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
583
596
|
price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
|
|
584
597
|
tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
|
|
@@ -619,6 +632,8 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
619
632
|
If `true`, additional fields related to license key (duration, activations
|
|
620
633
|
limit, activation message) become applicable.
|
|
621
634
|
|
|
635
|
+
metadata: Additional metadata for the product
|
|
636
|
+
|
|
622
637
|
name: Name of the product, optional and must be at most 100 characters.
|
|
623
638
|
|
|
624
639
|
price: Price details of the product.
|
|
@@ -649,6 +664,7 @@ class AsyncProductsResource(AsyncAPIResource):
|
|
|
649
664
|
"license_key_activations_limit": license_key_activations_limit,
|
|
650
665
|
"license_key_duration": license_key_duration,
|
|
651
666
|
"license_key_enabled": license_key_enabled,
|
|
667
|
+
"metadata": metadata,
|
|
652
668
|
"name": name,
|
|
653
669
|
"price": price,
|
|
654
670
|
"tax_category": tax_category,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .headers import (
|
|
4
|
+
HeadersResource,
|
|
5
|
+
AsyncHeadersResource,
|
|
6
|
+
HeadersResourceWithRawResponse,
|
|
7
|
+
AsyncHeadersResourceWithRawResponse,
|
|
8
|
+
HeadersResourceWithStreamingResponse,
|
|
9
|
+
AsyncHeadersResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .webhooks import (
|
|
12
|
+
WebhooksResource,
|
|
13
|
+
AsyncWebhooksResource,
|
|
14
|
+
WebhooksResourceWithRawResponse,
|
|
15
|
+
AsyncWebhooksResourceWithRawResponse,
|
|
16
|
+
WebhooksResourceWithStreamingResponse,
|
|
17
|
+
AsyncWebhooksResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"HeadersResource",
|
|
22
|
+
"AsyncHeadersResource",
|
|
23
|
+
"HeadersResourceWithRawResponse",
|
|
24
|
+
"AsyncHeadersResourceWithRawResponse",
|
|
25
|
+
"HeadersResourceWithStreamingResponse",
|
|
26
|
+
"AsyncHeadersResourceWithStreamingResponse",
|
|
27
|
+
"WebhooksResource",
|
|
28
|
+
"AsyncWebhooksResource",
|
|
29
|
+
"WebhooksResourceWithRawResponse",
|
|
30
|
+
"AsyncWebhooksResourceWithRawResponse",
|
|
31
|
+
"WebhooksResourceWithStreamingResponse",
|
|
32
|
+
"AsyncWebhooksResourceWithStreamingResponse",
|
|
33
|
+
]
|