checkout-intents 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checkout_intents-0.8.0/.release-please-manifest.json +3 -0
  2. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/CHANGELOG.md +8 -0
  3. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/PKG-INFO +1 -1
  4. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/pyproject.toml +1 -1
  5. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_version.py +1 -1
  6. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/resources/checkout_intents.py +8 -0
  7. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/base_checkout_intent.py +9 -1
  8. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent.py +2 -0
  9. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent_create_params.py +9 -1
  10. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent_purchase_params.py +9 -1
  11. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/api_resources/test_checkout_intents.py +16 -0
  12. checkout_intents-0.7.0/.release-please-manifest.json +0 -3
  13. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/.gitignore +0 -0
  14. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/CONTRIBUTING.md +0 -0
  15. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/LICENSE +0 -0
  16. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/README.md +0 -0
  17. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/SECURITY.md +0 -0
  18. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/api.md +0 -0
  19. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/bin/check-release-environment +0 -0
  20. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/bin/publish-pypi +0 -0
  21. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/examples/.keep +0 -0
  22. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/examples/complete-checkout-intent.py +0 -0
  23. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/examples/error-handling.py +0 -0
  24. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/noxfile.py +0 -0
  25. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/release-please-config.json +0 -0
  26. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/requirements-dev.lock +0 -0
  27. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/requirements.lock +0 -0
  28. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/__init__.py +0 -0
  29. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_base_client.py +0 -0
  30. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_client.py +0 -0
  31. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_compat.py +0 -0
  32. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_constants.py +0 -0
  33. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_exceptions.py +0 -0
  34. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_files.py +0 -0
  35. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_models.py +0 -0
  36. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_qs.py +0 -0
  37. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_resource.py +0 -0
  38. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_response.py +0 -0
  39. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_streaming.py +0 -0
  40. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_types.py +0 -0
  41. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/__init__.py +0 -0
  42. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_compat.py +0 -0
  43. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_datetime_parse.py +0 -0
  44. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_logs.py +0 -0
  45. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_proxy.py +0 -0
  46. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_reflection.py +0 -0
  47. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_resources_proxy.py +0 -0
  48. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_streams.py +0 -0
  49. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_sync.py +0 -0
  50. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_transform.py +0 -0
  51. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_typing.py +0 -0
  52. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/_utils/_utils.py +0 -0
  53. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/lib/.keep +0 -0
  54. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/pagination.py +0 -0
  55. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/py.typed +0 -0
  56. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/resources/__init__.py +0 -0
  57. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/resources/brands.py +0 -0
  58. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/__init__.py +0 -0
  59. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/brand_retrieve_response.py +0 -0
  60. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/buyer.py +0 -0
  61. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/buyer_param.py +0 -0
  62. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent_add_payment_params.py +0 -0
  63. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent_confirm_params.py +0 -0
  64. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/checkout_intent_list_params.py +0 -0
  65. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/money.py +0 -0
  66. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/offer.py +0 -0
  67. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/payment_method.py +0 -0
  68. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/payment_method_param.py +0 -0
  69. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/variant_selection.py +0 -0
  70. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/src/checkout_intents/types/variant_selection_param.py +0 -0
  71. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/__init__.py +0 -0
  72. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/api_resources/__init__.py +0 -0
  73. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/api_resources/test_brands.py +0 -0
  74. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/conftest.py +0 -0
  75. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/sample_file.txt +0 -0
  76. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_client.py +0 -0
  77. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_deepcopy.py +0 -0
  78. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_environment_inference.py +0 -0
  79. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_extract_files.py +0 -0
  80. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_files.py +0 -0
  81. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_models.py +0 -0
  82. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_polling.py +0 -0
  83. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_qs.py +0 -0
  84. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_required_args.py +0 -0
  85. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_response.py +0 -0
  86. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_streaming.py +0 -0
  87. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_transform.py +0 -0
  88. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_utils/test_datetime_parse.py +0 -0
  89. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_utils/test_proxy.py +0 -0
  90. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/test_utils/test_typing.py +0 -0
  91. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/tests/utils.py +0 -0
  92. {checkout_intents-0.7.0 → checkout_intents-0.8.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.8.0"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (2025-12-25)
4
+
5
+ Full Changelog: [v0.7.0...v0.8.0](https://github.com/rye-com/checkout-intents-python/compare/v0.7.0...v0.8.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add support for purchase constraints ([6bfefb8](https://github.com/rye-com/checkout-intents-python/commit/6bfefb8494c05c7ea022f055e7b2644cf99de05e))
10
+
3
11
  ## 0.7.0 (2025-12-22)
4
12
 
5
13
  Full Changelog: [v0.6.0...v0.7.0](https://github.com/rye-com/checkout-intents-python/compare/v0.6.0...v0.7.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: checkout-intents
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: The official Python library for the Checkout Intents API
5
5
  Project-URL: Homepage, https://github.com/rye-com/checkout-intents-python
6
6
  Project-URL: Repository, https://github.com/rye-com/checkout-intents-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "checkout-intents"
3
- version = "0.7.0"
3
+ version = "0.8.0"
4
4
  description = "The official Python library for the Checkout Intents API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "checkout_intents"
4
- __version__ = "0.7.0" # x-release-please-version
4
+ __version__ = "0.8.0" # x-release-please-version
@@ -71,6 +71,7 @@ class CheckoutIntentsResource(SyncAPIResource):
71
71
  buyer: BuyerParam,
72
72
  product_url: str,
73
73
  quantity: float,
74
+ constraints: checkout_intent_create_params.Constraints | Omit = omit,
74
75
  promo_codes: SequenceNotStr[str] | Omit = omit,
75
76
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
76
77
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -101,6 +102,7 @@ class CheckoutIntentsResource(SyncAPIResource):
101
102
  "buyer": buyer,
102
103
  "product_url": product_url,
103
104
  "quantity": quantity,
105
+ "constraints": constraints,
104
106
  "promo_codes": promo_codes,
105
107
  "variant_selections": variant_selections,
106
108
  },
@@ -294,6 +296,7 @@ class CheckoutIntentsResource(SyncAPIResource):
294
296
  buyer: BuyerParam,
295
297
  product_url: str,
296
298
  quantity: float,
299
+ constraints: checkout_intent_purchase_params.Constraints | Omit = omit,
297
300
  promo_codes: SequenceNotStr[str] | Omit = omit,
298
301
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
299
302
  payment_method: PaymentMethodParam,
@@ -330,6 +333,7 @@ class CheckoutIntentsResource(SyncAPIResource):
330
333
  "payment_method": payment_method,
331
334
  "product_url": product_url,
332
335
  "quantity": quantity,
336
+ "constraints": constraints,
333
337
  "promo_codes": promo_codes,
334
338
  "variant_selections": variant_selections,
335
339
  },
@@ -728,6 +732,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
728
732
  buyer: BuyerParam,
729
733
  product_url: str,
730
734
  quantity: float,
735
+ constraints: checkout_intent_create_params.Constraints | Omit = omit,
731
736
  promo_codes: SequenceNotStr[str] | Omit = omit,
732
737
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
733
738
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -758,6 +763,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
758
763
  "buyer": buyer,
759
764
  "product_url": product_url,
760
765
  "quantity": quantity,
766
+ "constraints": constraints,
761
767
  "promo_codes": promo_codes,
762
768
  "variant_selections": variant_selections,
763
769
  },
@@ -951,6 +957,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
951
957
  buyer: BuyerParam,
952
958
  product_url: str,
953
959
  quantity: float,
960
+ constraints: checkout_intent_purchase_params.Constraints | Omit = omit,
954
961
  promo_codes: SequenceNotStr[str] | Omit = omit,
955
962
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
956
963
  payment_method: PaymentMethodParam,
@@ -987,6 +994,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
987
994
  "payment_method": payment_method,
988
995
  "product_url": product_url,
989
996
  "quantity": quantity,
997
+ "constraints": constraints,
990
998
  "promo_codes": promo_codes,
991
999
  "variant_selections": variant_selections,
992
1000
  },
@@ -9,7 +9,13 @@ from .buyer import Buyer
9
9
  from .._models import BaseModel
10
10
  from .variant_selection import VariantSelection
11
11
 
12
- __all__ = ["BaseCheckoutIntent"]
12
+ __all__ = ["BaseCheckoutIntent", "Constraints"]
13
+
14
+
15
+ class Constraints(BaseModel):
16
+ max_shipping_price: Optional[int] = FieldInfo(alias="maxShippingPrice", default=None)
17
+
18
+ max_total_price: Optional[int] = FieldInfo(alias="maxTotalPrice", default=None)
13
19
 
14
20
 
15
21
  class BaseCheckoutIntent(BaseModel):
@@ -23,6 +29,8 @@ class BaseCheckoutIntent(BaseModel):
23
29
 
24
30
  quantity: float
25
31
 
32
+ constraints: Optional[Constraints] = None
33
+
26
34
  promo_codes: Optional[List[str]] = FieldInfo(alias="promoCodes", default=None)
27
35
 
28
36
  variant_selections: Optional[List[VariantSelection]] = FieldInfo(alias="variantSelections", default=None)
@@ -71,6 +71,8 @@ class FailedCheckoutIntentFailureReason(BaseModel):
71
71
  "form_validation_error",
72
72
  "captcha_blocked",
73
73
  "bot_protection_blocked",
74
+ "constraint_total_price_exceeded",
75
+ "constraint_shipping_cost_exceeded",
74
76
  "unknown",
75
77
  ]
76
78
  """Type derived from runtime array - always in sync"""
@@ -10,7 +10,7 @@ from .._utils import PropertyInfo
10
10
  from .buyer_param import BuyerParam
11
11
  from .variant_selection_param import VariantSelectionParam
12
12
 
13
- __all__ = ["CheckoutIntentCreateParams"]
13
+ __all__ = ["CheckoutIntentCreateParams", "Constraints"]
14
14
 
15
15
 
16
16
  class CheckoutIntentCreateParams(TypedDict, total=False):
@@ -20,6 +20,14 @@ class CheckoutIntentCreateParams(TypedDict, total=False):
20
20
 
21
21
  quantity: Required[float]
22
22
 
23
+ constraints: Constraints
24
+
23
25
  promo_codes: Annotated[SequenceNotStr[str], PropertyInfo(alias="promoCodes")]
24
26
 
25
27
  variant_selections: Annotated[Iterable[VariantSelectionParam], PropertyInfo(alias="variantSelections")]
28
+
29
+
30
+ class Constraints(TypedDict, total=False):
31
+ max_shipping_price: Annotated[int, PropertyInfo(alias="maxShippingPrice")]
32
+
33
+ max_total_price: Annotated[int, PropertyInfo(alias="maxTotalPrice")]
@@ -11,7 +11,7 @@ from .buyer_param import BuyerParam
11
11
  from .payment_method_param import PaymentMethodParam
12
12
  from .variant_selection_param import VariantSelectionParam
13
13
 
14
- __all__ = ["CheckoutIntentPurchaseParams"]
14
+ __all__ = ["CheckoutIntentPurchaseParams", "Constraints"]
15
15
 
16
16
 
17
17
  class CheckoutIntentPurchaseParams(TypedDict, total=False):
@@ -23,6 +23,14 @@ class CheckoutIntentPurchaseParams(TypedDict, total=False):
23
23
 
24
24
  quantity: Required[float]
25
25
 
26
+ constraints: Constraints
27
+
26
28
  promo_codes: Annotated[SequenceNotStr[str], PropertyInfo(alias="promoCodes")]
27
29
 
28
30
  variant_selections: Annotated[Iterable[VariantSelectionParam], PropertyInfo(alias="variantSelections")]
31
+
32
+
33
+ class Constraints(TypedDict, total=False):
34
+ max_shipping_price: Annotated[int, PropertyInfo(alias="maxShippingPrice")]
35
+
36
+ max_total_price: Annotated[int, PropertyInfo(alias="maxTotalPrice")]
@@ -58,6 +58,10 @@ class TestCheckoutIntents:
58
58
  },
59
59
  product_url="productUrl",
60
60
  quantity=1,
61
+ constraints={
62
+ "max_shipping_price": 500,
63
+ "max_total_price": 100000,
64
+ },
61
65
  promo_codes=["string"],
62
66
  variant_selections=[
63
67
  {
@@ -386,6 +390,10 @@ class TestCheckoutIntents:
386
390
  },
387
391
  product_url="productUrl",
388
392
  quantity=1,
393
+ constraints={
394
+ "max_shipping_price": 500,
395
+ "max_total_price": 100000,
396
+ },
389
397
  promo_codes=["string"],
390
398
  variant_selections=[
391
399
  {
@@ -498,6 +506,10 @@ class TestAsyncCheckoutIntents:
498
506
  },
499
507
  product_url="productUrl",
500
508
  quantity=1,
509
+ constraints={
510
+ "max_shipping_price": 500,
511
+ "max_total_price": 100000,
512
+ },
501
513
  promo_codes=["string"],
502
514
  variant_selections=[
503
515
  {
@@ -826,6 +838,10 @@ class TestAsyncCheckoutIntents:
826
838
  },
827
839
  product_url="productUrl",
828
840
  quantity=1,
841
+ constraints={
842
+ "max_shipping_price": 500,
843
+ "max_total_price": 100000,
844
+ },
829
845
  promo_codes=["string"],
830
846
  variant_selections=[
831
847
  {
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.7.0"
3
- }