gr4vy 1.1.29__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.
Potentially problematic release.
This version of gr4vy might be problematic. Click here for more details.
- gr4vy/_version.py +3 -3
- gr4vy/account_updater.py +6 -3
- gr4vy/actions.py +307 -0
- gr4vy/all.py +4 -2
- gr4vy/audit_logs.py +6 -4
- gr4vy/balances.py +4 -2
- gr4vy/basesdk.py +17 -1
- gr4vy/buyers_gift_cards.py +4 -2
- gr4vy/buyers_payment_methods.py +4 -2
- gr4vy/buyers_sdk.py +43 -25
- gr4vy/buyers_shipping_details.py +26 -16
- gr4vy/card_scheme_definitions_sdk.py +4 -2
- gr4vy/checkout_sessions.py +40 -14
- gr4vy/digital_wallets_sdk.py +32 -20
- gr4vy/domains.py +14 -10
- gr4vy/errors/__init__.py +15 -3
- gr4vy/errors/apierror.py +2 -0
- gr4vy/errors/error400.py +4 -6
- gr4vy/errors/error401.py +4 -6
- gr4vy/errors/error403.py +4 -6
- gr4vy/errors/error404.py +4 -6
- gr4vy/errors/error405.py +4 -6
- gr4vy/errors/error409.py +4 -6
- gr4vy/errors/error425.py +4 -6
- gr4vy/errors/error429.py +4 -6
- gr4vy/errors/error500.py +4 -6
- gr4vy/errors/error502.py +4 -6
- gr4vy/errors/error504.py +4 -6
- gr4vy/errors/gr4vyerror.py +11 -7
- gr4vy/errors/httpvalidationerror.py +4 -2
- gr4vy/errors/no_response_error.py +5 -1
- gr4vy/errors/responsevalidationerror.py +2 -0
- gr4vy/events.py +54 -7
- gr4vy/executions.py +38 -8
- gr4vy/gift_cards_sdk.py +29 -19
- gr4vy/httpclient.py +0 -1
- gr4vy/jobs.py +4 -2
- gr4vy/merchant_accounts_sdk.py +30 -10
- gr4vy/models/__init__.py +184 -30
- gr4vy/models/adyenautorescuesepascenariosenum.py +3 -1
- gr4vy/models/adyencardoptions.py +9 -6
- gr4vy/models/adyensepaoptions.py +1 -6
- gr4vy/models/adyensplitsoptions.py +57 -0
- gr4vy/models/airline.py +9 -8
- gr4vy/models/airlineleg.py +9 -7
- gr4vy/models/airlinepassenger.py +9 -7
- gr4vy/models/antifrauddecision.py +9 -1
- gr4vy/models/approvaltarget.py +7 -1
- gr4vy/models/auditlogaction.py +9 -1
- 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 +33 -3
- gr4vy/models/browserinfo.py +9 -5
- gr4vy/models/buyer.py +3 -3
- gr4vy/models/buyercreate.py +3 -3
- gr4vy/models/buyerupdate.py +3 -3
- gr4vy/models/cancel_transactionop.py +43 -0
- gr4vy/models/cancelstatus.py +15 -0
- gr4vy/models/capturestatus.py +7 -1
- gr4vy/models/cardtype.py +8 -1
- gr4vy/models/cartitem.py +53 -8
- 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/create_report_execution_urlop.py +16 -1
- gr4vy/models/createsession.py +3 -3
- gr4vy/models/createsessionstatus.py +7 -1
- gr4vy/models/cvvresponsecode.py +7 -1
- gr4vy/models/cybersourceoptions.py +7 -0
- gr4vy/models/definitionfield.py +1 -6
- gr4vy/models/definitionfieldformat.py +8 -1
- gr4vy/models/digitalwallet.py +3 -5
- gr4vy/models/digitalwalletcreate.py +2 -6
- gr4vy/models/digitalwalletprovider.py +6 -1
- gr4vy/models/dlocalupioptions.py +50 -0
- gr4vy/models/dlocalupirecurringinfooptions.py +47 -0
- gr4vy/models/dlocalupiwalletoptions.py +89 -0
- gr4vy/models/errordetail.py +2 -4
- gr4vy/models/errorlocation.py +8 -1
- gr4vy/models/flow.py +16 -0
- gr4vy/models/flowaction.py +16 -0
- gr4vy/models/forterantifraudoptions.py +8 -8
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +10 -8
- gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +9 -7
- gr4vy/models/giftcardredemption.py +4 -8
- gr4vy/models/giftcardredemptionstatus.py +7 -1
- gr4vy/models/giftcardservice.py +3 -5
- gr4vy/models/giftcardserviceprovider.py +5 -1
- 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/internal/__init__.py +14 -1
- gr4vy/models/list_all_report_executionsop.py +2 -14
- gr4vy/models/list_audit_logsop.py +2 -10
- gr4vy/models/list_buyer_payment_methodsop.py +9 -4
- 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 +14 -22
- gr4vy/models/merchantaccount.py +9 -5
- gr4vy/models/merchantaccountcreate.py +8 -6
- gr4vy/models/merchantaccountupdate.py +8 -6
- gr4vy/models/merchantprofilescheme.py +7 -7
- gr4vy/models/merchantprofileschemesummary.py +7 -7
- gr4vy/models/method.py +4 -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 +11 -9
- gr4vy/models/networktokenstatus.py +7 -1
- gr4vy/models/nuveiidealoptions.py +49 -0
- gr4vy/models/nuveipseoptions.py +70 -0
- gr4vy/models/paymentlink.py +25 -7
- gr4vy/models/paymentlinkcreate.py +23 -28
- gr4vy/models/paymentlinkstatus.py +7 -1
- gr4vy/models/paymentmethod.py +7 -13
- gr4vy/models/paymentmethodcard.py +3 -5
- gr4vy/models/paymentmethoddetailscard.py +2 -6
- gr4vy/models/paymentmethodstatus.py +7 -1
- 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/paymentservicestatus.py +8 -1
- gr4vy/models/paymentservicetoken.py +3 -3
- gr4vy/models/payoutcategory.py +1 -1
- gr4vy/models/payoutcreate.py +5 -9
- gr4vy/models/payoutstatus.py +7 -1
- 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 +4 -6
- gr4vy/models/refund.py +4 -4
- gr4vy/models/refundstatus.py +8 -1
- gr4vy/models/refundtargettype.py +5 -1
- gr4vy/models/report.py +4 -6
- gr4vy/models/reportcreate.py +2 -3
- gr4vy/models/reportcreatortype.py +7 -1
- gr4vy/models/reportexecution.py +3 -3
- gr4vy/models/reportexecutionstatus.py +7 -1
- gr4vy/models/reportexecutionsummary.py +3 -3
- gr4vy/models/reportexecutionurlgenerate.py +16 -0
- gr4vy/models/reportschedule.py +9 -1
- gr4vy/models/reportspec.py +2 -4
- gr4vy/models/reportsummary.py +3 -5
- gr4vy/models/settlement.py +32 -32
- gr4vy/models/statementdescriptor.py +7 -0
- gr4vy/models/stripeconnectoptions.py +7 -0
- gr4vy/models/taxid.py +2 -4
- gr4vy/models/taxidkind.py +7 -0
- gr4vy/models/threedsecuredatav1.py +2 -6
- gr4vy/models/threedsecuredatav2.py +2 -6
- gr4vy/models/threedsecuremethod.py +7 -1
- gr4vy/models/threedsecurestatus.py +7 -1
- gr4vy/models/transaction.py +86 -25
- gr4vy/models/transactionaction.py +48 -0
- gr4vy/models/transactionactions.py +17 -0
- gr4vy/models/transactionbuyer.py +3 -3
- gr4vy/models/transactioncancel.py +81 -0
- gr4vy/models/transactioncapture.py +3 -3
- gr4vy/models/transactionconnectionoptions.py +50 -0
- gr4vy/models/transactioncreate.py +76 -12
- gr4vy/models/transactionevent.py +10 -3
- gr4vy/models/transactionintent.py +7 -1
- gr4vy/models/transactionintentoutcome.py +6 -1
- gr4vy/models/transactionpaymentmethod.py +6 -12
- gr4vy/models/transactionpaymentservice.py +3 -3
- gr4vy/models/transactionpaymentsource.py +7 -1
- gr4vy/models/transactionrefundcreate.py +2 -6
- gr4vy/models/transactionsummary.py +11 -10
- gr4vy/models/transactionthreedsecuresummary.py +3 -9
- gr4vy/models/transactionvoid.py +3 -3
- gr4vy/models/userstatus.py +8 -1
- gr4vy/models/voidstatus.py +7 -1
- gr4vy/network_tokens_cryptogram.py +4 -2
- gr4vy/payment_links_sdk.py +36 -16
- gr4vy/payment_methods_network_tokens.py +27 -13
- gr4vy/payment_methods_payment_service_tokens.py +12 -6
- gr4vy/payment_methods_sdk.py +26 -14
- gr4vy/payment_options_sdk.py +4 -2
- gr4vy/payment_service_definitions_sdk.py +14 -8
- gr4vy/payment_services_sdk.py +36 -22
- gr4vy/payouts.py +18 -12
- gr4vy/refunds_sdk.py +4 -2
- gr4vy/report_executions_sdk.py +6 -4
- gr4vy/reports_sdk.py +23 -13
- gr4vy/sdk.py +17 -4
- gr4vy/sessions.py +12 -6
- gr4vy/transactions.py +446 -33
- gr4vy/transactions_refunds.py +17 -9
- gr4vy/transactions_settlements.py +8 -4
- gr4vy/types/basemodel.py +41 -3
- gr4vy/utils/__init__.py +15 -6
- gr4vy/utils/annotations.py +32 -8
- gr4vy/utils/enums.py +60 -0
- gr4vy/utils/eventstreaming.py +10 -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.1.29.dist-info → gr4vy-1.10.9.dist-info}/METADATA +43 -41
- {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/RECORD +217 -196
- {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +1 -1
- gr4vy/models/billingdetails_output.py +0 -87
- gr4vy/models/guestbuyer_output.py +0 -80
|
@@ -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
|
)
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .reportexecutionurlgenerate import (
|
|
5
|
+
ReportExecutionURLGenerate,
|
|
6
|
+
ReportExecutionURLGenerateTypedDict,
|
|
7
|
+
)
|
|
4
8
|
from gr4vy.types import BaseModel
|
|
5
|
-
from gr4vy.utils import
|
|
9
|
+
from gr4vy.utils import (
|
|
10
|
+
FieldMetadata,
|
|
11
|
+
HeaderMetadata,
|
|
12
|
+
PathParamMetadata,
|
|
13
|
+
RequestMetadata,
|
|
14
|
+
)
|
|
6
15
|
import pydantic
|
|
7
16
|
from typing import Optional
|
|
8
17
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
@@ -29,6 +38,7 @@ class CreateReportExecutionURLRequestTypedDict(TypedDict):
|
|
|
29
38
|
r"""The ID of the execution of a report to retrieve a URL for."""
|
|
30
39
|
merchant_account_id: NotRequired[str]
|
|
31
40
|
r"""The ID of the merchant account to use for this request."""
|
|
41
|
+
report_execution_url_generate: NotRequired[ReportExecutionURLGenerateTypedDict]
|
|
32
42
|
|
|
33
43
|
|
|
34
44
|
class CreateReportExecutionURLRequest(BaseModel):
|
|
@@ -48,3 +58,8 @@ class CreateReportExecutionURLRequest(BaseModel):
|
|
|
48
58
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
49
59
|
] = None
|
|
50
60
|
r"""The ID of the merchant account to use for this request."""
|
|
61
|
+
|
|
62
|
+
report_execution_url_generate: Annotated[
|
|
63
|
+
Optional[ReportExecutionURLGenerate],
|
|
64
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
65
|
+
] = None
|
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[
|
gr4vy/models/cvvresponsecode.py
CHANGED
|
@@ -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."""
|
|
@@ -6,5 +6,12 @@ from typing import Literal, Union
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
DefinitionFieldFormat = Union[
|
|
9
|
-
Literal[
|
|
9
|
+
Literal[
|
|
10
|
+
"text",
|
|
11
|
+
"multiline",
|
|
12
|
+
"number",
|
|
13
|
+
"timezone",
|
|
14
|
+
"boolean",
|
|
15
|
+
],
|
|
16
|
+
UnrecognizedStr,
|
|
10
17
|
]
|
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
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .dlocalupiwalletoptions import (
|
|
5
|
+
DlocalUPIWalletOptions,
|
|
6
|
+
DlocalUPIWalletOptionsTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
9
|
+
from pydantic import model_serializer
|
|
10
|
+
from typing_extensions import NotRequired, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DlocalUPIOptionsTypedDict(TypedDict):
|
|
14
|
+
wallet: NotRequired[Nullable[DlocalUPIWalletOptionsTypedDict]]
|
|
15
|
+
r"""Passes `wallet` data to the dLocal API for those connectors that need it."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DlocalUPIOptions(BaseModel):
|
|
19
|
+
wallet: OptionalNullable[DlocalUPIWalletOptions] = UNSET
|
|
20
|
+
r"""Passes `wallet` data to the dLocal API for those connectors that need it."""
|
|
21
|
+
|
|
22
|
+
@model_serializer(mode="wrap")
|
|
23
|
+
def serialize_model(self, handler):
|
|
24
|
+
optional_fields = ["wallet"]
|
|
25
|
+
nullable_fields = ["wallet"]
|
|
26
|
+
null_default_fields = []
|
|
27
|
+
|
|
28
|
+
serialized = handler(self)
|
|
29
|
+
|
|
30
|
+
m = {}
|
|
31
|
+
|
|
32
|
+
for n, f in type(self).model_fields.items():
|
|
33
|
+
k = f.alias or n
|
|
34
|
+
val = serialized.get(k)
|
|
35
|
+
serialized.pop(k, None)
|
|
36
|
+
|
|
37
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
38
|
+
is_set = (
|
|
39
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
40
|
+
or k in null_default_fields
|
|
41
|
+
) # pylint: disable=no-member
|
|
42
|
+
|
|
43
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
44
|
+
m[k] = val
|
|
45
|
+
elif val != UNSET_SENTINEL and (
|
|
46
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
47
|
+
):
|
|
48
|
+
m[k] = val
|
|
49
|
+
|
|
50
|
+
return m
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from gr4vy.types import BaseModel, UnrecognizedStr
|
|
5
|
+
from typing import Literal, Union
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
SubscriptionFrequencyUnit = Union[
|
|
10
|
+
Literal[
|
|
11
|
+
"MONTH",
|
|
12
|
+
"WEEK",
|
|
13
|
+
"BI_MONTHLY",
|
|
14
|
+
"ONDEMAND",
|
|
15
|
+
"QUARTER",
|
|
16
|
+
"YEAR",
|
|
17
|
+
"SEMI_ANNUALLY",
|
|
18
|
+
"DAY",
|
|
19
|
+
],
|
|
20
|
+
UnrecognizedStr,
|
|
21
|
+
]
|
|
22
|
+
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DlocalUPIRecurringInfoOptionsTypedDict(TypedDict):
|
|
26
|
+
subscription_frequency_unit: SubscriptionFrequencyUnit
|
|
27
|
+
r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
|
|
28
|
+
subscription_frequency: int
|
|
29
|
+
r"""Indicates the frequency for the subscription."""
|
|
30
|
+
subscription_start_at: str
|
|
31
|
+
r"""Indicates the start date for the subscription in format `YYYYMMDD`."""
|
|
32
|
+
subscription_end_at: str
|
|
33
|
+
r"""Indicates the end date for the subscription in format `YYYYMMDD`."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class DlocalUPIRecurringInfoOptions(BaseModel):
|
|
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`."""
|
|
39
|
+
|
|
40
|
+
subscription_frequency: int
|
|
41
|
+
r"""Indicates the frequency for the subscription."""
|
|
42
|
+
|
|
43
|
+
subscription_start_at: str
|
|
44
|
+
r"""Indicates the start date for the subscription in format `YYYYMMDD`."""
|
|
45
|
+
|
|
46
|
+
subscription_end_at: str
|
|
47
|
+
r"""Indicates the end date for the subscription in format `YYYYMMDD`."""
|