gr4vy 1.5.2__py3-none-any.whl → 1.10.9__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.
- gr4vy/_version.py +3 -3
- gr4vy/actions.py +307 -0
- gr4vy/all.py +4 -2
- gr4vy/audit_logs.py +4 -2
- gr4vy/balances.py +4 -2
- gr4vy/basesdk.py +6 -0
- gr4vy/buyers_gift_cards.py +4 -2
- gr4vy/buyers_payment_methods.py +4 -2
- gr4vy/buyers_sdk.py +28 -18
- gr4vy/buyers_shipping_details.py +20 -10
- gr4vy/card_scheme_definitions_sdk.py +4 -2
- gr4vy/checkout_sessions.py +40 -14
- gr4vy/digital_wallets_sdk.py +20 -10
- gr4vy/domains.py +8 -4
- gr4vy/errors/apierror.py +1 -1
- gr4vy/errors/error400.py +1 -5
- gr4vy/errors/error401.py +1 -5
- gr4vy/errors/error403.py +1 -5
- gr4vy/errors/error404.py +1 -5
- gr4vy/errors/error405.py +1 -5
- gr4vy/errors/error409.py +1 -5
- gr4vy/errors/error425.py +1 -5
- gr4vy/errors/error429.py +1 -5
- gr4vy/errors/error500.py +1 -5
- gr4vy/errors/error502.py +1 -5
- gr4vy/errors/error504.py +1 -5
- gr4vy/errors/gr4vyerror.py +1 -1
- gr4vy/errors/httpvalidationerror.py +1 -1
- gr4vy/errors/no_response_error.py +1 -1
- gr4vy/errors/responsevalidationerror.py +1 -1
- gr4vy/events.py +54 -7
- gr4vy/executions.py +12 -6
- gr4vy/gift_cards_sdk.py +16 -8
- gr4vy/jobs.py +4 -2
- gr4vy/merchant_accounts_sdk.py +16 -8
- gr4vy/models/__init__.py +103 -29
- gr4vy/models/adyencardoptions.py +1 -6
- gr4vy/models/adyensepaoptions.py +1 -6
- gr4vy/models/airline.py +2 -7
- gr4vy/models/airlineleg.py +2 -6
- gr4vy/models/airlinepassenger.py +2 -6
- gr4vy/models/auditlogentry.py +3 -3
- gr4vy/models/auditlogentryuser.py +3 -3
- gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
- gr4vy/models/braintreedynamicdatafieldsoptions.py +2 -7
- gr4vy/models/browserinfo.py +2 -4
- gr4vy/models/buyer.py +3 -3
- gr4vy/models/buyercreate.py +3 -3
- gr4vy/models/buyerupdate.py +3 -3
- gr4vy/models/cartitem.py +9 -6
- gr4vy/models/chaseoptions.py +46 -0
- gr4vy/models/checkoutsession.py +24 -3
- gr4vy/models/checkoutsessioncreate.py +39 -5
- gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
- gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
- gr4vy/models/create_payment_methodop.py +6 -0
- gr4vy/models/createsession.py +3 -3
- gr4vy/models/cybersourceoptions.py +7 -0
- gr4vy/models/definitionfield.py +1 -6
- gr4vy/models/digitalwallet.py +3 -5
- gr4vy/models/digitalwalletcreate.py +2 -6
- gr4vy/models/dlocalupirecurringinfooptions.py +13 -15
- gr4vy/models/errordetail.py +2 -4
- gr4vy/models/flow.py +16 -0
- gr4vy/models/flowaction.py +16 -0
- gr4vy/models/forterantifraudoptions.py +2 -7
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -8
- gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +3 -6
- gr4vy/models/giftcardredemption.py +4 -8
- gr4vy/models/giftcardservice.py +3 -5
- gr4vy/models/giftcardsummary.py +3 -5
- gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
- gr4vy/models/instrumenttype.py +1 -0
- gr4vy/models/integrationclient.py +16 -0
- gr4vy/models/list_all_report_executionsop.py +2 -14
- gr4vy/models/list_audit_logsop.py +2 -10
- gr4vy/models/list_buyer_payment_methodsop.py +2 -3
- gr4vy/models/list_payment_methodsop.py +2 -14
- gr4vy/models/list_payment_servicesop.py +2 -8
- gr4vy/models/list_reportsop.py +2 -10
- gr4vy/models/list_transaction_actionsop.py +43 -0
- gr4vy/models/list_transaction_eventsop.py +12 -1
- gr4vy/models/list_transactionsop.py +4 -22
- gr4vy/models/merchantaccount.py +3 -5
- gr4vy/models/merchantaccountcreate.py +2 -6
- gr4vy/models/merchantaccountupdate.py +2 -6
- gr4vy/models/method.py +3 -0
- gr4vy/models/mockcardoptions.py +7 -2
- gr4vy/models/mode.py +1 -0
- gr4vy/models/monatospeioptions.py +15 -0
- gr4vy/models/networktoken.py +3 -3
- gr4vy/models/networktokenpaymentmethodcreate.py +4 -8
- gr4vy/models/nuveiidealoptions.py +49 -0
- gr4vy/models/paymentlink.py +18 -7
- gr4vy/models/paymentlinkcreate.py +23 -37
- gr4vy/models/paymentmethod.py +7 -13
- gr4vy/models/paymentmethodcard.py +3 -5
- gr4vy/models/paymentmethoddetailscard.py +2 -6
- gr4vy/models/paymentmethodsummary.py +6 -12
- gr4vy/models/paymentoption.py +3 -3
- gr4vy/models/paymentservice.py +4 -6
- gr4vy/models/paymentserviceconfiguration.py +2 -6
- gr4vy/models/paymentservicedefinition.py +11 -5
- gr4vy/models/paymentservicetoken.py +3 -3
- gr4vy/models/payoutcreate.py +5 -9
- gr4vy/models/payoutsummary.py +4 -6
- gr4vy/models/paypaloptions.py +8 -2
- gr4vy/models/paypalshippingoptions.py +51 -0
- gr4vy/models/paypalshippingoptionsitem.py +89 -0
- gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
- gr4vy/models/plaidpaymentmethodcreate.py +106 -0
- gr4vy/models/redirectpaymentmethodcreate.py +3 -6
- gr4vy/models/refund.py +4 -4
- gr4vy/models/report.py +4 -6
- gr4vy/models/reportcreate.py +2 -3
- gr4vy/models/reportexecution.py +3 -3
- gr4vy/models/reportexecutionsummary.py +3 -3
- gr4vy/models/reportspec.py +2 -4
- gr4vy/models/reportsummary.py +3 -5
- gr4vy/models/taxid.py +2 -4
- gr4vy/models/taxidkind.py +6 -0
- gr4vy/models/threedsecuredatav1.py +2 -6
- gr4vy/models/threedsecuredatav2.py +2 -6
- gr4vy/models/transaction.py +74 -25
- gr4vy/models/transactionaction.py +48 -0
- gr4vy/models/transactionactions.py +17 -0
- gr4vy/models/transactionbuyer.py +3 -3
- gr4vy/models/transactioncancel.py +3 -3
- gr4vy/models/transactioncapture.py +3 -3
- gr4vy/models/transactionconnectionoptions.py +30 -0
- gr4vy/models/transactioncreate.py +27 -12
- gr4vy/models/transactionevent.py +5 -3
- gr4vy/models/transactionpaymentmethod.py +6 -12
- gr4vy/models/transactionpaymentservice.py +3 -3
- gr4vy/models/transactionrefundcreate.py +2 -6
- gr4vy/models/transactionsummary.py +6 -10
- gr4vy/models/transactionthreedsecuresummary.py +3 -9
- gr4vy/models/transactionvoid.py +3 -3
- gr4vy/models/trustlyoptions.py +2 -9
- gr4vy/network_tokens_cryptogram.py +4 -2
- gr4vy/payment_links_sdk.py +34 -14
- gr4vy/payment_methods_network_tokens.py +20 -10
- gr4vy/payment_methods_payment_service_tokens.py +12 -6
- gr4vy/payment_methods_sdk.py +16 -8
- gr4vy/payment_options_sdk.py +4 -2
- gr4vy/payment_service_definitions_sdk.py +12 -6
- gr4vy/payment_services_sdk.py +28 -14
- gr4vy/payouts.py +16 -10
- gr4vy/refunds_sdk.py +4 -2
- gr4vy/report_executions_sdk.py +4 -2
- gr4vy/reports_sdk.py +16 -8
- gr4vy/sessions.py +12 -6
- gr4vy/transactions.py +99 -28
- gr4vy/transactions_refunds.py +12 -6
- gr4vy/transactions_settlements.py +8 -4
- gr4vy/types/basemodel.py +41 -3
- gr4vy/utils/__init__.py +0 -3
- gr4vy/utils/enums.py +60 -0
- gr4vy/utils/forms.py +21 -10
- gr4vy/utils/queryparams.py +14 -2
- gr4vy/utils/requestbodies.py +1 -1
- gr4vy/utils/retries.py +69 -5
- gr4vy/utils/serializers.py +0 -20
- gr4vy/utils/unmarshal_json_response.py +15 -1
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/METADATA +39 -39
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/RECORD +167 -155
- gr4vy/models/billingdetails_output.py +0 -87
- gr4vy/models/guestbuyer_output.py +0 -80
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +0 -0
gr4vy/models/buyerupdate.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .billingdetails import BillingDetails, BillingDetailsTypedDict
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
6
|
from pydantic import model_serializer
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
@@ -16,7 +16,7 @@ class BuyerUpdateTypedDict(TypedDict):
|
|
|
16
16
|
r"""The merchant identifier for this buyer."""
|
|
17
17
|
account_number: NotRequired[Nullable[str]]
|
|
18
18
|
r"""The buyer account number"""
|
|
19
|
-
billing_details: NotRequired[Nullable[
|
|
19
|
+
billing_details: NotRequired[Nullable[BillingDetailsTypedDict]]
|
|
20
20
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
21
21
|
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ class BuyerUpdate(BaseModel):
|
|
|
32
32
|
account_number: OptionalNullable[str] = UNSET
|
|
33
33
|
r"""The buyer account number"""
|
|
34
34
|
|
|
35
|
-
billing_details: OptionalNullable[
|
|
35
|
+
billing_details: OptionalNullable[BillingDetails] = UNSET
|
|
36
36
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
37
37
|
|
|
38
38
|
@model_serializer(mode="wrap")
|
gr4vy/models/cartitem.py
CHANGED
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .producttype import ProductType
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
from pydantic import model_serializer
|
|
8
|
-
from pydantic.functional_validators import PlainValidator
|
|
9
7
|
from typing import List
|
|
10
|
-
from typing_extensions import
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class CartItemTypedDict(TypedDict):
|
|
@@ -25,6 +23,8 @@ class CartItemTypedDict(TypedDict):
|
|
|
25
23
|
r"""An external identifier for the cart item. This can be set to any value and is not sent to the payment service."""
|
|
26
24
|
sku: NotRequired[Nullable[str]]
|
|
27
25
|
r"""The SKU or product code for the item."""
|
|
26
|
+
upc: NotRequired[Nullable[str]]
|
|
27
|
+
r"""The UPC for the item."""
|
|
28
28
|
product_url: NotRequired[Nullable[str]]
|
|
29
29
|
r"""The product URL for the item."""
|
|
30
30
|
image_url: NotRequired[Nullable[str]]
|
|
@@ -71,6 +71,9 @@ class CartItem(BaseModel):
|
|
|
71
71
|
sku: OptionalNullable[str] = UNSET
|
|
72
72
|
r"""The SKU or product code for the item."""
|
|
73
73
|
|
|
74
|
+
upc: OptionalNullable[str] = UNSET
|
|
75
|
+
r"""The UPC for the item."""
|
|
76
|
+
|
|
74
77
|
product_url: OptionalNullable[str] = UNSET
|
|
75
78
|
r"""The product URL for the item."""
|
|
76
79
|
|
|
@@ -80,9 +83,7 @@ class CartItem(BaseModel):
|
|
|
80
83
|
categories: OptionalNullable[List[str]] = UNSET
|
|
81
84
|
r"""A list of strings containing product categories for the item."""
|
|
82
85
|
|
|
83
|
-
product_type:
|
|
84
|
-
OptionalNullable[ProductType], PlainValidator(validate_open_enum(False))
|
|
85
|
-
] = UNSET
|
|
86
|
+
product_type: OptionalNullable[ProductType] = UNSET
|
|
86
87
|
r"""The product type of the cart item."""
|
|
87
88
|
|
|
88
89
|
seller_country: OptionalNullable[str] = UNSET
|
|
@@ -113,6 +114,7 @@ class CartItem(BaseModel):
|
|
|
113
114
|
"tax_amount",
|
|
114
115
|
"external_identifier",
|
|
115
116
|
"sku",
|
|
117
|
+
"upc",
|
|
116
118
|
"product_url",
|
|
117
119
|
"image_url",
|
|
118
120
|
"categories",
|
|
@@ -130,6 +132,7 @@ class CartItem(BaseModel):
|
|
|
130
132
|
"tax_amount",
|
|
131
133
|
"external_identifier",
|
|
132
134
|
"sku",
|
|
135
|
+
"upc",
|
|
133
136
|
"product_url",
|
|
134
137
|
"image_url",
|
|
135
138
|
"categories",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
|
+
from pydantic import model_serializer
|
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ChaseOptionsTypedDict(TypedDict):
|
|
10
|
+
comments: NotRequired[Nullable[str]]
|
|
11
|
+
r"""Custom order comment"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ChaseOptions(BaseModel):
|
|
15
|
+
comments: OptionalNullable[str] = UNSET
|
|
16
|
+
r"""Custom order comment"""
|
|
17
|
+
|
|
18
|
+
@model_serializer(mode="wrap")
|
|
19
|
+
def serialize_model(self, handler):
|
|
20
|
+
optional_fields = ["comments"]
|
|
21
|
+
nullable_fields = ["comments"]
|
|
22
|
+
null_default_fields = []
|
|
23
|
+
|
|
24
|
+
serialized = handler(self)
|
|
25
|
+
|
|
26
|
+
m = {}
|
|
27
|
+
|
|
28
|
+
for n, f in type(self).model_fields.items():
|
|
29
|
+
k = f.alias or n
|
|
30
|
+
val = serialized.get(k)
|
|
31
|
+
serialized.pop(k, None)
|
|
32
|
+
|
|
33
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
34
|
+
is_set = (
|
|
35
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
36
|
+
or k in null_default_fields
|
|
37
|
+
) # pylint: disable=no-member
|
|
38
|
+
|
|
39
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
40
|
+
m[k] = val
|
|
41
|
+
elif val != UNSET_SENTINEL and (
|
|
42
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
43
|
+
):
|
|
44
|
+
m[k] = val
|
|
45
|
+
|
|
46
|
+
return m
|
gr4vy/models/checkoutsession.py
CHANGED
|
@@ -7,7 +7,7 @@ from .checkoutsessionpaymentmethod import (
|
|
|
7
7
|
CheckoutSessionPaymentMethod,
|
|
8
8
|
CheckoutSessionPaymentMethodTypedDict,
|
|
9
9
|
)
|
|
10
|
-
from .
|
|
10
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
11
11
|
from datetime import datetime
|
|
12
12
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
13
13
|
from gr4vy.utils import validate_const
|
|
@@ -27,10 +27,16 @@ class CheckoutSessionTypedDict(TypedDict):
|
|
|
27
27
|
r"""An array of cart items that represents the line items of a transaction."""
|
|
28
28
|
metadata: NotRequired[Nullable[Dict[str, str]]]
|
|
29
29
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
30
|
-
buyer: NotRequired[Nullable[
|
|
30
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
31
31
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
32
32
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
33
33
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
34
|
+
amount: NotRequired[Nullable[int]]
|
|
35
|
+
r"""The total amount for this transaction."""
|
|
36
|
+
currency: NotRequired[Nullable[str]]
|
|
37
|
+
r"""The currency code for this transaction."""
|
|
38
|
+
payment_service_id: NotRequired[Nullable[str]]
|
|
39
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
34
40
|
type: Literal["checkout-session"]
|
|
35
41
|
r"""Always `checkout-session`"""
|
|
36
42
|
payment_method: NotRequired[Nullable[CheckoutSessionPaymentMethodTypedDict]]
|
|
@@ -50,12 +56,21 @@ class CheckoutSession(BaseModel):
|
|
|
50
56
|
metadata: OptionalNullable[Dict[str, str]] = UNSET
|
|
51
57
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
52
58
|
|
|
53
|
-
buyer: OptionalNullable[
|
|
59
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
54
60
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
55
61
|
|
|
56
62
|
airline: OptionalNullable[Airline] = UNSET
|
|
57
63
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
58
64
|
|
|
65
|
+
amount: OptionalNullable[int] = UNSET
|
|
66
|
+
r"""The total amount for this transaction."""
|
|
67
|
+
|
|
68
|
+
currency: OptionalNullable[str] = UNSET
|
|
69
|
+
r"""The currency code for this transaction."""
|
|
70
|
+
|
|
71
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
72
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
73
|
+
|
|
59
74
|
TYPE: Annotated[
|
|
60
75
|
Annotated[
|
|
61
76
|
Optional[Literal["checkout-session"]],
|
|
@@ -75,6 +90,9 @@ class CheckoutSession(BaseModel):
|
|
|
75
90
|
"metadata",
|
|
76
91
|
"buyer",
|
|
77
92
|
"airline",
|
|
93
|
+
"amount",
|
|
94
|
+
"currency",
|
|
95
|
+
"payment_service_id",
|
|
78
96
|
"type",
|
|
79
97
|
"payment_method",
|
|
80
98
|
]
|
|
@@ -83,6 +101,9 @@ class CheckoutSession(BaseModel):
|
|
|
83
101
|
"metadata",
|
|
84
102
|
"buyer",
|
|
85
103
|
"airline",
|
|
104
|
+
"amount",
|
|
105
|
+
"currency",
|
|
106
|
+
"payment_service_id",
|
|
86
107
|
"payment_method",
|
|
87
108
|
]
|
|
88
109
|
null_default_fields = []
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .airline import Airline, AirlineTypedDict
|
|
5
5
|
from .cartitem import CartItem, CartItemTypedDict
|
|
6
|
-
from .
|
|
6
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
7
7
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
8
8
|
from pydantic import model_serializer
|
|
9
9
|
from typing import Dict, List, Optional
|
|
@@ -15,11 +15,18 @@ class CheckoutSessionCreateTypedDict(TypedDict):
|
|
|
15
15
|
r"""An array of cart items that represents the line items of a transaction."""
|
|
16
16
|
metadata: NotRequired[Nullable[Dict[str, str]]]
|
|
17
17
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
18
|
-
buyer: NotRequired[Nullable[
|
|
18
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
19
19
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
20
20
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
21
21
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
22
|
+
amount: NotRequired[Nullable[int]]
|
|
23
|
+
r"""The total amount for this transaction."""
|
|
24
|
+
currency: NotRequired[Nullable[str]]
|
|
25
|
+
r"""The currency code for this transaction."""
|
|
26
|
+
payment_service_id: NotRequired[Nullable[str]]
|
|
27
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
22
28
|
expires_in: NotRequired[float]
|
|
29
|
+
r"""The time in seconds when this checkout session expires."""
|
|
23
30
|
|
|
24
31
|
|
|
25
32
|
class CheckoutSessionCreate(BaseModel):
|
|
@@ -29,18 +36,45 @@ class CheckoutSessionCreate(BaseModel):
|
|
|
29
36
|
metadata: OptionalNullable[Dict[str, str]] = UNSET
|
|
30
37
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
31
38
|
|
|
32
|
-
buyer: OptionalNullable[
|
|
39
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
33
40
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
34
41
|
|
|
35
42
|
airline: OptionalNullable[Airline] = UNSET
|
|
36
43
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
37
44
|
|
|
45
|
+
amount: OptionalNullable[int] = UNSET
|
|
46
|
+
r"""The total amount for this transaction."""
|
|
47
|
+
|
|
48
|
+
currency: OptionalNullable[str] = UNSET
|
|
49
|
+
r"""The currency code for this transaction."""
|
|
50
|
+
|
|
51
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
52
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
53
|
+
|
|
38
54
|
expires_in: Optional[float] = 3600
|
|
55
|
+
r"""The time in seconds when this checkout session expires."""
|
|
39
56
|
|
|
40
57
|
@model_serializer(mode="wrap")
|
|
41
58
|
def serialize_model(self, handler):
|
|
42
|
-
optional_fields = [
|
|
43
|
-
|
|
59
|
+
optional_fields = [
|
|
60
|
+
"cart_items",
|
|
61
|
+
"metadata",
|
|
62
|
+
"buyer",
|
|
63
|
+
"airline",
|
|
64
|
+
"amount",
|
|
65
|
+
"currency",
|
|
66
|
+
"payment_service_id",
|
|
67
|
+
"expires_in",
|
|
68
|
+
]
|
|
69
|
+
nullable_fields = [
|
|
70
|
+
"cart_items",
|
|
71
|
+
"metadata",
|
|
72
|
+
"buyer",
|
|
73
|
+
"airline",
|
|
74
|
+
"amount",
|
|
75
|
+
"currency",
|
|
76
|
+
"payment_service_id",
|
|
77
|
+
]
|
|
44
78
|
null_default_fields = []
|
|
45
79
|
|
|
46
80
|
serialized = handler(self)
|
|
@@ -7,10 +7,10 @@ from .checkoutsessionpaymentmethoddetails import (
|
|
|
7
7
|
CheckoutSessionPaymentMethodDetailsTypedDict,
|
|
8
8
|
)
|
|
9
9
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
10
|
-
from gr4vy.utils import validate_const
|
|
10
|
+
from gr4vy.utils import validate_const
|
|
11
11
|
import pydantic
|
|
12
12
|
from pydantic import model_serializer
|
|
13
|
-
from pydantic.functional_validators import AfterValidator
|
|
13
|
+
from pydantic.functional_validators import AfterValidator
|
|
14
14
|
from typing import Literal, Optional
|
|
15
15
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
16
16
|
|
|
@@ -57,9 +57,7 @@ class CheckoutSessionPaymentMethod(BaseModel):
|
|
|
57
57
|
] = "card"
|
|
58
58
|
r"""Always `card`"""
|
|
59
59
|
|
|
60
|
-
scheme:
|
|
61
|
-
OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
|
|
62
|
-
] = UNSET
|
|
60
|
+
scheme: OptionalNullable[CardScheme] = UNSET
|
|
63
61
|
r"""The scheme of the card."""
|
|
64
62
|
|
|
65
63
|
fingerprint: OptionalNullable[str] = UNSET
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cardtype import CardType
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
from pydantic import model_serializer
|
|
8
|
-
from
|
|
9
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
class CheckoutSessionPaymentMethodDetailsTypedDict(TypedDict):
|
|
@@ -27,9 +25,7 @@ class CheckoutSessionPaymentMethodDetails(BaseModel):
|
|
|
27
25
|
card_country: OptionalNullable[str] = UNSET
|
|
28
26
|
r"""The country of the card issuer."""
|
|
29
27
|
|
|
30
|
-
card_type:
|
|
31
|
-
OptionalNullable[CardType], PlainValidator(validate_open_enum(False))
|
|
32
|
-
] = UNSET
|
|
28
|
+
card_type: OptionalNullable[CardType] = UNSET
|
|
33
29
|
r"""The payment scheme of the card."""
|
|
34
30
|
|
|
35
31
|
card_issuer_name: OptionalNullable[str] = UNSET
|
|
@@ -9,6 +9,10 @@ from .checkoutsessionpaymentmethodcreate import (
|
|
|
9
9
|
CheckoutSessionPaymentMethodCreate,
|
|
10
10
|
CheckoutSessionPaymentMethodCreateTypedDict,
|
|
11
11
|
)
|
|
12
|
+
from .plaidpaymentmethodcreate import (
|
|
13
|
+
PlaidPaymentMethodCreate,
|
|
14
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
15
|
+
)
|
|
12
16
|
from .redirectpaymentmethodcreate import (
|
|
13
17
|
RedirectPaymentMethodCreate,
|
|
14
18
|
RedirectPaymentMethodCreateTypedDict,
|
|
@@ -39,6 +43,7 @@ BodyTypedDict = TypeAliasType(
|
|
|
39
43
|
Union[
|
|
40
44
|
CheckoutSessionPaymentMethodCreateTypedDict,
|
|
41
45
|
RedirectPaymentMethodCreateTypedDict,
|
|
46
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
42
47
|
CardPaymentMethodCreateTypedDict,
|
|
43
48
|
],
|
|
44
49
|
)
|
|
@@ -49,6 +54,7 @@ Body = TypeAliasType(
|
|
|
49
54
|
Union[
|
|
50
55
|
CheckoutSessionPaymentMethodCreate,
|
|
51
56
|
RedirectPaymentMethodCreate,
|
|
57
|
+
PlaidPaymentMethodCreate,
|
|
52
58
|
CardPaymentMethodCreate,
|
|
53
59
|
],
|
|
54
60
|
)
|
gr4vy/models/createsession.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .createsessionstatus import CreateSessionStatus
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_const
|
|
6
|
+
from gr4vy.utils import validate_const
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic import model_serializer
|
|
9
|
-
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from pydantic.functional_validators import AfterValidator
|
|
10
10
|
from typing import Any, Dict, Literal, Optional
|
|
11
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
12
12
|
|
|
@@ -28,7 +28,7 @@ class CreateSessionTypedDict(TypedDict):
|
|
|
28
28
|
class CreateSession(BaseModel):
|
|
29
29
|
r"""The session data received from the payment service."""
|
|
30
30
|
|
|
31
|
-
status:
|
|
31
|
+
status: CreateSessionStatus
|
|
32
32
|
|
|
33
33
|
TYPE: Annotated[
|
|
34
34
|
Annotated[
|
|
@@ -14,6 +14,8 @@ class CybersourceOptionsTypedDict(TypedDict):
|
|
|
14
14
|
r"""A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string."""
|
|
15
15
|
ship_to_method: NotRequired[Nullable[str]]
|
|
16
16
|
r"""The shipping method for this transaction."""
|
|
17
|
+
comments: NotRequired[Nullable[str]]
|
|
18
|
+
r"""Brief description of the order or any comment you wish to add to the order."""
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
class CybersourceOptions(BaseModel):
|
|
@@ -26,17 +28,22 @@ class CybersourceOptions(BaseModel):
|
|
|
26
28
|
ship_to_method: OptionalNullable[str] = UNSET
|
|
27
29
|
r"""The shipping method for this transaction."""
|
|
28
30
|
|
|
31
|
+
comments: OptionalNullable[str] = UNSET
|
|
32
|
+
r"""Brief description of the order or any comment you wish to add to the order."""
|
|
33
|
+
|
|
29
34
|
@model_serializer(mode="wrap")
|
|
30
35
|
def serialize_model(self, handler):
|
|
31
36
|
optional_fields = [
|
|
32
37
|
"meta_key_merchant_id",
|
|
33
38
|
"merchant_defined_information",
|
|
34
39
|
"ship_to_method",
|
|
40
|
+
"comments",
|
|
35
41
|
]
|
|
36
42
|
nullable_fields = [
|
|
37
43
|
"meta_key_merchant_id",
|
|
38
44
|
"merchant_defined_information",
|
|
39
45
|
"ship_to_method",
|
|
46
|
+
"comments",
|
|
40
47
|
]
|
|
41
48
|
null_default_fields = []
|
|
42
49
|
|
gr4vy/models/definitionfield.py
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .definitionfieldformat import DefinitionFieldFormat
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
import pydantic
|
|
8
|
-
from pydantic.functional_validators import PlainValidator
|
|
9
7
|
from typing_extensions import Annotated, TypedDict
|
|
10
8
|
|
|
11
9
|
|
|
@@ -35,10 +33,7 @@ class DefinitionField(BaseModel):
|
|
|
35
33
|
required: bool
|
|
36
34
|
r"""Defines if this field is required when the service is created."""
|
|
37
35
|
|
|
38
|
-
format_: Annotated[
|
|
39
|
-
Annotated[DefinitionFieldFormat, PlainValidator(validate_open_enum(False))],
|
|
40
|
-
pydantic.Field(alias="format"),
|
|
41
|
-
]
|
|
36
|
+
format_: Annotated[DefinitionFieldFormat, pydantic.Field(alias="format")]
|
|
42
37
|
|
|
43
38
|
secret: bool
|
|
44
39
|
r"""Defines if this field is secret. When `true` the field's value is not returned when querying the payment service information."""
|
gr4vy/models/digitalwallet.py
CHANGED
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .digitalwalletprovider import DigitalWalletProvider
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import validate_const
|
|
7
|
+
from gr4vy.utils import validate_const
|
|
8
8
|
import pydantic
|
|
9
9
|
from pydantic import model_serializer
|
|
10
|
-
from pydantic.functional_validators import AfterValidator
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from typing import Any, Dict, List, Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
@@ -51,9 +51,7 @@ class DigitalWallet(BaseModel):
|
|
|
51
51
|
merchant_account_id: str
|
|
52
52
|
r"""The ID of the merchant account this digital wallet belongs to."""
|
|
53
53
|
|
|
54
|
-
provider:
|
|
55
|
-
DigitalWalletProvider, PlainValidator(validate_open_enum(False))
|
|
56
|
-
]
|
|
54
|
+
provider: DigitalWalletProvider
|
|
57
55
|
|
|
58
56
|
merchant_name: str
|
|
59
57
|
r"""The name of the merchant the digital wallet is registered to."""
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .digitalwalletprovider import DigitalWalletProvider
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
|
-
from gr4vy.utils import validate_open_enum
|
|
7
6
|
from pydantic import model_serializer
|
|
8
|
-
from pydantic.functional_validators import PlainValidator
|
|
9
7
|
from typing import List, Optional
|
|
10
|
-
from typing_extensions import
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class DigitalWalletCreateTypedDict(TypedDict):
|
|
@@ -25,9 +23,7 @@ class DigitalWalletCreateTypedDict(TypedDict):
|
|
|
25
23
|
class DigitalWalletCreate(BaseModel):
|
|
26
24
|
r"""Request body for registering a new digital wallet"""
|
|
27
25
|
|
|
28
|
-
provider:
|
|
29
|
-
DigitalWalletProvider, PlainValidator(validate_open_enum(False))
|
|
30
|
-
]
|
|
26
|
+
provider: DigitalWalletProvider
|
|
31
27
|
|
|
32
28
|
merchant_name: str
|
|
33
29
|
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from gr4vy.types import BaseModel, UnrecognizedStr
|
|
5
|
-
from gr4vy.utils import validate_open_enum
|
|
6
|
-
from pydantic.functional_validators import PlainValidator
|
|
7
5
|
from typing import Literal, Union
|
|
8
|
-
from typing_extensions import
|
|
6
|
+
from typing_extensions import TypedDict
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
SubscriptionFrequencyUnit = Union[
|
|
12
10
|
Literal[
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
11
|
+
"MONTH",
|
|
12
|
+
"WEEK",
|
|
13
|
+
"BI_MONTHLY",
|
|
14
|
+
"ONDEMAND",
|
|
15
|
+
"QUARTER",
|
|
16
|
+
"YEAR",
|
|
17
|
+
"SEMI_ANNUALLY",
|
|
18
|
+
"DAY",
|
|
19
19
|
],
|
|
20
20
|
UnrecognizedStr,
|
|
21
21
|
]
|
|
22
|
-
r"""Indicates the frequency unit for the subscription. Allowed values are: `
|
|
22
|
+
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class DlocalUPIRecurringInfoOptionsTypedDict(TypedDict):
|
|
26
26
|
subscription_frequency_unit: SubscriptionFrequencyUnit
|
|
27
|
-
r"""Indicates the frequency unit for the subscription. Allowed values are: `
|
|
27
|
+
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
|
|
28
28
|
subscription_frequency: int
|
|
29
29
|
r"""Indicates the frequency for the subscription."""
|
|
30
30
|
subscription_start_at: str
|
|
@@ -34,10 +34,8 @@ class DlocalUPIRecurringInfoOptionsTypedDict(TypedDict):
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
class DlocalUPIRecurringInfoOptions(BaseModel):
|
|
37
|
-
subscription_frequency_unit:
|
|
38
|
-
|
|
39
|
-
]
|
|
40
|
-
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAILY`, `WEEKLY`, `MONTHLY`, `QUARTERLY`, `SEMI_ANNUAL`, and `ANNUAL`."""
|
|
37
|
+
subscription_frequency_unit: SubscriptionFrequencyUnit
|
|
38
|
+
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
|
|
41
39
|
|
|
42
40
|
subscription_frequency: int
|
|
43
41
|
r"""Indicates the frequency for the subscription."""
|
gr4vy/models/errordetail.py
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .errorlocation import ErrorLocation
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from
|
|
7
|
-
from pydantic.functional_validators import PlainValidator
|
|
8
|
-
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
from typing_extensions import TypedDict
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
class ErrorDetailTypedDict(TypedDict):
|
|
@@ -19,7 +17,7 @@ class ErrorDetailTypedDict(TypedDict):
|
|
|
19
17
|
|
|
20
18
|
|
|
21
19
|
class ErrorDetail(BaseModel):
|
|
22
|
-
location:
|
|
20
|
+
location: ErrorLocation
|
|
23
21
|
|
|
24
22
|
pointer: str
|
|
25
23
|
r"""A JSON pointer for the particular property that caused the error."""
|
gr4vy/models/flow.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from gr4vy.types import UnrecognizedStr
|
|
5
|
+
from typing import Literal, Union
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Flow = Union[
|
|
9
|
+
Literal[
|
|
10
|
+
"checkout",
|
|
11
|
+
"card-transaction",
|
|
12
|
+
"non-card-transaction",
|
|
13
|
+
"redirect-transaction",
|
|
14
|
+
],
|
|
15
|
+
UnrecognizedStr,
|
|
16
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from gr4vy.types import UnrecognizedStr
|
|
5
|
+
from typing import Literal, Union
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
FlowAction = Union[
|
|
9
|
+
Literal[
|
|
10
|
+
"select-payment-options",
|
|
11
|
+
"route-transaction",
|
|
12
|
+
"decline-early",
|
|
13
|
+
"skip-3ds",
|
|
14
|
+
],
|
|
15
|
+
UnrecognizedStr,
|
|
16
|
+
]
|
|
@@ -17,11 +17,9 @@ from gr4vy.types import (
|
|
|
17
17
|
UNSET_SENTINEL,
|
|
18
18
|
UnrecognizedStr,
|
|
19
19
|
)
|
|
20
|
-
from gr4vy.utils import validate_open_enum
|
|
21
20
|
from pydantic import model_serializer
|
|
22
|
-
from pydantic.functional_validators import PlainValidator
|
|
23
21
|
from typing import List, Literal, Union
|
|
24
|
-
from typing_extensions import
|
|
22
|
+
from typing_extensions import NotRequired, TypedDict
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
ForterAntiFraudOptionsDeliveryType = Union[
|
|
@@ -48,10 +46,7 @@ class ForterAntiFraudOptionsTypedDict(TypedDict):
|
|
|
48
46
|
|
|
49
47
|
|
|
50
48
|
class ForterAntiFraudOptions(BaseModel):
|
|
51
|
-
delivery_type:
|
|
52
|
-
OptionalNullable[ForterAntiFraudOptionsDeliveryType],
|
|
53
|
-
PlainValidator(validate_open_enum(False)),
|
|
54
|
-
] = UNSET
|
|
49
|
+
delivery_type: OptionalNullable[ForterAntiFraudOptionsDeliveryType] = UNSET
|
|
55
50
|
r"""The delivery type"""
|
|
56
51
|
|
|
57
52
|
delivery_method: OptionalNullable[str] = UNSET
|
|
@@ -9,14 +9,12 @@ from gr4vy.types import (
|
|
|
9
9
|
UNSET_SENTINEL,
|
|
10
10
|
UnrecognizedStr,
|
|
11
11
|
)
|
|
12
|
-
from gr4vy.utils import validate_open_enum
|
|
13
12
|
from pydantic import model_serializer
|
|
14
|
-
from pydantic.functional_validators import PlainValidator
|
|
15
13
|
from typing import Literal, Union
|
|
16
|
-
from typing_extensions import
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict
|
|
17
15
|
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
ForterAntiFraudOptionsCartItemBasicItemDataType = Union[
|
|
20
18
|
Literal[
|
|
21
19
|
"TANGIBLE",
|
|
22
20
|
"NON_TANGIBLE",
|
|
@@ -26,14 +24,12 @@ Type = Union[
|
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
class ForterAntiFraudOptionsCartItemBasicItemDataTypedDict(TypedDict):
|
|
29
|
-
type: NotRequired[Nullable[
|
|
27
|
+
type: NotRequired[Nullable[ForterAntiFraudOptionsCartItemBasicItemDataType]]
|
|
30
28
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
31
29
|
|
|
32
30
|
|
|
33
31
|
class ForterAntiFraudOptionsCartItemBasicItemData(BaseModel):
|
|
34
|
-
type:
|
|
35
|
-
OptionalNullable[Type], PlainValidator(validate_open_enum(False))
|
|
36
|
-
] = UNSET
|
|
32
|
+
type: OptionalNullable[ForterAntiFraudOptionsCartItemBasicItemDataType] = UNSET
|
|
37
33
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
38
34
|
|
|
39
35
|
@model_serializer(mode="wrap")
|