dodopayments 1.47.0__py3-none-any.whl → 1.49.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/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "dodopayments"
4
- __version__ = "1.47.0" # x-release-please-version
4
+ __version__ = "1.49.0" # x-release-please-version
@@ -201,6 +201,7 @@ class SubscriptionsResource(SyncAPIResource):
201
201
  cancel_at_next_billing_date: Optional[bool] | NotGiven = NOT_GIVEN,
202
202
  disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
203
203
  metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
204
+ next_billing_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
204
205
  status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
205
206
  tax_id: Optional[str] | NotGiven = NOT_GIVEN,
206
207
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -230,6 +231,7 @@ class SubscriptionsResource(SyncAPIResource):
230
231
  "cancel_at_next_billing_date": cancel_at_next_billing_date,
231
232
  "disable_on_demand": disable_on_demand,
232
233
  "metadata": metadata,
234
+ "next_billing_date": next_billing_date,
233
235
  "status": status,
234
236
  "tax_id": tax_id,
235
237
  },
@@ -582,6 +584,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
582
584
  cancel_at_next_billing_date: Optional[bool] | NotGiven = NOT_GIVEN,
583
585
  disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
584
586
  metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
587
+ next_billing_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
585
588
  status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
586
589
  tax_id: Optional[str] | NotGiven = NOT_GIVEN,
587
590
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -611,6 +614,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
611
614
  "cancel_at_next_billing_date": cancel_at_next_billing_date,
612
615
  "disable_on_demand": disable_on_demand,
613
616
  "metadata": metadata,
617
+ "next_billing_date": next_billing_date,
614
618
  "status": status,
615
619
  "tax_id": tax_id,
616
620
  },
@@ -32,6 +32,7 @@ from ...types.webhook_list_response import WebhookListResponse
32
32
  from ...types.webhook_create_response import WebhookCreateResponse
33
33
  from ...types.webhook_update_response import WebhookUpdateResponse
34
34
  from ...types.webhook_retrieve_response import WebhookRetrieveResponse
35
+ from ...types.webhook_retrieve_secret_response import WebhookRetrieveSecretResponse
35
36
 
36
37
  __all__ = ["WebhooksResource", "AsyncWebhooksResource"]
37
38
 
@@ -84,14 +85,14 @@ class WebhooksResource(SyncAPIResource):
84
85
  Args:
85
86
  url: Url of the webhook
86
87
 
87
- description: Filter events to the webhook.
88
-
89
- Webhook event will only be sent for events in the list.
90
-
91
88
  disabled: Create the webhook in a disabled state.
92
89
 
93
90
  Default is false
94
91
 
92
+ filter_types: Filter events to the webhook.
93
+
94
+ Webhook event will only be sent for events in the list.
95
+
95
96
  headers: Custom headers to be passed
96
97
 
97
98
  idempotency_key: The request's idempotency key
@@ -305,6 +306,39 @@ class WebhooksResource(SyncAPIResource):
305
306
  cast_to=NoneType,
306
307
  )
307
308
 
309
+ def retrieve_secret(
310
+ self,
311
+ webhook_id: str,
312
+ *,
313
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
314
+ # The extra values given here take precedence over values defined on the client or passed to this method.
315
+ extra_headers: Headers | None = None,
316
+ extra_query: Query | None = None,
317
+ extra_body: Body | None = None,
318
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
319
+ ) -> WebhookRetrieveSecretResponse:
320
+ """
321
+ Get webhook secret by id
322
+
323
+ Args:
324
+ extra_headers: Send extra headers
325
+
326
+ extra_query: Add additional query parameters to the request
327
+
328
+ extra_body: Add additional JSON properties to the request
329
+
330
+ timeout: Override the client-level default timeout for this request, in seconds
331
+ """
332
+ if not webhook_id:
333
+ raise ValueError(f"Expected a non-empty value for `webhook_id` but received {webhook_id!r}")
334
+ return self._get(
335
+ f"/webhooks/{webhook_id}/secret",
336
+ options=make_request_options(
337
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
338
+ ),
339
+ cast_to=WebhookRetrieveSecretResponse,
340
+ )
341
+
308
342
 
309
343
  class AsyncWebhooksResource(AsyncAPIResource):
310
344
  @cached_property
@@ -354,14 +388,14 @@ class AsyncWebhooksResource(AsyncAPIResource):
354
388
  Args:
355
389
  url: Url of the webhook
356
390
 
357
- description: Filter events to the webhook.
358
-
359
- Webhook event will only be sent for events in the list.
360
-
361
391
  disabled: Create the webhook in a disabled state.
362
392
 
363
393
  Default is false
364
394
 
395
+ filter_types: Filter events to the webhook.
396
+
397
+ Webhook event will only be sent for events in the list.
398
+
365
399
  headers: Custom headers to be passed
366
400
 
367
401
  idempotency_key: The request's idempotency key
@@ -575,6 +609,39 @@ class AsyncWebhooksResource(AsyncAPIResource):
575
609
  cast_to=NoneType,
576
610
  )
577
611
 
612
+ async def retrieve_secret(
613
+ self,
614
+ webhook_id: str,
615
+ *,
616
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
617
+ # The extra values given here take precedence over values defined on the client or passed to this method.
618
+ extra_headers: Headers | None = None,
619
+ extra_query: Query | None = None,
620
+ extra_body: Body | None = None,
621
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
622
+ ) -> WebhookRetrieveSecretResponse:
623
+ """
624
+ Get webhook secret by id
625
+
626
+ Args:
627
+ extra_headers: Send extra headers
628
+
629
+ extra_query: Add additional query parameters to the request
630
+
631
+ extra_body: Add additional JSON properties to the request
632
+
633
+ timeout: Override the client-level default timeout for this request, in seconds
634
+ """
635
+ if not webhook_id:
636
+ raise ValueError(f"Expected a non-empty value for `webhook_id` but received {webhook_id!r}")
637
+ return await self._get(
638
+ f"/webhooks/{webhook_id}/secret",
639
+ options=make_request_options(
640
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
641
+ ),
642
+ cast_to=WebhookRetrieveSecretResponse,
643
+ )
644
+
578
645
 
579
646
  class WebhooksResourceWithRawResponse:
580
647
  def __init__(self, webhooks: WebhooksResource) -> None:
@@ -595,6 +662,9 @@ class WebhooksResourceWithRawResponse:
595
662
  self.delete = to_raw_response_wrapper(
596
663
  webhooks.delete,
597
664
  )
665
+ self.retrieve_secret = to_raw_response_wrapper(
666
+ webhooks.retrieve_secret,
667
+ )
598
668
 
599
669
  @cached_property
600
670
  def headers(self) -> HeadersResourceWithRawResponse:
@@ -620,6 +690,9 @@ class AsyncWebhooksResourceWithRawResponse:
620
690
  self.delete = async_to_raw_response_wrapper(
621
691
  webhooks.delete,
622
692
  )
693
+ self.retrieve_secret = async_to_raw_response_wrapper(
694
+ webhooks.retrieve_secret,
695
+ )
623
696
 
624
697
  @cached_property
625
698
  def headers(self) -> AsyncHeadersResourceWithRawResponse:
@@ -645,6 +718,9 @@ class WebhooksResourceWithStreamingResponse:
645
718
  self.delete = to_streamed_response_wrapper(
646
719
  webhooks.delete,
647
720
  )
721
+ self.retrieve_secret = to_streamed_response_wrapper(
722
+ webhooks.retrieve_secret,
723
+ )
648
724
 
649
725
  @cached_property
650
726
  def headers(self) -> HeadersResourceWithStreamingResponse:
@@ -670,6 +746,9 @@ class AsyncWebhooksResourceWithStreamingResponse:
670
746
  self.delete = async_to_streamed_response_wrapper(
671
747
  webhooks.delete,
672
748
  )
749
+ self.retrieve_secret = async_to_streamed_response_wrapper(
750
+ webhooks.retrieve_secret,
751
+ )
673
752
 
674
753
  @cached_property
675
754
  def headers(self) -> AsyncHeadersResourceWithStreamingResponse:
@@ -103,6 +103,7 @@ from .your_webhook_url_create_params import YourWebhookURLCreateParams as YourWe
103
103
  from .subscription_change_plan_params import SubscriptionChangePlanParams as SubscriptionChangePlanParams
104
104
  from .license_key_instance_list_params import LicenseKeyInstanceListParams as LicenseKeyInstanceListParams
105
105
  from .one_time_product_cart_item_param import OneTimeProductCartItemParam as OneTimeProductCartItemParam
106
+ from .webhook_retrieve_secret_response import WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse
106
107
  from .license_key_instance_update_params import LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams
107
108
  from .payment_retrieve_line_items_response import PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse
108
109
  from .misc_list_supported_countries_response import (
@@ -22,6 +22,8 @@ class SubscriptionUpdateParams(TypedDict, total=False):
22
22
 
23
23
  metadata: Optional[Dict[str, str]]
24
24
 
25
+ next_billing_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
26
+
25
27
  status: Optional[SubscriptionStatus]
26
28
 
27
29
  tax_id: Optional[str]
@@ -15,10 +15,6 @@ class WebhookCreateParams(TypedDict, total=False):
15
15
  """Url of the webhook"""
16
16
 
17
17
  description: Optional[str]
18
- """Filter events to the webhook.
19
-
20
- Webhook event will only be sent for events in the list.
21
- """
22
18
 
23
19
  disabled: Optional[bool]
24
20
  """Create the webhook in a disabled state.
@@ -27,6 +23,10 @@ class WebhookCreateParams(TypedDict, total=False):
27
23
  """
28
24
 
29
25
  filter_types: List[WebhookEventType]
26
+ """Filter events to the webhook.
27
+
28
+ Webhook event will only be sent for events in the list.
29
+ """
30
30
 
31
31
  headers: Optional[Dict[str, str]]
32
32
  """Custom headers to be passed"""
@@ -0,0 +1,9 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["WebhookRetrieveSecretResponse"]
6
+
7
+
8
+ class WebhookRetrieveSecretResponse(BaseModel):
9
+ secret: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.47.0
3
+ Version: 1.49.0
4
4
  Summary: The official Python library for the Dodo Payments API
5
5
  Project-URL: Homepage, https://github.com/dodopayments/dodopayments-python
6
6
  Project-URL: Repository, https://github.com/dodopayments/dodopayments-python
@@ -11,7 +11,7 @@ dodopayments/_resource.py,sha256=Jfh17Q3kKzAhO-dlfIwYlueN9t1edaaY_vmnC9vErpA,113
11
11
  dodopayments/_response.py,sha256=PDvrSN3E3IkXVw2GvyOCTNB8ch0Xn9yaWQz4w1nHZEQ,28854
12
12
  dodopayments/_streaming.py,sha256=U4D6MhotaUaGaHz32lBt0XM98IOPIpPbKHUfbb0HGCk,10124
13
13
  dodopayments/_types.py,sha256=gP0yR7AIegimhmZ6rYIjSHFCr9YWzvh-jZabbVcgtio,6203
14
- dodopayments/_version.py,sha256=AbtMH8BJJg3HdQORv-gMy9lZZt3VvCFLTdHeOjU6nq8,165
14
+ dodopayments/_version.py,sha256=DWNw6JaeK-GclOLIIWPoNOxiVjR6YpGzabwlm1yXMAs,165
15
15
  dodopayments/pagination.py,sha256=gaS62u_b_92OYnUHmstLAFL5AF2_cr3Z6VpzSHd0mMw,2796
16
16
  dodopayments/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  dodopayments/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
@@ -37,7 +37,7 @@ dodopayments/resources/misc.py,sha256=BRPUna3lLIrJ-gMGOOQL1-xYx_oMwVDzKL4d498C7p
37
37
  dodopayments/resources/payments.py,sha256=8VNZCDvtjjUyj_yETzF-nx19gqWzfca9Za5zb2dwfMA,24533
38
38
  dodopayments/resources/payouts.py,sha256=llIbNwI3vQZYf2HsgYL5Irfl6BBoQc1g4aLPWwY09Uo,6926
39
39
  dodopayments/resources/refunds.py,sha256=BS9PcxZhEmBZveZTRo4__WmgVwKpqEEHQDp7tuMh7tQ,15045
40
- dodopayments/resources/subscriptions.py,sha256=WKTa3LZa2bUBY-sng6ppL8ZmsuOfeNpP2u-92jp_gmw,38426
40
+ dodopayments/resources/subscriptions.py,sha256=JpSoD_zAMUZrFk8aK7ejzFoLOBOtdwT8ol2WU8H16c0,38702
41
41
  dodopayments/resources/your_webhook_url.py,sha256=dQ4wO8B_Ioxn-cm_Rlq7y56qqfmptbKpG6D9ZivI7RQ,8540
42
42
  dodopayments/resources/customers/__init__.py,sha256=RIP1WYqO_PIq9b57tDaJWf9zIRxG_iFeFkOVhe3apAo,1146
43
43
  dodopayments/resources/customers/customer_portal.py,sha256=f74AYBYOb0yIffh4jLmIB3igrcfaHnCS0oAbACmGlyA,6961
@@ -50,8 +50,8 @@ dodopayments/resources/products/images.py,sha256=7pl2ZFMB3Y_ltwAOiyC0tif31tAXSf_
50
50
  dodopayments/resources/products/products.py,sha256=3GiRtx4HDWgzj5YVCPgZmvqwjZq3IBgw2eQWwnR55vw,39026
51
51
  dodopayments/resources/webhooks/__init__.py,sha256=qhsQMSm4GpXfesAwbvPOYkhytB3Ab_uW4Nqur7h1R8w,1041
52
52
  dodopayments/resources/webhooks/headers.py,sha256=wkTnIIfL2XjFcsXB4ceQVJtsty9uxuLVY_cRcaOZJ7M,9581
53
- dodopayments/resources/webhooks/webhooks.py,sha256=3g4Ki88NZTPH8cZoj1MUo-bVyLcgrTMGTDrxuA37axw,25179
54
- dodopayments/types/__init__.py,sha256=RyPGo6it8vH4IPJ_hoRBsinQh6c3VhF3_NN9XhEKAh4,7961
53
+ dodopayments/resources/webhooks/webhooks.py,sha256=HFbUyZ3iPJnz086qZ-m3D506n2dfIVcPrcbgr9hT5_4,28377
54
+ dodopayments/types/__init__.py,sha256=mU0jmT6Q4o_IFpK3bqSCTR0ViUcaqXRERl43o_9lRyw,8070
55
55
  dodopayments/types/addon_cart_response_item.py,sha256=R-I8Zd2HJKn0DmXmv6Oyu4oo-oEC1-dud0Q6_yqDB7k,235
56
56
  dodopayments/types/addon_cart_response_item_param.py,sha256=ZLoTI_zd-i6CTJ3lc_Eq-vaahalHshqgcpYdMS5lcpM,332
57
57
  dodopayments/types/addon_create_params.py,sha256=a1bKexuFdJcWUPzvPodeeTjqYvCyOwTdp8b2es2ygx8,695
@@ -144,15 +144,16 @@ dodopayments/types/subscription_list_params.py,sha256=rh6yKzc_2T2R2P4ASk3L6wll-w
144
144
  dodopayments/types/subscription_list_response.py,sha256=CVNB4vhOLHMTsFndufVcIv58CfOyUDV6HjhSE3uAH8M,2750
145
145
  dodopayments/types/subscription_param.py,sha256=bPJOtuqOqpv8yJSy2Q10XNtK-MKHGnCr-HSjJjwZc9A,3474
146
146
  dodopayments/types/subscription_status.py,sha256=3UxvrPY4QVcppbeIV86qe6p2YUQK8sPVcxbqUJn4V8Y,277
147
- dodopayments/types/subscription_update_params.py,sha256=OZwspac0I8t3ulswhXn4EQlkCZClgbqkpyvmkGHgQxA,911
147
+ dodopayments/types/subscription_update_params.py,sha256=wyf1PalFSc7mZy3Ohz1wtJbp6H60OYGeVwQSMFaVCOs,1005
148
148
  dodopayments/types/tax_category.py,sha256=Fwgm25IMhHaSziDOfqePSBKE4PczW_KFJq1yE1uSfpA,245
149
149
  dodopayments/types/time_interval.py,sha256=ZTA79GvVo5RjERLfRrY7ad6e0OqfeeoZuMnE1NShcio,231
150
- dodopayments/types/webhook_create_params.py,sha256=ZtlMqt014PSO9dBcEFOu-UFreo3qgxFNnMiea5auSW0,974
150
+ dodopayments/types/webhook_create_params.py,sha256=JsM7wcpIzfmLiFWG9rJ17SsdYFH5e8vXixU6VgDdpqI,974
151
151
  dodopayments/types/webhook_create_response.py,sha256=dH3jmco090stLBFmtiVSeruRb6tYnWWHfvxX_Rc_rqc,887
152
152
  dodopayments/types/webhook_event_type.py,sha256=TzMHCyMXyxsGLLVyg7h9if4vth5Iaiw7EBijr1a-37k,740
153
153
  dodopayments/types/webhook_list_params.py,sha256=SCrBT0s4VDOQdRvqgL6P5YDhqd3njW5rQlqOAnu3r40,430
154
154
  dodopayments/types/webhook_list_response.py,sha256=3zppjO95dQpqTxlADqwSTF-URSsopsOMNeYxIbRolHQ,883
155
155
  dodopayments/types/webhook_retrieve_response.py,sha256=kZIwIwT_AjHWFVcDw2u0eZhdOPIXfodM0vADY4BpAlI,891
156
+ dodopayments/types/webhook_retrieve_secret_response.py,sha256=kkjb6oJp9SerqAhJjscOq3basHMKP95q3nvz_c1oIW8,230
156
157
  dodopayments/types/webhook_update_params.py,sha256=Gv-1jteNEm58ZevionMCv7xCUUZUJ1cxTKV4M23oQIw,807
157
158
  dodopayments/types/webhook_update_response.py,sha256=K60qOiOHUe97ousH0cz497hzQINwxDub1sYm1GKpu0o,887
158
159
  dodopayments/types/your_webhook_url_create_params.py,sha256=vgtEfhPqFQBZ-aA31qLYpLkgH3bbhJLU5fjyTi6V0xc,1991
@@ -165,7 +166,7 @@ dodopayments/types/products/image_update_response.py,sha256=TcJyXjoJlONpwwR6yZdI
165
166
  dodopayments/types/webhooks/__init__.py,sha256=F_ZpQalnBiuXt_C2pUepZjgJZwiAGKNwaEB03ZB6sUM,285
166
167
  dodopayments/types/webhooks/header_retrieve_response.py,sha256=IKNaI2xO9qU7UXbffENYrRo2vUr0mqb8TIkAQdtLtXI,369
167
168
  dodopayments/types/webhooks/header_update_params.py,sha256=USiXP4oFllTJgOBcBZQrcLlEzEOB6RHH9Ugdxatyy3g,376
168
- dodopayments-1.47.0.dist-info/METADATA,sha256=2ehTWwf1RQWf5Ep2SVs84sI3VPceDaCubcWm7_QVVG8,18832
169
- dodopayments-1.47.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
170
- dodopayments-1.47.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
171
- dodopayments-1.47.0.dist-info/RECORD,,
169
+ dodopayments-1.49.0.dist-info/METADATA,sha256=kxr8U-HHyrHZdCPfMZHFawwqyG4oxSa1L8ZR_LgTaNM,18832
170
+ dodopayments-1.49.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
171
+ dodopayments-1.49.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
172
+ dodopayments-1.49.0.dist-info/RECORD,,