checkout-intents 0.12.0__py3-none-any.whl → 0.13.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/_base_client.py +5 -2
- checkout_intents/_client.py +38 -1
- checkout_intents/_compat.py +3 -3
- checkout_intents/_utils/_json.py +35 -0
- checkout_intents/_version.py +1 -1
- checkout_intents/resources/__init__.py +14 -0
- checkout_intents/resources/products.py +169 -0
- checkout_intents/types/__init__.py +4 -0
- checkout_intents/types/money.py +1 -1
- checkout_intents/types/product.py +38 -0
- checkout_intents/types/product_availability.py +7 -0
- checkout_intents/types/product_image.py +13 -0
- checkout_intents/types/product_lookup_params.py +11 -0
- {checkout_intents-0.12.0.dist-info → checkout_intents-0.13.0.dist-info}/METADATA +1 -1
- {checkout_intents-0.12.0.dist-info → checkout_intents-0.13.0.dist-info}/RECORD +17 -11
- {checkout_intents-0.12.0.dist-info → checkout_intents-0.13.0.dist-info}/WHEEL +0 -0
- {checkout_intents-0.12.0.dist-info → checkout_intents-0.13.0.dist-info}/licenses/LICENSE +0 -0
checkout_intents/_base_client.py
CHANGED
|
@@ -86,6 +86,7 @@ from ._exceptions import (
|
|
|
86
86
|
APIConnectionError,
|
|
87
87
|
APIResponseValidationError,
|
|
88
88
|
)
|
|
89
|
+
from ._utils._json import openapi_dumps
|
|
89
90
|
|
|
90
91
|
log: logging.Logger = logging.getLogger(__name__)
|
|
91
92
|
|
|
@@ -554,8 +555,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
554
555
|
kwargs["content"] = options.content
|
|
555
556
|
elif isinstance(json_data, bytes):
|
|
556
557
|
kwargs["content"] = json_data
|
|
557
|
-
|
|
558
|
-
|
|
558
|
+
elif not files:
|
|
559
|
+
# Don't set content when JSON is sent as multipart/form-data,
|
|
560
|
+
# since httpx's content param overrides other body arguments
|
|
561
|
+
kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
|
|
559
562
|
kwargs["files"] = files
|
|
560
563
|
else:
|
|
561
564
|
headers.pop("Content-Type", None)
|
checkout_intents/_client.py
CHANGED
|
@@ -31,8 +31,9 @@ from ._base_client import (
|
|
|
31
31
|
)
|
|
32
32
|
|
|
33
33
|
if TYPE_CHECKING:
|
|
34
|
-
from .resources import betas, brands, checkout_intents
|
|
34
|
+
from .resources import betas, brands, products, checkout_intents
|
|
35
35
|
from .resources.brands import BrandsResource, AsyncBrandsResource
|
|
36
|
+
from .resources.products import ProductsResource, AsyncProductsResource
|
|
36
37
|
from .resources.betas.betas import BetasResource, AsyncBetasResource
|
|
37
38
|
from .resources.checkout_intents import CheckoutIntentsResource, AsyncCheckoutIntentsResource
|
|
38
39
|
|
|
@@ -187,6 +188,12 @@ class CheckoutIntents(SyncAPIClient):
|
|
|
187
188
|
|
|
188
189
|
return BrandsResource(self)
|
|
189
190
|
|
|
191
|
+
@cached_property
|
|
192
|
+
def products(self) -> ProductsResource:
|
|
193
|
+
from .resources.products import ProductsResource
|
|
194
|
+
|
|
195
|
+
return ProductsResource(self)
|
|
196
|
+
|
|
190
197
|
@cached_property
|
|
191
198
|
def with_raw_response(self) -> CheckoutIntentsWithRawResponse:
|
|
192
199
|
return CheckoutIntentsWithRawResponse(self)
|
|
@@ -418,6 +425,12 @@ class AsyncCheckoutIntents(AsyncAPIClient):
|
|
|
418
425
|
|
|
419
426
|
return AsyncBrandsResource(self)
|
|
420
427
|
|
|
428
|
+
@cached_property
|
|
429
|
+
def products(self) -> AsyncProductsResource:
|
|
430
|
+
from .resources.products import AsyncProductsResource
|
|
431
|
+
|
|
432
|
+
return AsyncProductsResource(self)
|
|
433
|
+
|
|
421
434
|
@cached_property
|
|
422
435
|
def with_raw_response(self) -> AsyncCheckoutIntentsWithRawResponse:
|
|
423
436
|
return AsyncCheckoutIntentsWithRawResponse(self)
|
|
@@ -557,6 +570,12 @@ class CheckoutIntentsWithRawResponse:
|
|
|
557
570
|
|
|
558
571
|
return BrandsResourceWithRawResponse(self._client.brands)
|
|
559
572
|
|
|
573
|
+
@cached_property
|
|
574
|
+
def products(self) -> products.ProductsResourceWithRawResponse:
|
|
575
|
+
from .resources.products import ProductsResourceWithRawResponse
|
|
576
|
+
|
|
577
|
+
return ProductsResourceWithRawResponse(self._client.products)
|
|
578
|
+
|
|
560
579
|
|
|
561
580
|
class AsyncCheckoutIntentsWithRawResponse:
|
|
562
581
|
_client: AsyncCheckoutIntents
|
|
@@ -582,6 +601,12 @@ class AsyncCheckoutIntentsWithRawResponse:
|
|
|
582
601
|
|
|
583
602
|
return AsyncBrandsResourceWithRawResponse(self._client.brands)
|
|
584
603
|
|
|
604
|
+
@cached_property
|
|
605
|
+
def products(self) -> products.AsyncProductsResourceWithRawResponse:
|
|
606
|
+
from .resources.products import AsyncProductsResourceWithRawResponse
|
|
607
|
+
|
|
608
|
+
return AsyncProductsResourceWithRawResponse(self._client.products)
|
|
609
|
+
|
|
585
610
|
|
|
586
611
|
class CheckoutIntentsWithStreamedResponse:
|
|
587
612
|
_client: CheckoutIntents
|
|
@@ -607,6 +632,12 @@ class CheckoutIntentsWithStreamedResponse:
|
|
|
607
632
|
|
|
608
633
|
return BrandsResourceWithStreamingResponse(self._client.brands)
|
|
609
634
|
|
|
635
|
+
@cached_property
|
|
636
|
+
def products(self) -> products.ProductsResourceWithStreamingResponse:
|
|
637
|
+
from .resources.products import ProductsResourceWithStreamingResponse
|
|
638
|
+
|
|
639
|
+
return ProductsResourceWithStreamingResponse(self._client.products)
|
|
640
|
+
|
|
610
641
|
|
|
611
642
|
class AsyncCheckoutIntentsWithStreamedResponse:
|
|
612
643
|
_client: AsyncCheckoutIntents
|
|
@@ -632,6 +663,12 @@ class AsyncCheckoutIntentsWithStreamedResponse:
|
|
|
632
663
|
|
|
633
664
|
return AsyncBrandsResourceWithStreamingResponse(self._client.brands)
|
|
634
665
|
|
|
666
|
+
@cached_property
|
|
667
|
+
def products(self) -> products.AsyncProductsResourceWithStreamingResponse:
|
|
668
|
+
from .resources.products import AsyncProductsResourceWithStreamingResponse
|
|
669
|
+
|
|
670
|
+
return AsyncProductsResourceWithStreamingResponse(self._client.products)
|
|
671
|
+
|
|
635
672
|
|
|
636
673
|
Client = CheckoutIntents
|
|
637
674
|
|
checkout_intents/_compat.py
CHANGED
|
@@ -139,6 +139,7 @@ def model_dump(
|
|
|
139
139
|
exclude_defaults: bool = False,
|
|
140
140
|
warnings: bool = True,
|
|
141
141
|
mode: Literal["json", "python"] = "python",
|
|
142
|
+
by_alias: bool | None = None,
|
|
142
143
|
) -> dict[str, Any]:
|
|
143
144
|
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
|
|
144
145
|
return model.model_dump(
|
|
@@ -148,13 +149,12 @@ def model_dump(
|
|
|
148
149
|
exclude_defaults=exclude_defaults,
|
|
149
150
|
# warnings are not supported in Pydantic v1
|
|
150
151
|
warnings=True if PYDANTIC_V1 else warnings,
|
|
152
|
+
by_alias=by_alias,
|
|
151
153
|
)
|
|
152
154
|
return cast(
|
|
153
155
|
"dict[str, Any]",
|
|
154
156
|
model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
155
|
-
exclude=exclude,
|
|
156
|
-
exclude_unset=exclude_unset,
|
|
157
|
-
exclude_defaults=exclude_defaults,
|
|
157
|
+
exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
|
|
158
158
|
),
|
|
159
159
|
)
|
|
160
160
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from typing import Any
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import override
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
from .._compat import model_dump
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def openapi_dumps(obj: Any) -> bytes:
|
|
12
|
+
"""
|
|
13
|
+
Serialize an object to UTF-8 encoded JSON bytes.
|
|
14
|
+
|
|
15
|
+
Extends the standard json.dumps with support for additional types
|
|
16
|
+
commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
|
|
17
|
+
"""
|
|
18
|
+
return json.dumps(
|
|
19
|
+
obj,
|
|
20
|
+
cls=_CustomEncoder,
|
|
21
|
+
# Uses the same defaults as httpx's JSON serialization
|
|
22
|
+
ensure_ascii=False,
|
|
23
|
+
separators=(",", ":"),
|
|
24
|
+
allow_nan=False,
|
|
25
|
+
).encode()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class _CustomEncoder(json.JSONEncoder):
|
|
29
|
+
@override
|
|
30
|
+
def default(self, o: Any) -> Any:
|
|
31
|
+
if isinstance(o, datetime):
|
|
32
|
+
return o.isoformat()
|
|
33
|
+
if isinstance(o, pydantic.BaseModel):
|
|
34
|
+
return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
|
|
35
|
+
return super().default(o)
|
checkout_intents/_version.py
CHANGED
|
@@ -16,6 +16,14 @@ from .brands import (
|
|
|
16
16
|
BrandsResourceWithStreamingResponse,
|
|
17
17
|
AsyncBrandsResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
|
+
from .products import (
|
|
20
|
+
ProductsResource,
|
|
21
|
+
AsyncProductsResource,
|
|
22
|
+
ProductsResourceWithRawResponse,
|
|
23
|
+
AsyncProductsResourceWithRawResponse,
|
|
24
|
+
ProductsResourceWithStreamingResponse,
|
|
25
|
+
AsyncProductsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
19
27
|
from .checkout_intents import (
|
|
20
28
|
CheckoutIntentsResource,
|
|
21
29
|
AsyncCheckoutIntentsResource,
|
|
@@ -44,4 +52,10 @@ __all__ = [
|
|
|
44
52
|
"AsyncBrandsResourceWithRawResponse",
|
|
45
53
|
"BrandsResourceWithStreamingResponse",
|
|
46
54
|
"AsyncBrandsResourceWithStreamingResponse",
|
|
55
|
+
"ProductsResource",
|
|
56
|
+
"AsyncProductsResource",
|
|
57
|
+
"ProductsResourceWithRawResponse",
|
|
58
|
+
"AsyncProductsResourceWithRawResponse",
|
|
59
|
+
"ProductsResourceWithStreamingResponse",
|
|
60
|
+
"AsyncProductsResourceWithStreamingResponse",
|
|
47
61
|
]
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..types import product_lookup_params
|
|
8
|
+
from .._types import Body, Query, Headers, NotGiven, not_given
|
|
9
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
10
|
+
from .._compat import cached_property
|
|
11
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from .._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from .._base_client import make_request_options
|
|
19
|
+
from ..types.product import Product
|
|
20
|
+
|
|
21
|
+
__all__ = ["ProductsResource", "AsyncProductsResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ProductsResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> ProductsResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/rye-com/checkout-intents-python#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return ProductsResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> ProductsResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/rye-com/checkout-intents-python#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return ProductsResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def lookup(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
url: str,
|
|
48
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
49
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
50
|
+
extra_headers: Headers | None = None,
|
|
51
|
+
extra_query: Query | None = None,
|
|
52
|
+
extra_body: Body | None = None,
|
|
53
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
54
|
+
) -> Product:
|
|
55
|
+
"""
|
|
56
|
+
Retrieve a product's information by URL.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
extra_headers: Send extra headers
|
|
60
|
+
|
|
61
|
+
extra_query: Add additional query parameters to the request
|
|
62
|
+
|
|
63
|
+
extra_body: Add additional JSON properties to the request
|
|
64
|
+
|
|
65
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
66
|
+
"""
|
|
67
|
+
return self._get(
|
|
68
|
+
"/api/v1/products/lookup",
|
|
69
|
+
options=make_request_options(
|
|
70
|
+
extra_headers=extra_headers,
|
|
71
|
+
extra_query=extra_query,
|
|
72
|
+
extra_body=extra_body,
|
|
73
|
+
timeout=timeout,
|
|
74
|
+
query=maybe_transform({"url": url}, product_lookup_params.ProductLookupParams),
|
|
75
|
+
),
|
|
76
|
+
cast_to=Product,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class AsyncProductsResource(AsyncAPIResource):
|
|
81
|
+
@cached_property
|
|
82
|
+
def with_raw_response(self) -> AsyncProductsResourceWithRawResponse:
|
|
83
|
+
"""
|
|
84
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
85
|
+
the raw response object instead of the parsed content.
|
|
86
|
+
|
|
87
|
+
For more information, see https://www.github.com/rye-com/checkout-intents-python#accessing-raw-response-data-eg-headers
|
|
88
|
+
"""
|
|
89
|
+
return AsyncProductsResourceWithRawResponse(self)
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def with_streaming_response(self) -> AsyncProductsResourceWithStreamingResponse:
|
|
93
|
+
"""
|
|
94
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
95
|
+
|
|
96
|
+
For more information, see https://www.github.com/rye-com/checkout-intents-python#with_streaming_response
|
|
97
|
+
"""
|
|
98
|
+
return AsyncProductsResourceWithStreamingResponse(self)
|
|
99
|
+
|
|
100
|
+
async def lookup(
|
|
101
|
+
self,
|
|
102
|
+
*,
|
|
103
|
+
url: str,
|
|
104
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
105
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
106
|
+
extra_headers: Headers | None = None,
|
|
107
|
+
extra_query: Query | None = None,
|
|
108
|
+
extra_body: Body | None = None,
|
|
109
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
110
|
+
) -> Product:
|
|
111
|
+
"""
|
|
112
|
+
Retrieve a product's information by URL.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
extra_headers: Send extra headers
|
|
116
|
+
|
|
117
|
+
extra_query: Add additional query parameters to the request
|
|
118
|
+
|
|
119
|
+
extra_body: Add additional JSON properties to the request
|
|
120
|
+
|
|
121
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
|
+
"""
|
|
123
|
+
return await self._get(
|
|
124
|
+
"/api/v1/products/lookup",
|
|
125
|
+
options=make_request_options(
|
|
126
|
+
extra_headers=extra_headers,
|
|
127
|
+
extra_query=extra_query,
|
|
128
|
+
extra_body=extra_body,
|
|
129
|
+
timeout=timeout,
|
|
130
|
+
query=await async_maybe_transform({"url": url}, product_lookup_params.ProductLookupParams),
|
|
131
|
+
),
|
|
132
|
+
cast_to=Product,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class ProductsResourceWithRawResponse:
|
|
137
|
+
def __init__(self, products: ProductsResource) -> None:
|
|
138
|
+
self._products = products
|
|
139
|
+
|
|
140
|
+
self.lookup = to_raw_response_wrapper(
|
|
141
|
+
products.lookup,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class AsyncProductsResourceWithRawResponse:
|
|
146
|
+
def __init__(self, products: AsyncProductsResource) -> None:
|
|
147
|
+
self._products = products
|
|
148
|
+
|
|
149
|
+
self.lookup = async_to_raw_response_wrapper(
|
|
150
|
+
products.lookup,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class ProductsResourceWithStreamingResponse:
|
|
155
|
+
def __init__(self, products: ProductsResource) -> None:
|
|
156
|
+
self._products = products
|
|
157
|
+
|
|
158
|
+
self.lookup = to_streamed_response_wrapper(
|
|
159
|
+
products.lookup,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class AsyncProductsResourceWithStreamingResponse:
|
|
164
|
+
def __init__(self, products: AsyncProductsResource) -> None:
|
|
165
|
+
self._products = products
|
|
166
|
+
|
|
167
|
+
self.lookup = async_to_streamed_response_wrapper(
|
|
168
|
+
products.lookup,
|
|
169
|
+
)
|
|
@@ -5,13 +5,17 @@ from __future__ import annotations
|
|
|
5
5
|
from .buyer import Buyer as Buyer
|
|
6
6
|
from .money import Money as Money
|
|
7
7
|
from .offer import Offer as Offer
|
|
8
|
+
from .product import Product as Product
|
|
8
9
|
from .buyer_param import BuyerParam as BuyerParam
|
|
10
|
+
from .product_image import ProductImage as ProductImage
|
|
9
11
|
from .payment_method import PaymentMethod as PaymentMethod
|
|
10
12
|
from .checkout_intent import CheckoutIntent as CheckoutIntent
|
|
11
13
|
from .checkout_session import CheckoutSession as CheckoutSession
|
|
12
14
|
from .variant_selection import VariantSelection as VariantSelection
|
|
13
15
|
from .base_checkout_intent import BaseCheckoutIntent as BaseCheckoutIntent
|
|
14
16
|
from .payment_method_param import PaymentMethodParam as PaymentMethodParam
|
|
17
|
+
from .product_availability import ProductAvailability as ProductAvailability
|
|
18
|
+
from .product_lookup_params import ProductLookupParams as ProductLookupParams
|
|
15
19
|
from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
|
|
16
20
|
from .variant_selection_param import VariantSelectionParam as VariantSelectionParam
|
|
17
21
|
from .checkout_intent_list_params import CheckoutIntentListParams as CheckoutIntentListParams
|
checkout_intents/types/money.py
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from .money import Money
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .product_image import ProductImage
|
|
8
|
+
from .product_availability import ProductAvailability
|
|
9
|
+
|
|
10
|
+
__all__ = ["Product"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Product(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
availability: ProductAvailability
|
|
17
|
+
"""The availability status of a product.
|
|
18
|
+
|
|
19
|
+
- `in_stock`: Product is available for immediate purchase
|
|
20
|
+
- `out_of_stock`: Product is currently unavailable
|
|
21
|
+
- `preorder`: Product is available for pre-order before release
|
|
22
|
+
- `backorder`: Product is temporarily out of stock but can be ordered
|
|
23
|
+
- `unknown`: Availability could not be determined
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
brand: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
description: Optional[str] = None
|
|
29
|
+
|
|
30
|
+
images: List[ProductImage]
|
|
31
|
+
|
|
32
|
+
name: str
|
|
33
|
+
|
|
34
|
+
price: Money
|
|
35
|
+
|
|
36
|
+
sku: Optional[str] = None
|
|
37
|
+
|
|
38
|
+
url: str
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal, TypeAlias
|
|
4
|
+
|
|
5
|
+
__all__ = ["ProductAvailability"]
|
|
6
|
+
|
|
7
|
+
ProductAvailability: TypeAlias = Literal["in_stock", "out_of_stock", "preorder", "backorder", "unknown"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from pydantic import Field as FieldInfo
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ProductImage"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProductImage(BaseModel):
|
|
11
|
+
is_featured: bool = FieldInfo(alias="isFeatured")
|
|
12
|
+
|
|
13
|
+
url: str
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["ProductLookupParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProductLookupParams(TypedDict, total=False):
|
|
11
|
+
url: Required[str]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: checkout-intents
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.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,7 +1,7 @@
|
|
|
1
1
|
checkout_intents/__init__.py,sha256=5m0_Ktnyya4CJ0vdWZbAv7qZMeR1VnXqN_MJtH3RJTM,2833
|
|
2
|
-
checkout_intents/_base_client.py,sha256=
|
|
3
|
-
checkout_intents/_client.py,sha256=
|
|
4
|
-
checkout_intents/_compat.py,sha256=
|
|
2
|
+
checkout_intents/_base_client.py,sha256=erZOquhcv6qskhIcqEJ2mLowvp4htuOuVBjTH4d2qlk,73668
|
|
3
|
+
checkout_intents/_client.py,sha256=SYYqLrhVffl0ellLIcJ602vNYYeYCbbN31mhH9IcdYs,26775
|
|
4
|
+
checkout_intents/_compat.py,sha256=teO44AYozpv2wFRrUi7brcZfGPpFSERQZ4fcdX6zVvs,6627
|
|
5
5
|
checkout_intents/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
checkout_intents/_exceptions.py,sha256=oQn7Y6LzccgRDOtdg20l68bXtgf2tgVNKIrufJPDsuk,4252
|
|
7
7
|
checkout_intents/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
|
@@ -11,12 +11,13 @@ 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=8crq0wrqM8FR-GJ-nXMwjLlp0QEjfJT5H01fve7mjs4,7604
|
|
14
|
-
checkout_intents/_version.py,sha256=
|
|
14
|
+
checkout_intents/_version.py,sha256=G9j4scvWEIXHxS3dIVTif_uRyTGHH9Pv4T7unuYbjNI,169
|
|
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
|
|
18
18
|
checkout_intents/_utils/_compat.py,sha256=rN17SSvjMoQE1GmKFTLniRuG1sKj2WAD5VjdLPeRlF0,1231
|
|
19
19
|
checkout_intents/_utils/_datetime_parse.py,sha256=bABTs0Bc6rabdFvnIwXjEhWL15TcRgWZ_6XGTqN8xUk,4204
|
|
20
|
+
checkout_intents/_utils/_json.py,sha256=bl95uuIWwgSfXX-gP1trK_lDAPwJujYfJ05Cxo2SEC4,962
|
|
20
21
|
checkout_intents/_utils/_logs.py,sha256=dw1slZVPfWp0Z_jBGEQvr8TDY0uu3V7pJuexM_MG4pk,804
|
|
21
22
|
checkout_intents/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
|
22
23
|
checkout_intents/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
|
@@ -27,13 +28,14 @@ checkout_intents/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3u
|
|
|
27
28
|
checkout_intents/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
|
|
28
29
|
checkout_intents/_utils/_utils.py,sha256=g9ftElB09kVT6EVfCIlD_nUfANhDX5_vZO61FDWoIQI,12334
|
|
29
30
|
checkout_intents/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
30
|
-
checkout_intents/resources/__init__.py,sha256=
|
|
31
|
+
checkout_intents/resources/__init__.py,sha256=TwKGeEBVHB9E7w-my6wFQVhH_KBKL72e8HsEEl1jcbw,2033
|
|
31
32
|
checkout_intents/resources/brands.py,sha256=jJ5Jn2GG3MPkdKSg6_OG89dSQTaSGM9e7lBtovn-ABE,6389
|
|
32
33
|
checkout_intents/resources/checkout_intents.py,sha256=c2i_3b3l9LrnWEgL0MRrxVzlRv9mn_8QboLnF_8tiuM,62156
|
|
34
|
+
checkout_intents/resources/products.py,sha256=TO0VzX1JeAdByEIg0hLROzbZKDdBG3yS8JXi5mtSXKI,6029
|
|
33
35
|
checkout_intents/resources/betas/__init__.py,sha256=DQKAlEq_xKd67cDJhihmsFJowbKXwPwZVi6zbGUykfQ,1120
|
|
34
36
|
checkout_intents/resources/betas/betas.py,sha256=48PbcJQb3RFRJ2pbvr7aAR1KYi64bWBQgfxg6KtcqeU,3892
|
|
35
37
|
checkout_intents/resources/betas/checkout_sessions.py,sha256=0Q7IARFC7RUmTPge5HXZb4YY9LCizOX2jCNxsSx7kdI,8659
|
|
36
|
-
checkout_intents/types/__init__.py,sha256=
|
|
38
|
+
checkout_intents/types/__init__.py,sha256=qM17O5mEWQVyJACrKAys5TU4CsUUnSwiiAEt97t2A0w,1614
|
|
37
39
|
checkout_intents/types/base_checkout_intent.py,sha256=pbGjljfrAcC8IwRc6A1ty2M-mdSTfa1_s2ddgy1h2ww,1437
|
|
38
40
|
checkout_intents/types/brand_retrieve_response.py,sha256=c8DCAJvHFHcrIOW6onHj5Y51Yba7zyOrRXZuGfqYkBc,561
|
|
39
41
|
checkout_intents/types/buyer.py,sha256=Ov6mVD-Hjm9A-i9p2dWCXtniLhYpG_6jvy9DReC54YQ,530
|
|
@@ -45,15 +47,19 @@ checkout_intents/types/checkout_intent_create_params.py,sha256=oYmkLLToBKcnvzIUE
|
|
|
45
47
|
checkout_intents/types/checkout_intent_list_params.py,sha256=zc8_xwBHChOcl7bTMSjU7ZbHKIyQGYeUy5UrxeloJj0,521
|
|
46
48
|
checkout_intents/types/checkout_intent_purchase_params.py,sha256=L_NSyWsifBxpZ29zCFBSMqqkHZ1fZQ_q3YnlZH6IlC0,1610
|
|
47
49
|
checkout_intents/types/checkout_session.py,sha256=e1Ay_2GYO9Ybmz53S0Z0o3R4Et5Gm2kiS5wn1y1Ey3g,589
|
|
48
|
-
checkout_intents/types/money.py,sha256
|
|
50
|
+
checkout_intents/types/money.py,sha256=tiB3lhLN-bHTkWrEA-11LuXiv-9SvF7WQyiru3mC7bE,326
|
|
49
51
|
checkout_intents/types/offer.py,sha256=9nGYAlA3tEiRU9lvsktnVl6EWj5dLNr6K9LB8WprckI,985
|
|
50
52
|
checkout_intents/types/payment_method.py,sha256=-v5-L5RPojm8IDrdAhIMGmhVb89vwqT1jhgb-ZWOG7Q,1069
|
|
51
53
|
checkout_intents/types/payment_method_param.py,sha256=_yzwZ5nw7bStK4U2-1ybtpjdJz5funCOMN7MALtF0xk,1225
|
|
54
|
+
checkout_intents/types/product.py,sha256=jl8b4yezOyaLeyx7BgVHjPpT2nLSoEYMCm5-r-oKNtg,924
|
|
55
|
+
checkout_intents/types/product_availability.py,sha256=mzfVhS-KSXPgT4367qAEN0S3teGHPkNHQAy4FiA_BCc,277
|
|
56
|
+
checkout_intents/types/product_image.py,sha256=_iN7QsLuq4u3kywPkxLkdCkFFcYD3_n3uLem5NZ_yU4,289
|
|
57
|
+
checkout_intents/types/product_lookup_params.py,sha256=YFd1SWJoHifWr5jvZYT_KymSfFlf2Xc0h08eG5xIyuU,284
|
|
52
58
|
checkout_intents/types/variant_selection.py,sha256=y6mlU-qGwDfE77mU-x1GTXkDsmn6vuPpy5lBYXqXCBw,259
|
|
53
59
|
checkout_intents/types/variant_selection_param.py,sha256=ahwTmDVIUMV8jvpggEo2jDUTIm9xvXbntDxmIZqT2_k,355
|
|
54
60
|
checkout_intents/types/betas/__init__.py,sha256=ZeKE1oI6DbXReHgxvn2kIS3G3_k8MH8a-o22ONpi5dc,226
|
|
55
61
|
checkout_intents/types/betas/checkout_session_create_params.py,sha256=TdxIvwfNSJ2QX28ugqgTscIwTSBhsp_YrUj8xCYVfMY,2004
|
|
56
|
-
checkout_intents-0.
|
|
57
|
-
checkout_intents-0.
|
|
58
|
-
checkout_intents-0.
|
|
59
|
-
checkout_intents-0.
|
|
62
|
+
checkout_intents-0.13.0.dist-info/METADATA,sha256=X8AJF7WVAsu0pj_cjUGnbddYPA6nlx_InOcQC_mp3bw,24302
|
|
63
|
+
checkout_intents-0.13.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
64
|
+
checkout_intents-0.13.0.dist-info/licenses/LICENSE,sha256=BnK3I8R5OpT_XsQObbpssF9h8-B0aZaerlZjRgSPNpU,1056
|
|
65
|
+
checkout_intents-0.13.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|