checkout-intents 0.3.3__py3-none-any.whl → 0.5.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.
@@ -1774,7 +1774,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1774
1774
  options: RequestOptions = {},
1775
1775
  ) -> ResponseT:
1776
1776
  opts = FinalRequestOptions.construct(
1777
- method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1777
+ method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1778
1778
  )
1779
1779
  return await self.request(cast_to, opts)
1780
1780
 
@@ -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.3.3" # x-release-please-version
4
+ __version__ = "0.5.0" # x-release-please-version
@@ -70,6 +70,7 @@ class CheckoutIntentsResource(SyncAPIResource):
70
70
  buyer: BuyerParam,
71
71
  product_url: str,
72
72
  quantity: float,
73
+ promo_codes: SequenceNotStr[str] | Omit = omit,
73
74
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
74
75
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
75
76
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -99,6 +100,7 @@ class CheckoutIntentsResource(SyncAPIResource):
99
100
  "buyer": buyer,
100
101
  "product_url": product_url,
101
102
  "quantity": quantity,
103
+ "promo_codes": promo_codes,
102
104
  "variant_selections": variant_selections,
103
105
  },
104
106
  checkout_intent_create_params.CheckoutIntentCreateParams,
@@ -671,6 +673,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
671
673
  buyer: BuyerParam,
672
674
  product_url: str,
673
675
  quantity: float,
676
+ promo_codes: SequenceNotStr[str] | Omit = omit,
674
677
  variant_selections: Iterable[VariantSelectionParam] | Omit = omit,
675
678
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
676
679
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -700,6 +703,7 @@ class AsyncCheckoutIntentsResource(AsyncAPIResource):
700
703
  "buyer": buyer,
701
704
  "product_url": product_url,
702
705
  "quantity": quantity,
706
+ "promo_codes": promo_codes,
703
707
  "variant_selections": variant_selections,
704
708
  },
705
709
  checkout_intent_create_params.CheckoutIntentCreateParams,
@@ -23,4 +23,6 @@ class BaseCheckoutIntent(BaseModel):
23
23
 
24
24
  quantity: float
25
25
 
26
+ promo_codes: Optional[List[str]] = FieldInfo(alias="promoCodes", default=None)
27
+
26
28
  variant_selections: Optional[List[VariantSelection]] = FieldInfo(alias="variantSelections", default=None)
@@ -11,7 +11,7 @@ class BrandRetrieveResponse(BaseModel):
11
11
  id: str
12
12
  """A unique identifier for the brand."""
13
13
 
14
- marketplace: Literal["AMAZON", "SHOPIFY", "UNKNOWN"]
14
+ marketplace: Literal["AMAZON", "SHOPIFY", "BESTBUY", "UNKNOWN"]
15
15
  """Indicates what ecommerce platform the brand uses."""
16
16
 
17
17
  supported: bool
@@ -63,8 +63,17 @@ class FailedCheckoutIntentFailureReason(BaseModel):
63
63
  "missing_shipping_method",
64
64
  "unsupported_currency",
65
65
  "invalid_input",
66
+ "incorrect_cost_breakdown",
66
67
  "unsupported_store_no_guest_checkout",
68
+ "workflow_invocation_failed",
69
+ "variant_selections_invalid",
70
+ "variant_selections_required",
71
+ "form_validation_error",
72
+ "captcha_blocked",
73
+ "bot_protection_blocked",
74
+ "unknown",
67
75
  ]
76
+ """Type derived from runtime array - always in sync"""
68
77
 
69
78
  message: str
70
79
 
@@ -5,6 +5,7 @@ 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 .variant_selection_param import VariantSelectionParam
@@ -19,4 +20,6 @@ class CheckoutIntentCreateParams(TypedDict, total=False):
19
20
 
20
21
  quantity: Required[float]
21
22
 
23
+ promo_codes: Annotated[SequenceNotStr[str], PropertyInfo(alias="promoCodes")]
24
+
22
25
  variant_selections: Annotated[Iterable[VariantSelectionParam], PropertyInfo(alias="variantSelections")]
@@ -19,6 +19,8 @@ class Cost(BaseModel):
19
19
 
20
20
  shipping: Optional[Money] = None
21
21
 
22
+ surcharge: Optional[Money] = None
23
+
22
24
  tax: Optional[Money] = None
23
25
 
24
26
 
@@ -27,6 +29,8 @@ class ShippingAvailableOption(BaseModel):
27
29
 
28
30
  cost: Money
29
31
 
32
+ discount: Optional[Money] = None
33
+
30
34
 
31
35
  class Shipping(BaseModel):
32
36
  available_options: List[ShippingAvailableOption] = FieldInfo(alias="availableOptions")
@@ -38,3 +42,5 @@ class Offer(BaseModel):
38
42
  cost: Cost
39
43
 
40
44
  shipping: Shipping
45
+
46
+ applied_promo_codes: Optional[List[str]] = FieldInfo(alias="appliedPromoCodes", default=None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: checkout-intents
3
- Version: 0.3.3
3
+ Version: 0.5.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,5 +1,5 @@
1
1
  checkout_intents/__init__.py,sha256=5m0_Ktnyya4CJ0vdWZbAv7qZMeR1VnXqN_MJtH3RJTM,2833
2
- checkout_intents/_base_client.py,sha256=7CDIPC8cmnmd1k7FLdws7FRpsnw11gy83AFzXndpam4,67245
2
+ checkout_intents/_base_client.py,sha256=ve_gIFHs2dgQ-FduM6A7GxMihxAowCXVcsBYzf_k5_4,67257
3
3
  checkout_intents/_client.py,sha256=l4Pa_x5hI16yMF3hrMIJTkXEv2i3F61QF7N9OdQVSIA,23941
4
4
  checkout_intents/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  checkout_intents/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
@@ -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=6MP5ntn9QD_nkNa0bPkVqXkR4ZoQEOr1sNar5cCh3Pk,168
14
+ checkout_intents/_version.py,sha256=lNq9CWqtbgWtcVLskIHcQVeSNUi9VHJGSc1lGlfA1rc,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,24 +29,24 @@ 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=C59jKLf-FxbtNfuSSxxCtp6Ona7hP4S26kV342xAlic,54375
32
+ checkout_intents/resources/checkout_intents.py,sha256=yK_dauwDI6rqHU187FqLQyU9yrdUwJD6Ziubs_keVFU,54591
33
33
  checkout_intents/types/__init__.py,sha256=bcfwLNTB5CbPquNwxpMRoJkL5LM6HckISeGRPlVX2js,1192
34
- checkout_intents/types/base_checkout_intent.py,sha256=56Qp3ssWYmcdu6A9Z0pvL3ewm1LTvQHiboiJ7Aogx2M,644
35
- checkout_intents/types/brand_retrieve_response.py,sha256=1Z7yjrXl3NO1u9NFO5lDBJ-sucpEH501MUfUS_XeqbY,550
34
+ checkout_intents/types/base_checkout_intent.py,sha256=i31jUBw1fFlFQI4pUxLhiHAM82k3dDWiK3puTlKO5VE,728
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=Vkn0Q3fXr5a776luw06mjl6AkL8geBOdpIVTIvO7Quk,2315
38
+ checkout_intents/types/checkout_intent.py,sha256=c7Geo_oT9ARDz8ZC5Kq6DxdOB-WlhSlxVlx9VuU95-Q,2638
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=nQ5l74ABrn7t-nE7Hnw50hQ8VKyvu54LYia2hnp1twE,693
41
+ checkout_intents/types/checkout_intent_create_params.py,sha256=DEfM_bAsMijLAtGTZpC0RjnwvJc3rQDd_H9jEgjFc28,812
42
42
  checkout_intents/types/checkout_intent_list_params.py,sha256=zc8_xwBHChOcl7bTMSjU7ZbHKIyQGYeUy5UrxeloJj0,521
43
43
  checkout_intents/types/money.py,sha256=-AfFFrfnUy6cAaFykF_gWZQxDGlzA1r_dJzJZRxhUto,328
44
- checkout_intents/types/offer.py,sha256=pxem4nhE9pMd-o9sfKipPuxyZg5WWur1w46oBfwHpB8,809
44
+ checkout_intents/types/offer.py,sha256=9nGYAlA3tEiRU9lvsktnVl6EWj5dLNr6K9LB8WprckI,985
45
45
  checkout_intents/types/payment_method.py,sha256=-v5-L5RPojm8IDrdAhIMGmhVb89vwqT1jhgb-ZWOG7Q,1069
46
46
  checkout_intents/types/payment_method_param.py,sha256=_yzwZ5nw7bStK4U2-1ybtpjdJz5funCOMN7MALtF0xk,1225
47
47
  checkout_intents/types/variant_selection.py,sha256=y6mlU-qGwDfE77mU-x1GTXkDsmn6vuPpy5lBYXqXCBw,259
48
48
  checkout_intents/types/variant_selection_param.py,sha256=ahwTmDVIUMV8jvpggEo2jDUTIm9xvXbntDxmIZqT2_k,355
49
- checkout_intents-0.3.3.dist-info/METADATA,sha256=zR7ocfBWQJZgLwkj1dQ1y-yGhnzW8ugpxTbqR1QpzBM,23781
50
- checkout_intents-0.3.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
51
- checkout_intents-0.3.3.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
52
- checkout_intents-0.3.3.dist-info/RECORD,,
49
+ checkout_intents-0.5.0.dist-info/METADATA,sha256=evcdBdUrRiPpo0qLCh0fswauwB5RoVssm-LZ3uYG06A,23781
50
+ checkout_intents-0.5.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
51
+ checkout_intents-0.5.0.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
52
+ checkout_intents-0.5.0.dist-info/RECORD,,