checkout-intents 0.6.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.
- checkout_intents/_version.py +1 -1
- checkout_intents/resources/checkout_intents.py +12 -0
- checkout_intents/types/base_checkout_intent.py +9 -1
- checkout_intents/types/checkout_intent.py +2 -0
- checkout_intents/types/checkout_intent_create_params.py +9 -1
- checkout_intents/types/checkout_intent_purchase_params.py +12 -1
- {checkout_intents-0.6.0.dist-info → checkout_intents-0.8.0.dist-info}/METADATA +1 -1
- {checkout_intents-0.6.0.dist-info → checkout_intents-0.8.0.dist-info}/RECORD +10 -10
- {checkout_intents-0.6.0.dist-info → checkout_intents-0.8.0.dist-info}/WHEEL +0 -0
- {checkout_intents-0.6.0.dist-info → checkout_intents-0.8.0.dist-info}/licenses/LICENSE +0 -0
checkout_intents/_version.py
CHANGED
|
@@ -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,8 @@ 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,
|
|
300
|
+
promo_codes: SequenceNotStr[str] | Omit = omit,
|
|
297
301
|
variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
|
|
298
302
|
payment_method: PaymentMethodParam,
|
|
299
303
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -329,6 +333,8 @@ class CheckoutIntentsResource(SyncAPIResource):
|
|
|
329
333
|
"payment_method": payment_method,
|
|
330
334
|
"product_url": product_url,
|
|
331
335
|
"quantity": quantity,
|
|
336
|
+
"constraints": constraints,
|
|
337
|
+
"promo_codes": promo_codes,
|
|
332
338
|
"variant_selections": variant_selections,
|
|
333
339
|
},
|
|
334
340
|
checkout_intent_purchase_params.CheckoutIntentPurchaseParams
|
|
@@ -726,6 +732,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
|
|
|
726
732
|
buyer: BuyerParam,
|
|
727
733
|
product_url: str,
|
|
728
734
|
quantity: float,
|
|
735
|
+
constraints: checkout_intent_create_params.Constraints | Omit = omit,
|
|
729
736
|
promo_codes: SequenceNotStr[str] | Omit = omit,
|
|
730
737
|
variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
|
|
731
738
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -756,6 +763,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
|
|
|
756
763
|
"buyer": buyer,
|
|
757
764
|
"product_url": product_url,
|
|
758
765
|
"quantity": quantity,
|
|
766
|
+
"constraints": constraints,
|
|
759
767
|
"promo_codes": promo_codes,
|
|
760
768
|
"variant_selections": variant_selections,
|
|
761
769
|
},
|
|
@@ -949,6 +957,8 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
|
|
|
949
957
|
buyer: BuyerParam,
|
|
950
958
|
product_url: str,
|
|
951
959
|
quantity: float,
|
|
960
|
+
constraints: checkout_intent_purchase_params.Constraints | Omit = omit,
|
|
961
|
+
promo_codes: SequenceNotStr[str] | Omit = omit,
|
|
952
962
|
variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
|
|
953
963
|
payment_method: PaymentMethodParam,
|
|
954
964
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -984,6 +994,8 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
|
|
|
984
994
|
"payment_method": payment_method,
|
|
985
995
|
"product_url": product_url,
|
|
986
996
|
"quantity": quantity,
|
|
997
|
+
"constraints": constraints,
|
|
998
|
+
"promo_codes": promo_codes,
|
|
987
999
|
"variant_selections": variant_selections,
|
|
988
1000
|
},
|
|
989
1001
|
checkout_intent_purchase_params.CheckoutIntentPurchaseParams
|
|
@@ -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")]
|
|
@@ -5,12 +5,13 @@ from __future__ import annotations
|
|
|
5
5
|
from typing import Iterable
|
|
6
6
|
from typing_extensions import Required, Annotated, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
8
9
|
from .._utils import PropertyInfo
|
|
9
10
|
from .buyer_param import BuyerParam
|
|
10
11
|
from .payment_method_param import PaymentMethodParam
|
|
11
12
|
from .variant_selection_param import VariantSelectionParam
|
|
12
13
|
|
|
13
|
-
__all__ = ["CheckoutIntentPurchaseParams"]
|
|
14
|
+
__all__ = ["CheckoutIntentPurchaseParams", "Constraints"]
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class CheckoutIntentPurchaseParams(TypedDict, total=False):
|
|
@@ -22,4 +23,14 @@ class CheckoutIntentPurchaseParams(TypedDict, total=False):
|
|
|
22
23
|
|
|
23
24
|
quantity: Required[float]
|
|
24
25
|
|
|
26
|
+
constraints: Constraints
|
|
27
|
+
|
|
28
|
+
promo_codes: Annotated[SequenceNotStr[str], PropertyInfo(alias="promoCodes")]
|
|
29
|
+
|
|
25
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.
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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.
|
|
51
|
-
checkout_intents-0.
|
|
52
|
-
checkout_intents-0.
|
|
53
|
-
checkout_intents-0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|