dodopayments 1.22.0__py3-none-any.whl → 1.27.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 (35) hide show
  1. dodopayments/__init__.py +5 -0
  2. dodopayments/_client.py +9 -0
  3. dodopayments/_utils/_resources_proxy.py +24 -0
  4. dodopayments/_version.py +1 -1
  5. dodopayments/resources/__init__.py +14 -0
  6. dodopayments/resources/brands.py +495 -0
  7. dodopayments/resources/payments.py +83 -0
  8. dodopayments/resources/products/products.py +20 -0
  9. dodopayments/resources/refunds.py +9 -1
  10. dodopayments/resources/subscriptions.py +22 -2
  11. dodopayments/types/__init__.py +8 -0
  12. dodopayments/types/brand_create_params.py +20 -0
  13. dodopayments/types/brand_create_response.py +35 -0
  14. dodopayments/types/brand_list_response.py +40 -0
  15. dodopayments/types/brand_retrieve_response.py +35 -0
  16. dodopayments/types/brand_update_images_response.py +13 -0
  17. dodopayments/types/brand_update_params.py +19 -0
  18. dodopayments/types/brand_update_response.py +35 -0
  19. dodopayments/types/payment.py +3 -0
  20. dodopayments/types/payment_list_params.py +3 -0
  21. dodopayments/types/payment_list_response.py +2 -0
  22. dodopayments/types/payment_retrieve_line_items_response.py +26 -0
  23. dodopayments/types/product.py +2 -0
  24. dodopayments/types/product_create_params.py +3 -0
  25. dodopayments/types/product_list_params.py +3 -0
  26. dodopayments/types/product_update_params.py +2 -0
  27. dodopayments/types/refund.py +3 -0
  28. dodopayments/types/refund_create_params.py +16 -2
  29. dodopayments/types/subscription_charge_params.py +3 -0
  30. dodopayments/types/subscription_create_response.py +3 -0
  31. dodopayments/types/subscription_list_params.py +3 -0
  32. {dodopayments-1.22.0.dist-info → dodopayments-1.27.0.dist-info}/METADATA +2 -2
  33. {dodopayments-1.22.0.dist-info → dodopayments-1.27.0.dist-info}/RECORD +35 -25
  34. {dodopayments-1.22.0.dist-info → dodopayments-1.27.0.dist-info}/WHEEL +0 -0
  35. {dodopayments-1.22.0.dist-info → dodopayments-1.27.0.dist-info}/licenses/LICENSE +0 -0
@@ -29,6 +29,7 @@ from ..types.payment_list_response import PaymentListResponse
29
29
  from ..types.customer_request_param import CustomerRequestParam
30
30
  from ..types.payment_create_response import PaymentCreateResponse
31
31
  from ..types.one_time_product_cart_item_param import OneTimeProductCartItemParam
32
+ from ..types.payment_retrieve_line_items_response import PaymentRetrieveLineItemsResponse
32
33
 
33
34
  __all__ = ["PaymentsResource", "AsyncPaymentsResource"]
34
35
 
@@ -188,6 +189,7 @@ class PaymentsResource(SyncAPIResource):
188
189
  def list(
189
190
  self,
190
191
  *,
192
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
191
193
  created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
192
194
  created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
193
195
  customer_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -204,6 +206,8 @@ class PaymentsResource(SyncAPIResource):
204
206
  ) -> SyncDefaultPageNumberPagination[PaymentListResponse]:
205
207
  """
206
208
  Args:
209
+ brand_id: filter by Brand id
210
+
207
211
  created_at_gte: Get events after this created time
208
212
 
209
213
  created_at_lte: Get events created before this time
@@ -236,6 +240,7 @@ class PaymentsResource(SyncAPIResource):
236
240
  timeout=timeout,
237
241
  query=maybe_transform(
238
242
  {
243
+ "brand_id": brand_id,
239
244
  "created_at_gte": created_at_gte,
240
245
  "created_at_lte": created_at_lte,
241
246
  "customer_id": customer_id,
@@ -250,6 +255,37 @@ class PaymentsResource(SyncAPIResource):
250
255
  model=PaymentListResponse,
251
256
  )
252
257
 
258
+ def retrieve_line_items(
259
+ self,
260
+ payment_id: str,
261
+ *,
262
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
263
+ # The extra values given here take precedence over values defined on the client or passed to this method.
264
+ extra_headers: Headers | None = None,
265
+ extra_query: Query | None = None,
266
+ extra_body: Body | None = None,
267
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
268
+ ) -> PaymentRetrieveLineItemsResponse:
269
+ """
270
+ Args:
271
+ extra_headers: Send extra headers
272
+
273
+ extra_query: Add additional query parameters to the request
274
+
275
+ extra_body: Add additional JSON properties to the request
276
+
277
+ timeout: Override the client-level default timeout for this request, in seconds
278
+ """
279
+ if not payment_id:
280
+ raise ValueError(f"Expected a non-empty value for `payment_id` but received {payment_id!r}")
281
+ return self._get(
282
+ f"/payments/{payment_id}/line-items",
283
+ options=make_request_options(
284
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
285
+ ),
286
+ cast_to=PaymentRetrieveLineItemsResponse,
287
+ )
288
+
253
289
 
254
290
  class AsyncPaymentsResource(AsyncAPIResource):
255
291
  @cached_property
@@ -406,6 +442,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
406
442
  def list(
407
443
  self,
408
444
  *,
445
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
409
446
  created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
410
447
  created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
411
448
  customer_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -422,6 +459,8 @@ class AsyncPaymentsResource(AsyncAPIResource):
422
459
  ) -> AsyncPaginator[PaymentListResponse, AsyncDefaultPageNumberPagination[PaymentListResponse]]:
423
460
  """
424
461
  Args:
462
+ brand_id: filter by Brand id
463
+
425
464
  created_at_gte: Get events after this created time
426
465
 
427
466
  created_at_lte: Get events created before this time
@@ -454,6 +493,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
454
493
  timeout=timeout,
455
494
  query=maybe_transform(
456
495
  {
496
+ "brand_id": brand_id,
457
497
  "created_at_gte": created_at_gte,
458
498
  "created_at_lte": created_at_lte,
459
499
  "customer_id": customer_id,
@@ -468,6 +508,37 @@ class AsyncPaymentsResource(AsyncAPIResource):
468
508
  model=PaymentListResponse,
469
509
  )
470
510
 
511
+ async def retrieve_line_items(
512
+ self,
513
+ payment_id: str,
514
+ *,
515
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
516
+ # The extra values given here take precedence over values defined on the client or passed to this method.
517
+ extra_headers: Headers | None = None,
518
+ extra_query: Query | None = None,
519
+ extra_body: Body | None = None,
520
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
521
+ ) -> PaymentRetrieveLineItemsResponse:
522
+ """
523
+ Args:
524
+ extra_headers: Send extra headers
525
+
526
+ extra_query: Add additional query parameters to the request
527
+
528
+ extra_body: Add additional JSON properties to the request
529
+
530
+ timeout: Override the client-level default timeout for this request, in seconds
531
+ """
532
+ if not payment_id:
533
+ raise ValueError(f"Expected a non-empty value for `payment_id` but received {payment_id!r}")
534
+ return await self._get(
535
+ f"/payments/{payment_id}/line-items",
536
+ options=make_request_options(
537
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
538
+ ),
539
+ cast_to=PaymentRetrieveLineItemsResponse,
540
+ )
541
+
471
542
 
472
543
  class PaymentsResourceWithRawResponse:
473
544
  def __init__(self, payments: PaymentsResource) -> None:
@@ -482,6 +553,9 @@ class PaymentsResourceWithRawResponse:
482
553
  self.list = to_raw_response_wrapper(
483
554
  payments.list,
484
555
  )
556
+ self.retrieve_line_items = to_raw_response_wrapper(
557
+ payments.retrieve_line_items,
558
+ )
485
559
 
486
560
 
487
561
  class AsyncPaymentsResourceWithRawResponse:
@@ -497,6 +571,9 @@ class AsyncPaymentsResourceWithRawResponse:
497
571
  self.list = async_to_raw_response_wrapper(
498
572
  payments.list,
499
573
  )
574
+ self.retrieve_line_items = async_to_raw_response_wrapper(
575
+ payments.retrieve_line_items,
576
+ )
500
577
 
501
578
 
502
579
  class PaymentsResourceWithStreamingResponse:
@@ -512,6 +589,9 @@ class PaymentsResourceWithStreamingResponse:
512
589
  self.list = to_streamed_response_wrapper(
513
590
  payments.list,
514
591
  )
592
+ self.retrieve_line_items = to_streamed_response_wrapper(
593
+ payments.retrieve_line_items,
594
+ )
515
595
 
516
596
 
517
597
  class AsyncPaymentsResourceWithStreamingResponse:
@@ -527,3 +607,6 @@ class AsyncPaymentsResourceWithStreamingResponse:
527
607
  self.list = async_to_streamed_response_wrapper(
528
608
  payments.list,
529
609
  )
610
+ self.retrieve_line_items = async_to_streamed_response_wrapper(
611
+ payments.retrieve_line_items,
612
+ )
@@ -71,6 +71,7 @@ class ProductsResource(SyncAPIResource):
71
71
  price: PriceParam,
72
72
  tax_category: TaxCategory,
73
73
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
74
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
74
75
  description: Optional[str] | NotGiven = NOT_GIVEN,
75
76
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
76
77
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
@@ -91,6 +92,8 @@ class ProductsResource(SyncAPIResource):
91
92
 
92
93
  addons: Addons available for subscription product
93
94
 
95
+ brand_id: Brand id for the product, if not provided will default to primary brand
96
+
94
97
  description: Optional description of the product
95
98
 
96
99
  license_key_activation_message: Optional message displayed during license key activation
@@ -116,6 +119,7 @@ class ProductsResource(SyncAPIResource):
116
119
  "price": price,
117
120
  "tax_category": tax_category,
118
121
  "addons": addons,
122
+ "brand_id": brand_id,
119
123
  "description": description,
120
124
  "license_key_activation_message": license_key_activation_message,
121
125
  "license_key_activations_limit": license_key_activations_limit,
@@ -167,6 +171,7 @@ class ProductsResource(SyncAPIResource):
167
171
  id: str,
168
172
  *,
169
173
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
174
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
170
175
  description: Optional[str] | NotGiven = NOT_GIVEN,
171
176
  image_id: Optional[str] | NotGiven = NOT_GIVEN,
172
177
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -227,6 +232,7 @@ class ProductsResource(SyncAPIResource):
227
232
  body=maybe_transform(
228
233
  {
229
234
  "addons": addons,
235
+ "brand_id": brand_id,
230
236
  "description": description,
231
237
  "image_id": image_id,
232
238
  "license_key_activation_message": license_key_activation_message,
@@ -249,6 +255,7 @@ class ProductsResource(SyncAPIResource):
249
255
  self,
250
256
  *,
251
257
  archived: bool | NotGiven = NOT_GIVEN,
258
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
252
259
  page_number: Optional[int] | NotGiven = NOT_GIVEN,
253
260
  page_size: Optional[int] | NotGiven = NOT_GIVEN,
254
261
  recurring: Optional[bool] | NotGiven = NOT_GIVEN,
@@ -263,6 +270,8 @@ class ProductsResource(SyncAPIResource):
263
270
  Args:
264
271
  archived: List archived products
265
272
 
273
+ brand_id: filter by Brand id
274
+
266
275
  page_number: Page number default is 0
267
276
 
268
277
  page_size: Page size default is 10 max is 100
@@ -293,6 +302,7 @@ class ProductsResource(SyncAPIResource):
293
302
  query=maybe_transform(
294
303
  {
295
304
  "archived": archived,
305
+ "brand_id": brand_id,
296
306
  "page_number": page_number,
297
307
  "page_size": page_size,
298
308
  "recurring": recurring,
@@ -398,6 +408,7 @@ class AsyncProductsResource(AsyncAPIResource):
398
408
  price: PriceParam,
399
409
  tax_category: TaxCategory,
400
410
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
411
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
401
412
  description: Optional[str] | NotGiven = NOT_GIVEN,
402
413
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
403
414
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
@@ -418,6 +429,8 @@ class AsyncProductsResource(AsyncAPIResource):
418
429
 
419
430
  addons: Addons available for subscription product
420
431
 
432
+ brand_id: Brand id for the product, if not provided will default to primary brand
433
+
421
434
  description: Optional description of the product
422
435
 
423
436
  license_key_activation_message: Optional message displayed during license key activation
@@ -443,6 +456,7 @@ class AsyncProductsResource(AsyncAPIResource):
443
456
  "price": price,
444
457
  "tax_category": tax_category,
445
458
  "addons": addons,
459
+ "brand_id": brand_id,
446
460
  "description": description,
447
461
  "license_key_activation_message": license_key_activation_message,
448
462
  "license_key_activations_limit": license_key_activations_limit,
@@ -494,6 +508,7 @@ class AsyncProductsResource(AsyncAPIResource):
494
508
  id: str,
495
509
  *,
496
510
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
511
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
497
512
  description: Optional[str] | NotGiven = NOT_GIVEN,
498
513
  image_id: Optional[str] | NotGiven = NOT_GIVEN,
499
514
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -554,6 +569,7 @@ class AsyncProductsResource(AsyncAPIResource):
554
569
  body=await async_maybe_transform(
555
570
  {
556
571
  "addons": addons,
572
+ "brand_id": brand_id,
557
573
  "description": description,
558
574
  "image_id": image_id,
559
575
  "license_key_activation_message": license_key_activation_message,
@@ -576,6 +592,7 @@ class AsyncProductsResource(AsyncAPIResource):
576
592
  self,
577
593
  *,
578
594
  archived: bool | NotGiven = NOT_GIVEN,
595
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
579
596
  page_number: Optional[int] | NotGiven = NOT_GIVEN,
580
597
  page_size: Optional[int] | NotGiven = NOT_GIVEN,
581
598
  recurring: Optional[bool] | NotGiven = NOT_GIVEN,
@@ -590,6 +607,8 @@ class AsyncProductsResource(AsyncAPIResource):
590
607
  Args:
591
608
  archived: List archived products
592
609
 
610
+ brand_id: filter by Brand id
611
+
593
612
  page_number: Page number default is 0
594
613
 
595
614
  page_size: Page size default is 10 max is 100
@@ -620,6 +639,7 @@ class AsyncProductsResource(AsyncAPIResource):
620
639
  query=maybe_transform(
621
640
  {
622
641
  "archived": archived,
642
+ "brand_id": brand_id,
623
643
  "page_number": page_number,
624
644
  "page_size": page_size,
625
645
  "recurring": recurring,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Optional
5
+ from typing import Union, Iterable, Optional
6
6
  from datetime import datetime
7
7
 
8
8
  import httpx
@@ -50,6 +50,7 @@ class RefundsResource(SyncAPIResource):
50
50
  self,
51
51
  *,
52
52
  payment_id: str,
53
+ items: Optional[Iterable[refund_create_params.Item]] | NotGiven = NOT_GIVEN,
53
54
  reason: Optional[str] | NotGiven = NOT_GIVEN,
54
55
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
55
56
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -62,6 +63,8 @@ class RefundsResource(SyncAPIResource):
62
63
  Args:
63
64
  payment_id: The unique identifier of the payment to be refunded.
64
65
 
66
+ items: Partially Refund an Individual Item
67
+
65
68
  reason: The reason for the refund, if any. Maximum length is 3000 characters. Optional.
66
69
 
67
70
  extra_headers: Send extra headers
@@ -77,6 +80,7 @@ class RefundsResource(SyncAPIResource):
77
80
  body=maybe_transform(
78
81
  {
79
82
  "payment_id": payment_id,
83
+ "items": items,
80
84
  "reason": reason,
81
85
  },
82
86
  refund_create_params.RefundCreateParams,
@@ -204,6 +208,7 @@ class AsyncRefundsResource(AsyncAPIResource):
204
208
  self,
205
209
  *,
206
210
  payment_id: str,
211
+ items: Optional[Iterable[refund_create_params.Item]] | NotGiven = NOT_GIVEN,
207
212
  reason: Optional[str] | NotGiven = NOT_GIVEN,
208
213
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
209
214
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -216,6 +221,8 @@ class AsyncRefundsResource(AsyncAPIResource):
216
221
  Args:
217
222
  payment_id: The unique identifier of the payment to be refunded.
218
223
 
224
+ items: Partially Refund an Individual Item
225
+
219
226
  reason: The reason for the refund, if any. Maximum length is 3000 characters. Optional.
220
227
 
221
228
  extra_headers: Send extra headers
@@ -231,6 +238,7 @@ class AsyncRefundsResource(AsyncAPIResource):
231
238
  body=await async_maybe_transform(
232
239
  {
233
240
  "payment_id": payment_id,
241
+ "items": items,
234
242
  "reason": reason,
235
243
  },
236
244
  refund_create_params.RefundCreateParams,
@@ -255,6 +255,7 @@ class SubscriptionsResource(SyncAPIResource):
255
255
  def list(
256
256
  self,
257
257
  *,
258
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
258
259
  created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
259
260
  created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
260
261
  customer_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -270,6 +271,8 @@ class SubscriptionsResource(SyncAPIResource):
270
271
  ) -> SyncDefaultPageNumberPagination[SubscriptionListResponse]:
271
272
  """
272
273
  Args:
274
+ brand_id: filter by Brand id
275
+
273
276
  created_at_gte: Get events after this created time
274
277
 
275
278
  created_at_lte: Get events created before this time
@@ -300,6 +303,7 @@ class SubscriptionsResource(SyncAPIResource):
300
303
  timeout=timeout,
301
304
  query=maybe_transform(
302
305
  {
306
+ "brand_id": brand_id,
303
307
  "created_at_gte": created_at_gte,
304
308
  "created_at_lte": created_at_lte,
305
309
  "customer_id": customer_id,
@@ -370,6 +374,7 @@ class SubscriptionsResource(SyncAPIResource):
370
374
  subscription_id: str,
371
375
  *,
372
376
  product_price: int,
377
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
373
378
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
374
379
  # The extra values given here take precedence over values defined on the client or passed to this method.
375
380
  extra_headers: Headers | None = None,
@@ -395,7 +400,13 @@ class SubscriptionsResource(SyncAPIResource):
395
400
  raise ValueError(f"Expected a non-empty value for `subscription_id` but received {subscription_id!r}")
396
401
  return self._post(
397
402
  f"/subscriptions/{subscription_id}/charge",
398
- body=maybe_transform({"product_price": product_price}, subscription_charge_params.SubscriptionChargeParams),
403
+ body=maybe_transform(
404
+ {
405
+ "product_price": product_price,
406
+ "metadata": metadata,
407
+ },
408
+ subscription_charge_params.SubscriptionChargeParams,
409
+ ),
399
410
  options=make_request_options(
400
411
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
401
412
  ),
@@ -617,6 +628,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
617
628
  def list(
618
629
  self,
619
630
  *,
631
+ brand_id: Optional[str] | NotGiven = NOT_GIVEN,
620
632
  created_at_gte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
621
633
  created_at_lte: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
622
634
  customer_id: Optional[str] | NotGiven = NOT_GIVEN,
@@ -632,6 +644,8 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
632
644
  ) -> AsyncPaginator[SubscriptionListResponse, AsyncDefaultPageNumberPagination[SubscriptionListResponse]]:
633
645
  """
634
646
  Args:
647
+ brand_id: filter by Brand id
648
+
635
649
  created_at_gte: Get events after this created time
636
650
 
637
651
  created_at_lte: Get events created before this time
@@ -662,6 +676,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
662
676
  timeout=timeout,
663
677
  query=maybe_transform(
664
678
  {
679
+ "brand_id": brand_id,
665
680
  "created_at_gte": created_at_gte,
666
681
  "created_at_lte": created_at_lte,
667
682
  "customer_id": customer_id,
@@ -732,6 +747,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
732
747
  subscription_id: str,
733
748
  *,
734
749
  product_price: int,
750
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
735
751
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
736
752
  # The extra values given here take precedence over values defined on the client or passed to this method.
737
753
  extra_headers: Headers | None = None,
@@ -758,7 +774,11 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
758
774
  return await self._post(
759
775
  f"/subscriptions/{subscription_id}/charge",
760
776
  body=await async_maybe_transform(
761
- {"product_price": product_price}, subscription_charge_params.SubscriptionChargeParams
777
+ {
778
+ "product_price": product_price,
779
+ "metadata": metadata,
780
+ },
781
+ subscription_charge_params.SubscriptionChargeParams,
762
782
  ),
763
783
  options=make_request_options(
764
784
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -30,6 +30,9 @@ from .payout_list_params import PayoutListParams as PayoutListParams
30
30
  from .refund_list_params import RefundListParams as RefundListParams
31
31
  from .addon_create_params import AddonCreateParams as AddonCreateParams
32
32
  from .addon_update_params import AddonUpdateParams as AddonUpdateParams
33
+ from .brand_create_params import BrandCreateParams as BrandCreateParams
34
+ from .brand_list_response import BrandListResponse as BrandListResponse
35
+ from .brand_update_params import BrandUpdateParams as BrandUpdateParams
33
36
  from .dispute_list_params import DisputeListParams as DisputeListParams
34
37
  from .payment_list_params import PaymentListParams as PaymentListParams
35
38
  from .product_list_params import ProductListParams as ProductListParams
@@ -41,6 +44,8 @@ from .license_key_instance import LicenseKeyInstance as LicenseKeyInstance
41
44
  from .payout_list_response import PayoutListResponse as PayoutListResponse
42
45
  from .refund_create_params import RefundCreateParams as RefundCreateParams
43
46
  from .billing_address_param import BillingAddressParam as BillingAddressParam
47
+ from .brand_create_response import BrandCreateResponse as BrandCreateResponse
48
+ from .brand_update_response import BrandUpdateResponse as BrandUpdateResponse
44
49
  from .dispute_list_response import DisputeListResponse as DisputeListResponse
45
50
  from .payment_create_params import PaymentCreateParams as PaymentCreateParams
46
51
  from .payment_list_response import PaymentListResponse as PaymentListResponse
@@ -52,6 +57,7 @@ from .customer_request_param import CustomerRequestParam as CustomerRequestParam
52
57
  from .customer_update_params import CustomerUpdateParams as CustomerUpdateParams
53
58
  from .discount_create_params import DiscountCreateParams as DiscountCreateParams
54
59
  from .discount_update_params import DiscountUpdateParams as DiscountUpdateParams
60
+ from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
55
61
  from .customer_portal_session import CustomerPortalSession as CustomerPortalSession
56
62
  from .license_activate_params import LicenseActivateParams as LicenseActivateParams
57
63
  from .license_key_list_params import LicenseKeyListParams as LicenseKeyListParams
@@ -73,6 +79,7 @@ from .subscription_create_params import SubscriptionCreateParams as Subscription
73
79
  from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse
74
80
  from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams
75
81
  from .addon_update_images_response import AddonUpdateImagesResponse as AddonUpdateImagesResponse
82
+ from .brand_update_images_response import BrandUpdateImagesResponse as BrandUpdateImagesResponse
76
83
  from .subscription_charge_response import SubscriptionChargeResponse as SubscriptionChargeResponse
77
84
  from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
78
85
  from .attach_existing_customer_param import AttachExistingCustomerParam as AttachExistingCustomerParam
@@ -80,6 +87,7 @@ from .subscription_change_plan_params import SubscriptionChangePlanParams as Sub
80
87
  from .license_key_instance_list_params import LicenseKeyInstanceListParams as LicenseKeyInstanceListParams
81
88
  from .one_time_product_cart_item_param import OneTimeProductCartItemParam as OneTimeProductCartItemParam
82
89
  from .license_key_instance_update_params import LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams
90
+ from .payment_retrieve_line_items_response import PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse
83
91
  from .misc_list_supported_countries_response import (
84
92
  MiscListSupportedCountriesResponse as MiscListSupportedCountriesResponse,
85
93
  )
@@ -0,0 +1,20 @@
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 TypedDict
7
+
8
+ __all__ = ["BrandCreateParams"]
9
+
10
+
11
+ class BrandCreateParams(TypedDict, total=False):
12
+ description: Optional[str]
13
+
14
+ name: Optional[str]
15
+
16
+ statement_descriptor: Optional[str]
17
+
18
+ support_email: Optional[str]
19
+
20
+ url: Optional[str]
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["BrandCreateResponse"]
9
+
10
+
11
+ class BrandCreateResponse(BaseModel):
12
+ brand_id: str
13
+
14
+ business_id: str
15
+
16
+ enabled: bool
17
+
18
+ statement_descriptor: str
19
+
20
+ verification_enabled: bool
21
+
22
+ verification_status: Literal["Success", "Fail", "Review", "Hold"]
23
+
24
+ description: Optional[str] = None
25
+
26
+ image: Optional[str] = None
27
+
28
+ name: Optional[str] = None
29
+
30
+ reason_for_hold: Optional[str] = None
31
+ """Incase the brand verification fails or is put on hold"""
32
+
33
+ support_email: Optional[str] = None
34
+
35
+ url: Optional[str] = None
@@ -0,0 +1,40 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["BrandListResponse", "Item"]
9
+
10
+
11
+ class Item(BaseModel):
12
+ brand_id: str
13
+
14
+ business_id: str
15
+
16
+ enabled: bool
17
+
18
+ statement_descriptor: str
19
+
20
+ verification_enabled: bool
21
+
22
+ verification_status: Literal["Success", "Fail", "Review", "Hold"]
23
+
24
+ description: Optional[str] = None
25
+
26
+ image: Optional[str] = None
27
+
28
+ name: Optional[str] = None
29
+
30
+ reason_for_hold: Optional[str] = None
31
+ """Incase the brand verification fails or is put on hold"""
32
+
33
+ support_email: Optional[str] = None
34
+
35
+ url: Optional[str] = None
36
+
37
+
38
+ class BrandListResponse(BaseModel):
39
+ items: List[Item]
40
+ """List of brands for this business"""
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["BrandRetrieveResponse"]
9
+
10
+
11
+ class BrandRetrieveResponse(BaseModel):
12
+ brand_id: str
13
+
14
+ business_id: str
15
+
16
+ enabled: bool
17
+
18
+ statement_descriptor: str
19
+
20
+ verification_enabled: bool
21
+
22
+ verification_status: Literal["Success", "Fail", "Review", "Hold"]
23
+
24
+ description: Optional[str] = None
25
+
26
+ image: Optional[str] = None
27
+
28
+ name: Optional[str] = None
29
+
30
+ reason_for_hold: Optional[str] = None
31
+ """Incase the brand verification fails or is put on hold"""
32
+
33
+ support_email: Optional[str] = None
34
+
35
+ url: Optional[str] = None
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["BrandUpdateImagesResponse"]
6
+
7
+
8
+ class BrandUpdateImagesResponse(BaseModel):
9
+ image_id: str
10
+ """UUID that will be used as the image identifier/key suffix"""
11
+
12
+ url: str
13
+ """Presigned URL to upload the image"""
@@ -0,0 +1,19 @@
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 TypedDict
7
+
8
+ __all__ = ["BrandUpdateParams"]
9
+
10
+
11
+ class BrandUpdateParams(TypedDict, total=False):
12
+ image_id: Optional[str]
13
+ """The UUID you got back from the presigned‐upload call"""
14
+
15
+ name: Optional[str]
16
+
17
+ statement_descriptor: Optional[str]
18
+
19
+ support_email: Optional[str]