checkout-intents 0.1.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/__init__.py +104 -0
- checkout_intents/_base_client.py +1995 -0
- checkout_intents/_client.py +471 -0
- checkout_intents/_compat.py +219 -0
- checkout_intents/_constants.py +14 -0
- checkout_intents/_exceptions.py +108 -0
- checkout_intents/_files.py +123 -0
- checkout_intents/_models.py +840 -0
- checkout_intents/_qs.py +150 -0
- checkout_intents/_resource.py +43 -0
- checkout_intents/_response.py +832 -0
- checkout_intents/_streaming.py +331 -0
- checkout_intents/_types.py +260 -0
- checkout_intents/_utils/__init__.py +64 -0
- checkout_intents/_utils/_compat.py +45 -0
- checkout_intents/_utils/_datetime_parse.py +136 -0
- checkout_intents/_utils/_logs.py +25 -0
- checkout_intents/_utils/_proxy.py +65 -0
- checkout_intents/_utils/_reflection.py +42 -0
- checkout_intents/_utils/_resources_proxy.py +24 -0
- checkout_intents/_utils/_streams.py +12 -0
- checkout_intents/_utils/_sync.py +58 -0
- checkout_intents/_utils/_transform.py +457 -0
- checkout_intents/_utils/_typing.py +156 -0
- checkout_intents/_utils/_utils.py +421 -0
- checkout_intents/_version.py +4 -0
- checkout_intents/lib/.keep +4 -0
- checkout_intents/py.typed +0 -0
- checkout_intents/resources/__init__.py +33 -0
- checkout_intents/resources/brands.py +173 -0
- checkout_intents/resources/checkout_intents.py +480 -0
- checkout_intents/types/__init__.py +18 -0
- checkout_intents/types/base_checkout_intent.py +26 -0
- checkout_intents/types/brand_retrieve_response.py +21 -0
- checkout_intents/types/buyer.py +31 -0
- checkout_intents/types/buyer_param.py +31 -0
- checkout_intents/types/checkout_intent.py +83 -0
- checkout_intents/types/checkout_intent_add_payment_params.py +14 -0
- checkout_intents/types/checkout_intent_confirm_params.py +14 -0
- checkout_intents/types/checkout_intent_create_params.py +22 -0
- checkout_intents/types/money.py +13 -0
- checkout_intents/types/offer.py +40 -0
- checkout_intents/types/payment_method.py +15 -0
- checkout_intents/types/payment_method_param.py +15 -0
- checkout_intents/types/variant_selection.py +21 -0
- checkout_intents/types/variant_selection_param.py +22 -0
- checkout_intents-0.1.0.dist-info/METADATA +532 -0
- checkout_intents-0.1.0.dist-info/RECORD +50 -0
- checkout_intents-0.1.0.dist-info/WHEEL +4 -0
- checkout_intents-0.1.0.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,14 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
from .payment_method_param import PaymentMethodParam
|
|
9
|
+
|
|
10
|
+
__all__ = ["CheckoutIntentAddPaymentParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CheckoutIntentAddPaymentParams(TypedDict, total=False):
|
|
14
|
+
payment_method: Required[Annotated[PaymentMethodParam, PropertyInfo(alias="paymentMethod")]]
|
|
@@ -0,0 +1,14 @@
|
|
|
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, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
from .payment_method_param import PaymentMethodParam
|
|
9
|
+
|
|
10
|
+
__all__ = ["CheckoutIntentConfirmParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CheckoutIntentConfirmParams(TypedDict, total=False):
|
|
14
|
+
payment_method: Required[Annotated[PaymentMethodParam, PropertyInfo(alias="paymentMethod")]]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
from .buyer_param import BuyerParam
|
|
10
|
+
from .variant_selection_param import VariantSelectionParam
|
|
11
|
+
|
|
12
|
+
__all__ = ["CheckoutIntentCreateParams"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CheckoutIntentCreateParams(TypedDict, total=False):
|
|
16
|
+
buyer: Required[BuyerParam]
|
|
17
|
+
|
|
18
|
+
product_url: Required[Annotated[str, PropertyInfo(alias="productUrl")]]
|
|
19
|
+
|
|
20
|
+
quantity: Required[float]
|
|
21
|
+
|
|
22
|
+
variant_selections: Annotated[Iterable[VariantSelectionParam], PropertyInfo(alias="variantSelections")]
|
|
@@ -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__ = ["Money"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Money(BaseModel):
|
|
11
|
+
amount_subunits: float = FieldInfo(alias="amountSubunits")
|
|
12
|
+
|
|
13
|
+
currency_code: str = FieldInfo(alias="currencyCode")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .money import Money
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["Offer", "Cost", "Shipping", "ShippingAvailableOption"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Cost(BaseModel):
|
|
14
|
+
subtotal: Money
|
|
15
|
+
|
|
16
|
+
total: Money
|
|
17
|
+
|
|
18
|
+
discount: Optional[Money] = None
|
|
19
|
+
|
|
20
|
+
shipping: Optional[Money] = None
|
|
21
|
+
|
|
22
|
+
tax: Optional[Money] = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ShippingAvailableOption(BaseModel):
|
|
26
|
+
id: str
|
|
27
|
+
|
|
28
|
+
cost: Money
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Shipping(BaseModel):
|
|
32
|
+
available_options: List[ShippingAvailableOption] = FieldInfo(alias="availableOptions")
|
|
33
|
+
|
|
34
|
+
selected_option_id: Optional[str] = FieldInfo(alias="selectedOptionId", default=None)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Offer(BaseModel):
|
|
38
|
+
cost: Cost
|
|
39
|
+
|
|
40
|
+
shipping: Shipping
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["PaymentMethod"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PaymentMethod(BaseModel):
|
|
13
|
+
stripe_token: str = FieldInfo(alias="stripeToken")
|
|
14
|
+
|
|
15
|
+
type: Literal["stripe_token"]
|
|
@@ -0,0 +1,15 @@
|
|
|
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 Literal, Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["PaymentMethodParam"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PaymentMethodParam(TypedDict, total=False):
|
|
13
|
+
stripe_token: Required[Annotated[str, PropertyInfo(alias="stripeToken")]]
|
|
14
|
+
|
|
15
|
+
type: Required[Literal["stripe_token"]]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["VariantSelection"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class VariantSelection(BaseModel):
|
|
11
|
+
label: str
|
|
12
|
+
"""The label of the variant being selected.
|
|
13
|
+
|
|
14
|
+
Match this label with what is used on the product page.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
value: Union[str, float]
|
|
18
|
+
"""The value of the variant being selected.
|
|
19
|
+
|
|
20
|
+
Match this value with what is used on the product page.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["VariantSelectionParam"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class VariantSelectionParam(TypedDict, total=False):
|
|
12
|
+
label: Required[str]
|
|
13
|
+
"""The label of the variant being selected.
|
|
14
|
+
|
|
15
|
+
Match this label with what is used on the product page.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
value: Required[Union[str, float]]
|
|
19
|
+
"""The value of the variant being selected.
|
|
20
|
+
|
|
21
|
+
Match this value with what is used on the product page.
|
|
22
|
+
"""
|