checkout-intents 0.7.0__py3-none-any.whl → 0.8.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.
@@ -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")]
@@ -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
@@ -11,7 +11,7 @@ checkout_intents/_resource.py,sha256=X-eWffEBAgzTZvakLqNUjwgidMKfBFRmCeeOiuko4lg
11
11
  checkout_intents/_response.py,sha256=sLqxWBxzmVqPsdr2x5z6d87h8jb1U-Huvh2YFg-U6nE,28876
12
12
  checkout_intents/_streaming.py,sha256=y8SjBVAw2SDdVczQsP1T3dufnx4040C5fQqz-jGSvmg,10257
13
13
  checkout_intents/_types.py,sha256=PTRxqWPBW57h6JvfwcVuR42gIMpY4nwSZbqAtv85Ado,7305
14
- checkout_intents/_version.py,sha256=5VUKZFNomyYEg-QEVbUYW_VqH4_Uo6ZBsPyAuMjG_4c,168
14
+ checkout_intents/_version.py,sha256=0ybsLG45CN7PEjra6-lyyHz61nUb1wGJELezxMfZsns,168
15
15
  checkout_intents/pagination.py,sha256=VMe3ftq-qqAku2ERRTOz7iZOoMQ_KKp2HIUl_I8oAXE,2908
16
16
  checkout_intents/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  checkout_intents/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
@@ -29,25 +29,25 @@ checkout_intents/_utils/_utils.py,sha256=g9ftElB09kVT6EVfCIlD_nUfANhDX5_vZO61FDW
29
29
  checkout_intents/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
30
30
  checkout_intents/resources/__init__.py,sha256=sHRW0nwo1GnFBFPoTNohkEbvOk7au-R3MdfVn_yb8Ds,1120
31
31
  checkout_intents/resources/brands.py,sha256=jJ5Jn2GG3MPkdKSg6_OG89dSQTaSGM9e7lBtovn-ABE,6389
32
- checkout_intents/resources/checkout_intents.py,sha256=AkV2MsOPINapNgVJQiArVP8qTCAosbB1jlkknCRoIQ0,59756
32
+ checkout_intents/resources/checkout_intents.py,sha256=CY1YZYBBdntsMmShiQxHN4oMI10Q_dES6IGHw7uBEJ0,60280
33
33
  checkout_intents/types/__init__.py,sha256=VhZDCRhKlUnKs1h-8UNWj0HUUtJBjHFo16Stxy_kgS4,1298
34
- checkout_intents/types/base_checkout_intent.py,sha256=i31jUBw1fFlFQI4pUxLhiHAM82k3dDWiK3puTlKO5VE,728
34
+ checkout_intents/types/base_checkout_intent.py,sha256=0lS_qyJd8xz-DIukZEPKkEUl52wPs4CiXMOV7Aulc8M,997
35
35
  checkout_intents/types/brand_retrieve_response.py,sha256=c8DCAJvHFHcrIOW6onHj5Y51Yba7zyOrRXZuGfqYkBc,561
36
36
  checkout_intents/types/buyer.py,sha256=Ov6mVD-Hjm9A-i9p2dWCXtniLhYpG_6jvy9DReC54YQ,530
37
37
  checkout_intents/types/buyer_param.py,sha256=DAtEoK4VSzv2qDBBlC4RRE4FbHd87pieTOlfRntbjqg,695
38
- checkout_intents/types/checkout_intent.py,sha256=c7Geo_oT9ARDz8ZC5Kq6DxdOB-WlhSlxVlx9VuU95-Q,2638
38
+ checkout_intents/types/checkout_intent.py,sha256=LLTGXwIRdZmxaHRcHAYZ6DPWnZurym2yG0pOfmkQ2eg,2726
39
39
  checkout_intents/types/checkout_intent_add_payment_params.py,sha256=s8KKWVM3XainGTLCwdfUjb5vgS80o2_W0wwUwRCFbk0,479
40
40
  checkout_intents/types/checkout_intent_confirm_params.py,sha256=v_fcmuH5GoEwUJLbV7N9BDti63dg8z1nmhpcr4-1qcs,473
41
- checkout_intents/types/checkout_intent_create_params.py,sha256=DEfM_bAsMijLAtGTZpC0RjnwvJc3rQDd_H9jEgjFc28,812
41
+ checkout_intents/types/checkout_intent_create_params.py,sha256=J5jIPp7PkRxv2-IQdb_-UMd8U1OF-Ub6cOQ5cZLPwSM,1055
42
42
  checkout_intents/types/checkout_intent_list_params.py,sha256=zc8_xwBHChOcl7bTMSjU7ZbHKIyQGYeUy5UrxeloJj0,521
43
- checkout_intents/types/checkout_intent_purchase_params.py,sha256=aQ2mYStqnWiSR7BXKbWZ6dEPXD8fBDwhhBssh-d6ado,967
43
+ checkout_intents/types/checkout_intent_purchase_params.py,sha256=GSb1wJVAq0RiJmTNcvhqhIT0gpd7uU2FfhkWgin_QpE,1210
44
44
  checkout_intents/types/money.py,sha256=-AfFFrfnUy6cAaFykF_gWZQxDGlzA1r_dJzJZRxhUto,328
45
45
  checkout_intents/types/offer.py,sha256=9nGYAlA3tEiRU9lvsktnVl6EWj5dLNr6K9LB8WprckI,985
46
46
  checkout_intents/types/payment_method.py,sha256=-v5-L5RPojm8IDrdAhIMGmhVb89vwqT1jhgb-ZWOG7Q,1069
47
47
  checkout_intents/types/payment_method_param.py,sha256=_yzwZ5nw7bStK4U2-1ybtpjdJz5funCOMN7MALtF0xk,1225
48
48
  checkout_intents/types/variant_selection.py,sha256=y6mlU-qGwDfE77mU-x1GTXkDsmn6vuPpy5lBYXqXCBw,259
49
49
  checkout_intents/types/variant_selection_param.py,sha256=ahwTmDVIUMV8jvpggEo2jDUTIm9xvXbntDxmIZqT2_k,355
50
- checkout_intents-0.7.0.dist-info/METADATA,sha256=821Ib8V0YkpJFBHUAmb-tZAWV4HIgOEhnuzhAwGo52s,23781
51
- checkout_intents-0.7.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
52
- checkout_intents-0.7.0.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
53
- checkout_intents-0.7.0.dist-info/RECORD,,
50
+ checkout_intents-0.8.0.dist-info/METADATA,sha256=UGTPqGdeixx8wID3A1Q-GjsgO6ERLWGEYxx5UjhNMrc,23781
51
+ checkout_intents-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
52
+ checkout_intents-0.8.0.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
53
+ checkout_intents-0.8.0.dist-info/RECORD,,