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
gr4vy/models/transactionbuyer.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 gr4vy.utils import validate_const
|
|
7
7
|
import pydantic
|
|
@@ -20,7 +20,7 @@ class TransactionBuyerTypedDict(TypedDict):
|
|
|
20
20
|
r"""The display name for the buyer."""
|
|
21
21
|
external_identifier: NotRequired[Nullable[str]]
|
|
22
22
|
r"""The merchant identifier for this buyer."""
|
|
23
|
-
billing_details: NotRequired[Nullable[
|
|
23
|
+
billing_details: NotRequired[Nullable[BillingDetailsTypedDict]]
|
|
24
24
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
25
25
|
account_number: NotRequired[Nullable[str]]
|
|
26
26
|
r"""The buyer account number."""
|
|
@@ -42,7 +42,7 @@ class TransactionBuyer(BaseModel):
|
|
|
42
42
|
external_identifier: OptionalNullable[str] = UNSET
|
|
43
43
|
r"""The merchant identifier for this buyer."""
|
|
44
44
|
|
|
45
|
-
billing_details: OptionalNullable[
|
|
45
|
+
billing_details: OptionalNullable[BillingDetails] = UNSET
|
|
46
46
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
47
47
|
|
|
48
48
|
account_number: OptionalNullable[str] = UNSET
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .cancelstatus import CancelStatus
|
|
5
|
+
from .transaction import Transaction, TransactionTypedDict
|
|
6
|
+
from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
7
|
+
from gr4vy.utils import validate_const
|
|
8
|
+
import pydantic
|
|
9
|
+
from pydantic import model_serializer
|
|
10
|
+
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from typing import Literal, Optional
|
|
12
|
+
from typing_extensions import Annotated, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TransactionCancelTypedDict(TypedDict):
|
|
16
|
+
status: CancelStatus
|
|
17
|
+
code: Nullable[str]
|
|
18
|
+
r"""The standardized error code set by Gr4vy."""
|
|
19
|
+
raw_response_code: Nullable[str]
|
|
20
|
+
r"""This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services."""
|
|
21
|
+
raw_response_description: Nullable[str]
|
|
22
|
+
r"""This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services."""
|
|
23
|
+
transaction: TransactionTypedDict
|
|
24
|
+
r"""A full transaction resource."""
|
|
25
|
+
type: Literal["transaction-cancel"]
|
|
26
|
+
r"""Always `transaction-cancel`."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class TransactionCancel(BaseModel):
|
|
30
|
+
status: CancelStatus
|
|
31
|
+
|
|
32
|
+
code: Nullable[str]
|
|
33
|
+
r"""The standardized error code set by Gr4vy."""
|
|
34
|
+
|
|
35
|
+
raw_response_code: Nullable[str]
|
|
36
|
+
r"""This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services."""
|
|
37
|
+
|
|
38
|
+
raw_response_description: Nullable[str]
|
|
39
|
+
r"""This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services."""
|
|
40
|
+
|
|
41
|
+
transaction: Transaction
|
|
42
|
+
r"""A full transaction resource."""
|
|
43
|
+
|
|
44
|
+
TYPE: Annotated[
|
|
45
|
+
Annotated[
|
|
46
|
+
Optional[Literal["transaction-cancel"]],
|
|
47
|
+
AfterValidator(validate_const("transaction-cancel")),
|
|
48
|
+
],
|
|
49
|
+
pydantic.Field(alias="type"),
|
|
50
|
+
] = "transaction-cancel"
|
|
51
|
+
r"""Always `transaction-cancel`."""
|
|
52
|
+
|
|
53
|
+
@model_serializer(mode="wrap")
|
|
54
|
+
def serialize_model(self, handler):
|
|
55
|
+
optional_fields = ["type"]
|
|
56
|
+
nullable_fields = ["code", "raw_response_code", "raw_response_description"]
|
|
57
|
+
null_default_fields = []
|
|
58
|
+
|
|
59
|
+
serialized = handler(self)
|
|
60
|
+
|
|
61
|
+
m = {}
|
|
62
|
+
|
|
63
|
+
for n, f in type(self).model_fields.items():
|
|
64
|
+
k = f.alias or n
|
|
65
|
+
val = serialized.get(k)
|
|
66
|
+
serialized.pop(k, None)
|
|
67
|
+
|
|
68
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
69
|
+
is_set = (
|
|
70
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
71
|
+
or k in null_default_fields
|
|
72
|
+
) # pylint: disable=no-member
|
|
73
|
+
|
|
74
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
75
|
+
m[k] = val
|
|
76
|
+
elif val != UNSET_SENTINEL and (
|
|
77
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
78
|
+
):
|
|
79
|
+
m[k] = val
|
|
80
|
+
|
|
81
|
+
return m
|
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .capturestatus import CaptureStatus
|
|
5
5
|
from .transaction import Transaction, TransactionTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, 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 Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ class TransactionCaptureTypedDict(TypedDict):
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class TransactionCapture(BaseModel):
|
|
30
|
-
status:
|
|
30
|
+
status: CaptureStatus
|
|
31
31
|
|
|
32
32
|
code: Nullable[str]
|
|
33
33
|
r"""The standardized error code set by Gr4vy."""
|
|
@@ -7,12 +7,14 @@ from .adyenoptions import AdyenOptions, AdyenOptionsTypedDict
|
|
|
7
7
|
from .adyensepaoptions import AdyenSepaOptions, AdyenSepaOptionsTypedDict
|
|
8
8
|
from .affirmoptions import AffirmOptions, AffirmOptionsTypedDict
|
|
9
9
|
from .braintreeoptions import BraintreeOptions, BraintreeOptionsTypedDict
|
|
10
|
+
from .chaseoptions import ChaseOptions, ChaseOptionsTypedDict
|
|
10
11
|
from .cybersourceantifraudoptions import (
|
|
11
12
|
CybersourceAntiFraudOptions,
|
|
12
13
|
CybersourceAntiFraudOptionsTypedDict,
|
|
13
14
|
)
|
|
14
15
|
from .cybersourceoptions import CybersourceOptions, CybersourceOptionsTypedDict
|
|
15
16
|
from .dlocaloptions import DlocalOptions, DlocalOptionsTypedDict
|
|
17
|
+
from .dlocalupioptions import DlocalUPIOptions, DlocalUPIOptionsTypedDict
|
|
16
18
|
from .fiservoptions import FiservOptions, FiservOptionsTypedDict
|
|
17
19
|
from .forterantifraudoptions import (
|
|
18
20
|
ForterAntiFraudOptions,
|
|
@@ -22,7 +24,10 @@ from .givingblockoptions import GivingBlockOptions, GivingBlockOptionsTypedDict
|
|
|
22
24
|
from .latitudeoptions import LatitudeOptions, LatitudeOptionsTypedDict
|
|
23
25
|
from .mattildatapioptions import MattildaTapiOptions, MattildaTapiOptionsTypedDict
|
|
24
26
|
from .mockcardoptions import MockCardOptions, MockCardOptionsTypedDict
|
|
27
|
+
from .monatospeioptions import MonatoSpeiOptions, MonatoSpeiOptionsTypedDict
|
|
28
|
+
from .nuveiidealoptions import NuveiIDealOptions, NuveiIDealOptionsTypedDict
|
|
25
29
|
from .nuveioptions import NuveiOptions, NuveiOptionsTypedDict
|
|
30
|
+
from .nuveipseoptions import NuveiPSEOptions, NuveiPSEOptionsTypedDict
|
|
26
31
|
from .oxxooptions import OxxoOptions, OxxoOptionsTypedDict
|
|
27
32
|
from .paypaloptions import PaypalOptions, PaypalOptionsTypedDict
|
|
28
33
|
from .powertranzoptions import PowertranzOptions, PowertranzOptionsTypedDict
|
|
@@ -62,6 +67,8 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
|
|
|
62
67
|
r"""Custom options to be passed to the `affirm-affirm` connector."""
|
|
63
68
|
braintree_card: NotRequired[Nullable[BraintreeOptionsTypedDict]]
|
|
64
69
|
r"""Custom options to be passed to the `braintree-card` connector."""
|
|
70
|
+
chaseorbital_card: NotRequired[Nullable[ChaseOptionsTypedDict]]
|
|
71
|
+
r"""Custom options to be passed to the `chaseorbital-card` connector."""
|
|
65
72
|
cybersource_anti_fraud: NotRequired[Nullable[CybersourceAntiFraudOptionsTypedDict]]
|
|
66
73
|
r"""Custom options to be passed to the `cybersource-anti-fraud` connector."""
|
|
67
74
|
cybersource_card: NotRequired[Nullable[CybersourceOptionsTypedDict]]
|
|
@@ -72,6 +79,8 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
|
|
|
72
79
|
r"""Custom options to be passed to the `cybersource-kcp` connector."""
|
|
73
80
|
dlocal_nequi: NotRequired[Nullable[DlocalOptionsTypedDict]]
|
|
74
81
|
r"""Custom options to be passed to the `dlocal-nequi` connector."""
|
|
82
|
+
dlocal_upi: NotRequired[Nullable[DlocalUPIOptionsTypedDict]]
|
|
83
|
+
r"""Custom options to be passed to the `dlocal-upi` connector."""
|
|
75
84
|
fiserv_card: NotRequired[Nullable[FiservOptionsTypedDict]]
|
|
76
85
|
r"""Custom options to be passed to the `fiserv-card` connector."""
|
|
77
86
|
forter_anti_fraud: NotRequired[Nullable[ForterAntiFraudOptionsTypedDict]]
|
|
@@ -90,10 +99,16 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
|
|
|
90
99
|
r"""Custom options to be passed to the `mattilda-tapi` connector."""
|
|
91
100
|
mattilda_tapifintechs: NotRequired[Nullable[MattildaTapiOptionsTypedDict]]
|
|
92
101
|
r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
|
|
102
|
+
monato_spei: NotRequired[Nullable[MonatoSpeiOptionsTypedDict]]
|
|
103
|
+
r"""Custom options to be passed to the `monato-spei` connector."""
|
|
93
104
|
mock_card: NotRequired[Nullable[MockCardOptionsTypedDict]]
|
|
94
105
|
r"""Custom options to be passed to the `mock-card` connector."""
|
|
95
106
|
nuvei_card: NotRequired[Nullable[NuveiOptionsTypedDict]]
|
|
96
107
|
r"""Custom options to be passed to the `nuvei-card` connector."""
|
|
108
|
+
nuvei_ideal: NotRequired[Nullable[NuveiIDealOptionsTypedDict]]
|
|
109
|
+
r"""Custom options to be passed to the `nuvei-ideal` connector."""
|
|
110
|
+
nuvei_pse: NotRequired[Nullable[NuveiPSEOptionsTypedDict]]
|
|
111
|
+
r"""Custom options to be passed to the `nuvei-pse` connector."""
|
|
97
112
|
oxxo_oxxo: NotRequired[Nullable[OxxoOptionsTypedDict]]
|
|
98
113
|
r"""Custom options to be passed to the `oxxo-oxxo` connector."""
|
|
99
114
|
paypal_paypal: NotRequired[Nullable[PaypalOptionsTypedDict]]
|
|
@@ -175,6 +190,11 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
175
190
|
] = UNSET
|
|
176
191
|
r"""Custom options to be passed to the `braintree-card` connector."""
|
|
177
192
|
|
|
193
|
+
chaseorbital_card: Annotated[
|
|
194
|
+
OptionalNullable[ChaseOptions], pydantic.Field(alias="chaseorbital-card")
|
|
195
|
+
] = UNSET
|
|
196
|
+
r"""Custom options to be passed to the `chaseorbital-card` connector."""
|
|
197
|
+
|
|
178
198
|
cybersource_anti_fraud: Annotated[
|
|
179
199
|
OptionalNullable[CybersourceAntiFraudOptions],
|
|
180
200
|
pydantic.Field(alias="cybersource-anti-fraud"),
|
|
@@ -201,6 +221,11 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
201
221
|
] = UNSET
|
|
202
222
|
r"""Custom options to be passed to the `dlocal-nequi` connector."""
|
|
203
223
|
|
|
224
|
+
dlocal_upi: Annotated[
|
|
225
|
+
OptionalNullable[DlocalUPIOptions], pydantic.Field(alias="dlocal-upi")
|
|
226
|
+
] = UNSET
|
|
227
|
+
r"""Custom options to be passed to the `dlocal-upi` connector."""
|
|
228
|
+
|
|
204
229
|
fiserv_card: Annotated[
|
|
205
230
|
OptionalNullable[FiservOptions], pydantic.Field(alias="fiserv-card")
|
|
206
231
|
] = UNSET
|
|
@@ -249,6 +274,11 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
249
274
|
] = UNSET
|
|
250
275
|
r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
|
|
251
276
|
|
|
277
|
+
monato_spei: Annotated[
|
|
278
|
+
OptionalNullable[MonatoSpeiOptions], pydantic.Field(alias="monato-spei")
|
|
279
|
+
] = UNSET
|
|
280
|
+
r"""Custom options to be passed to the `monato-spei` connector."""
|
|
281
|
+
|
|
252
282
|
mock_card: Annotated[
|
|
253
283
|
OptionalNullable[MockCardOptions], pydantic.Field(alias="mock-card")
|
|
254
284
|
] = UNSET
|
|
@@ -259,6 +289,16 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
259
289
|
] = UNSET
|
|
260
290
|
r"""Custom options to be passed to the `nuvei-card` connector."""
|
|
261
291
|
|
|
292
|
+
nuvei_ideal: Annotated[
|
|
293
|
+
OptionalNullable[NuveiIDealOptions], pydantic.Field(alias="nuvei-ideal")
|
|
294
|
+
] = UNSET
|
|
295
|
+
r"""Custom options to be passed to the `nuvei-ideal` connector."""
|
|
296
|
+
|
|
297
|
+
nuvei_pse: Annotated[
|
|
298
|
+
OptionalNullable[NuveiPSEOptions], pydantic.Field(alias="nuvei-pse")
|
|
299
|
+
] = UNSET
|
|
300
|
+
r"""Custom options to be passed to the `nuvei-pse` connector."""
|
|
301
|
+
|
|
262
302
|
oxxo_oxxo: Annotated[
|
|
263
303
|
OptionalNullable[OxxoOptions], pydantic.Field(alias="oxxo-oxxo")
|
|
264
304
|
] = UNSET
|
|
@@ -320,11 +360,13 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
320
360
|
"adyen-vipps",
|
|
321
361
|
"affirm-affirm",
|
|
322
362
|
"braintree-card",
|
|
363
|
+
"chaseorbital-card",
|
|
323
364
|
"cybersource-anti-fraud",
|
|
324
365
|
"cybersource-card",
|
|
325
366
|
"cybersource-ideal",
|
|
326
367
|
"cybersource-kcp",
|
|
327
368
|
"dlocal-nequi",
|
|
369
|
+
"dlocal-upi",
|
|
328
370
|
"fiserv-card",
|
|
329
371
|
"forter-anti-fraud",
|
|
330
372
|
"gem-gem",
|
|
@@ -334,8 +376,11 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
334
376
|
"latitude-latitudeds",
|
|
335
377
|
"mattilda-tapi",
|
|
336
378
|
"mattilda-tapifintechs",
|
|
379
|
+
"monato-spei",
|
|
337
380
|
"mock-card",
|
|
338
381
|
"nuvei-card",
|
|
382
|
+
"nuvei-ideal",
|
|
383
|
+
"nuvei-pse",
|
|
339
384
|
"oxxo-oxxo",
|
|
340
385
|
"paypal-paypal",
|
|
341
386
|
"paypal-paypalpaylater",
|
|
@@ -359,11 +404,13 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
359
404
|
"adyen-vipps",
|
|
360
405
|
"affirm-affirm",
|
|
361
406
|
"braintree-card",
|
|
407
|
+
"chaseorbital-card",
|
|
362
408
|
"cybersource-anti-fraud",
|
|
363
409
|
"cybersource-card",
|
|
364
410
|
"cybersource-ideal",
|
|
365
411
|
"cybersource-kcp",
|
|
366
412
|
"dlocal-nequi",
|
|
413
|
+
"dlocal-upi",
|
|
367
414
|
"fiserv-card",
|
|
368
415
|
"forter-anti-fraud",
|
|
369
416
|
"gem-gem",
|
|
@@ -373,8 +420,11 @@ class TransactionConnectionOptions(BaseModel):
|
|
|
373
420
|
"latitude-latitudeds",
|
|
374
421
|
"mattilda-tapi",
|
|
375
422
|
"mattilda-tapifintechs",
|
|
423
|
+
"monato-spei",
|
|
376
424
|
"mock-card",
|
|
377
425
|
"nuvei-card",
|
|
426
|
+
"nuvei-ideal",
|
|
427
|
+
"nuvei-pse",
|
|
378
428
|
"oxxo-oxxo",
|
|
379
429
|
"paypal-paypal",
|
|
380
430
|
"paypal-paypalpaylater",
|
|
@@ -40,11 +40,16 @@ from .googlepaypaymentmethodcreate import (
|
|
|
40
40
|
GooglePayPaymentMethodCreate,
|
|
41
41
|
GooglePayPaymentMethodCreateTypedDict,
|
|
42
42
|
)
|
|
43
|
-
from .
|
|
43
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
44
|
+
from .integrationclient import IntegrationClient
|
|
44
45
|
from .networktokenpaymentmethodcreate import (
|
|
45
46
|
NetworkTokenPaymentMethodCreate,
|
|
46
47
|
NetworkTokenPaymentMethodCreateTypedDict,
|
|
47
48
|
)
|
|
49
|
+
from .plaidpaymentmethodcreate import (
|
|
50
|
+
PlaidPaymentMethodCreate,
|
|
51
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
52
|
+
)
|
|
48
53
|
from .recipient import Recipient, RecipientTypedDict
|
|
49
54
|
from .redirectpaymentmethodcreate import (
|
|
50
55
|
RedirectPaymentMethodCreate,
|
|
@@ -64,11 +69,9 @@ from .transactionconnectionoptions import (
|
|
|
64
69
|
from .transactionintent import TransactionIntent
|
|
65
70
|
from .transactionpaymentsource import TransactionPaymentSource
|
|
66
71
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
67
|
-
from gr4vy.utils import validate_open_enum
|
|
68
72
|
from pydantic import model_serializer
|
|
69
|
-
from pydantic.functional_validators import PlainValidator
|
|
70
73
|
from typing import Dict, List, Optional, Union
|
|
71
|
-
from typing_extensions import
|
|
74
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
72
75
|
|
|
73
76
|
|
|
74
77
|
TransactionCreatePaymentMethodTypedDict = TypeAliasType(
|
|
@@ -77,6 +80,7 @@ TransactionCreatePaymentMethodTypedDict = TypeAliasType(
|
|
|
77
80
|
TokenPaymentMethodCreateTypedDict,
|
|
78
81
|
CheckoutSessionWithURLPaymentMethodCreateTypedDict,
|
|
79
82
|
RedirectPaymentMethodCreateTypedDict,
|
|
83
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
80
84
|
ClickToPayPaymentMethodCreateTypedDict,
|
|
81
85
|
CardWithURLPaymentMethodCreateTypedDict,
|
|
82
86
|
ApplePayPaymentMethodCreateTypedDict,
|
|
@@ -95,6 +99,7 @@ TransactionCreatePaymentMethod = TypeAliasType(
|
|
|
95
99
|
TokenPaymentMethodCreate,
|
|
96
100
|
CheckoutSessionWithURLPaymentMethodCreate,
|
|
97
101
|
RedirectPaymentMethodCreate,
|
|
102
|
+
PlaidPaymentMethodCreate,
|
|
98
103
|
ClickToPayPaymentMethodCreate,
|
|
99
104
|
CardWithURLPaymentMethodCreate,
|
|
100
105
|
ApplePayPaymentMethodCreate,
|
|
@@ -140,7 +145,7 @@ class TransactionCreateTypedDict(TypedDict):
|
|
|
140
145
|
r"""The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly."""
|
|
141
146
|
payment_method: NotRequired[Nullable[TransactionCreatePaymentMethodTypedDict]]
|
|
142
147
|
r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
|
|
143
|
-
buyer: NotRequired[Nullable[
|
|
148
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
144
149
|
r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
|
|
145
150
|
buyer_id: NotRequired[Nullable[str]]
|
|
146
151
|
r"""The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field."""
|
|
@@ -212,6 +217,24 @@ class TransactionCreateTypedDict(TypedDict):
|
|
|
212
217
|
r"""The recipient of any account to account funding. For use with AFTs."""
|
|
213
218
|
installment_count: NotRequired[Nullable[int]]
|
|
214
219
|
r"""The number of installments a buyer is required to make."""
|
|
220
|
+
tax_amount: NotRequired[Nullable[int]]
|
|
221
|
+
r"""The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`"""
|
|
222
|
+
merchant_tax_id: NotRequired[Nullable[str]]
|
|
223
|
+
r"""Merchant tax ID (for example, EIN or VAT number)."""
|
|
224
|
+
purchase_order_number: NotRequired[Nullable[str]]
|
|
225
|
+
r"""Invoice number or Purchase Order number."""
|
|
226
|
+
customer_reference_number: NotRequired[Nullable[str]]
|
|
227
|
+
r"""Customer code or reference."""
|
|
228
|
+
amount_includes_tax: NotRequired[Nullable[bool]]
|
|
229
|
+
r"""Whether the tax is included in the amount."""
|
|
230
|
+
supplier_order_number: NotRequired[Nullable[str]]
|
|
231
|
+
r"""The merchant's unique identifier for the sales order or invoice."""
|
|
232
|
+
duty_amount: NotRequired[Nullable[int]]
|
|
233
|
+
r"""Total charges for import/export duties."""
|
|
234
|
+
shipping_amount: NotRequired[Nullable[int]]
|
|
235
|
+
r"""Total shipping amount."""
|
|
236
|
+
integration_client: NotRequired[Nullable[IntegrationClient]]
|
|
237
|
+
r"""Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance."""
|
|
215
238
|
|
|
216
239
|
|
|
217
240
|
class TransactionCreate(BaseModel):
|
|
@@ -227,7 +250,7 @@ class TransactionCreate(BaseModel):
|
|
|
227
250
|
payment_method: OptionalNullable[TransactionCreatePaymentMethod] = UNSET
|
|
228
251
|
r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
|
|
229
252
|
|
|
230
|
-
buyer: OptionalNullable[
|
|
253
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
231
254
|
r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
|
|
232
255
|
|
|
233
256
|
buyer_id: OptionalNullable[str] = UNSET
|
|
@@ -242,9 +265,7 @@ class TransactionCreate(BaseModel):
|
|
|
242
265
|
external_identifier: OptionalNullable[str] = UNSET
|
|
243
266
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
244
267
|
|
|
245
|
-
intent:
|
|
246
|
-
Optional[TransactionIntent], PlainValidator(validate_open_enum(False))
|
|
247
|
-
] = None
|
|
268
|
+
intent: Optional[TransactionIntent] = None
|
|
248
269
|
|
|
249
270
|
store: Optional[bool] = False
|
|
250
271
|
r"""Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:
|
|
@@ -276,9 +297,7 @@ class TransactionCreate(BaseModel):
|
|
|
276
297
|
merchant_initiated: Optional[bool] = False
|
|
277
298
|
r"""Indicates whether the transaction was initiated by the merchant (true) or customer (false)."""
|
|
278
299
|
|
|
279
|
-
payment_source:
|
|
280
|
-
Optional[TransactionPaymentSource], PlainValidator(validate_open_enum(False))
|
|
281
|
-
] = None
|
|
300
|
+
payment_source: Optional[TransactionPaymentSource] = None
|
|
282
301
|
r"""The way payment method information made it to this transaction."""
|
|
283
302
|
|
|
284
303
|
airline: OptionalNullable[Airline] = UNSET
|
|
@@ -329,6 +348,33 @@ class TransactionCreate(BaseModel):
|
|
|
329
348
|
installment_count: OptionalNullable[int] = UNSET
|
|
330
349
|
r"""The number of installments a buyer is required to make."""
|
|
331
350
|
|
|
351
|
+
tax_amount: OptionalNullable[int] = UNSET
|
|
352
|
+
r"""The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`"""
|
|
353
|
+
|
|
354
|
+
merchant_tax_id: OptionalNullable[str] = UNSET
|
|
355
|
+
r"""Merchant tax ID (for example, EIN or VAT number)."""
|
|
356
|
+
|
|
357
|
+
purchase_order_number: OptionalNullable[str] = UNSET
|
|
358
|
+
r"""Invoice number or Purchase Order number."""
|
|
359
|
+
|
|
360
|
+
customer_reference_number: OptionalNullable[str] = UNSET
|
|
361
|
+
r"""Customer code or reference."""
|
|
362
|
+
|
|
363
|
+
amount_includes_tax: OptionalNullable[bool] = UNSET
|
|
364
|
+
r"""Whether the tax is included in the amount."""
|
|
365
|
+
|
|
366
|
+
supplier_order_number: OptionalNullable[str] = UNSET
|
|
367
|
+
r"""The merchant's unique identifier for the sales order or invoice."""
|
|
368
|
+
|
|
369
|
+
duty_amount: OptionalNullable[int] = UNSET
|
|
370
|
+
r"""Total charges for import/export duties."""
|
|
371
|
+
|
|
372
|
+
shipping_amount: OptionalNullable[int] = UNSET
|
|
373
|
+
r"""Total shipping amount."""
|
|
374
|
+
|
|
375
|
+
integration_client: OptionalNullable[IntegrationClient] = UNSET
|
|
376
|
+
r"""Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance."""
|
|
377
|
+
|
|
332
378
|
@model_serializer(mode="wrap")
|
|
333
379
|
def serialize_model(self, handler):
|
|
334
380
|
optional_fields = [
|
|
@@ -360,6 +406,15 @@ class TransactionCreate(BaseModel):
|
|
|
360
406
|
"allow_partial_authorization",
|
|
361
407
|
"recipient",
|
|
362
408
|
"installment_count",
|
|
409
|
+
"tax_amount",
|
|
410
|
+
"merchant_tax_id",
|
|
411
|
+
"purchase_order_number",
|
|
412
|
+
"customer_reference_number",
|
|
413
|
+
"amount_includes_tax",
|
|
414
|
+
"supplier_order_number",
|
|
415
|
+
"duty_amount",
|
|
416
|
+
"shipping_amount",
|
|
417
|
+
"integration_client",
|
|
363
418
|
]
|
|
364
419
|
nullable_fields = [
|
|
365
420
|
"country",
|
|
@@ -382,6 +437,15 @@ class TransactionCreate(BaseModel):
|
|
|
382
437
|
"payment_service_id",
|
|
383
438
|
"recipient",
|
|
384
439
|
"installment_count",
|
|
440
|
+
"tax_amount",
|
|
441
|
+
"merchant_tax_id",
|
|
442
|
+
"purchase_order_number",
|
|
443
|
+
"customer_reference_number",
|
|
444
|
+
"amount_includes_tax",
|
|
445
|
+
"supplier_order_number",
|
|
446
|
+
"duty_amount",
|
|
447
|
+
"shipping_amount",
|
|
448
|
+
"integration_client",
|
|
385
449
|
]
|
|
386
450
|
null_default_fields = []
|
|
387
451
|
|
gr4vy/models/transactionevent.py
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from gr4vy.types import BaseModel, UnrecognizedStr
|
|
6
|
-
from gr4vy.utils import validate_const
|
|
6
|
+
from gr4vy.utils import validate_const
|
|
7
7
|
import pydantic
|
|
8
|
-
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Any, Dict, Literal, Optional, Union
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
@@ -43,11 +43,17 @@ Name = Union[
|
|
|
43
43
|
"payment-connector-response-transaction-declined",
|
|
44
44
|
"payment-connector-response-transaction-capture-failed",
|
|
45
45
|
"payment-connector-response-transaction-capture-declined",
|
|
46
|
+
"payment-connector-response-transaction-cancel-succeeded",
|
|
47
|
+
"payment-connector-response-transaction-cancel-pending",
|
|
48
|
+
"payment-connector-response-transaction-cancel-failed",
|
|
46
49
|
"payment-connector-response-transaction-void-succeeded",
|
|
47
50
|
"payment-connector-response-transaction-void-declined",
|
|
48
51
|
"payment-connector-response-transaction-void-failed",
|
|
49
52
|
"payment-connector-external-transaction-request",
|
|
50
53
|
"payment-connector-report-transaction-settled",
|
|
54
|
+
"payment-connector-report-chargeback-posted",
|
|
55
|
+
"payment-connector-report-chargeback-reversal-posted",
|
|
56
|
+
"payment-connector-transaction-webhook-processed",
|
|
51
57
|
"digital-wallet-apple-pay-token-decrypted",
|
|
52
58
|
"digital-wallet-google-pay-token-decrypted",
|
|
53
59
|
"digital-wallet-click-to-pay-token-decrypted",
|
|
@@ -57,6 +63,7 @@ Name = Union[
|
|
|
57
63
|
"network-token-cryptogram-provision-failed",
|
|
58
64
|
"the-giving-block-transaction-conversion-succeeded",
|
|
59
65
|
"real-time-account-update",
|
|
66
|
+
"plaid-request-event",
|
|
60
67
|
],
|
|
61
68
|
UnrecognizedStr,
|
|
62
69
|
]
|
|
@@ -79,7 +86,7 @@ class TransactionEvent(BaseModel):
|
|
|
79
86
|
id: str
|
|
80
87
|
r"""The ID for the event."""
|
|
81
88
|
|
|
82
|
-
name:
|
|
89
|
+
name: Name
|
|
83
90
|
r"""The specific event name."""
|
|
84
91
|
|
|
85
92
|
created_at: datetime
|
|
@@ -11,10 +11,10 @@ from .paymentmethoddetailscard import (
|
|
|
11
11
|
)
|
|
12
12
|
from datetime import datetime
|
|
13
13
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
14
|
-
from gr4vy.utils import validate_const
|
|
14
|
+
from gr4vy.utils import validate_const
|
|
15
15
|
import pydantic
|
|
16
16
|
from pydantic import model_serializer
|
|
17
|
-
from pydantic.functional_validators import AfterValidator
|
|
17
|
+
from pydantic.functional_validators import AfterValidator
|
|
18
18
|
from typing import Literal, Optional
|
|
19
19
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
20
20
|
|
|
@@ -54,7 +54,7 @@ class TransactionPaymentMethodTypedDict(TypedDict):
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
class TransactionPaymentMethod(BaseModel):
|
|
57
|
-
method:
|
|
57
|
+
method: Method
|
|
58
58
|
|
|
59
59
|
TYPE: Annotated[
|
|
60
60
|
Annotated[
|
|
@@ -89,22 +89,16 @@ class TransactionPaymentMethod(BaseModel):
|
|
|
89
89
|
last_replaced_at: OptionalNullable[datetime] = UNSET
|
|
90
90
|
r"""The date and time when this card was last replaced by the account updater."""
|
|
91
91
|
|
|
92
|
-
mode:
|
|
93
|
-
OptionalNullable[Mode], PlainValidator(validate_open_enum(False))
|
|
94
|
-
] = UNSET
|
|
92
|
+
mode: OptionalNullable[Mode] = UNSET
|
|
95
93
|
r"""The mode to use with this payment method."""
|
|
96
94
|
|
|
97
|
-
scheme:
|
|
98
|
-
OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
|
|
99
|
-
] = UNSET
|
|
95
|
+
scheme: OptionalNullable[CardScheme] = UNSET
|
|
100
96
|
r"""The scheme of the card. Only applies to card payments."""
|
|
101
97
|
|
|
102
98
|
id: OptionalNullable[str] = UNSET
|
|
103
99
|
r"""The ID of the payment method."""
|
|
104
100
|
|
|
105
|
-
approval_target:
|
|
106
|
-
OptionalNullable[ApprovalTarget], PlainValidator(validate_open_enum(False))
|
|
107
|
-
] = UNSET
|
|
101
|
+
approval_target: OptionalNullable[ApprovalTarget] = UNSET
|
|
108
102
|
r"""The browser target that an approval URL must be opened in. If any or null, then there is no specific requirement."""
|
|
109
103
|
|
|
110
104
|
external_identifier: OptionalNullable[str] = UNSET
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .method import Method
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
|
-
from gr4vy.utils import validate_const
|
|
6
|
+
from gr4vy.utils import validate_const
|
|
7
7
|
import pydantic
|
|
8
|
-
from pydantic.functional_validators import AfterValidator
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional
|
|
10
10
|
from typing_extensions import Annotated, TypedDict
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ class TransactionPaymentService(BaseModel):
|
|
|
29
29
|
payment_service_definition_id: str
|
|
30
30
|
r"""The definition ID of the service used to process this payment."""
|
|
31
31
|
|
|
32
|
-
method:
|
|
32
|
+
method: Method
|
|
33
33
|
|
|
34
34
|
display_name: str
|
|
35
35
|
r"""The display name for the payment service."""
|
|
@@ -6,7 +6,13 @@ from typing import Literal, Union
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
TransactionPaymentSource = Union[
|
|
9
|
-
Literal[
|
|
9
|
+
Literal[
|
|
10
|
+
"ecommerce",
|
|
11
|
+
"moto",
|
|
12
|
+
"recurring",
|
|
13
|
+
"installment",
|
|
14
|
+
"card_on_file",
|
|
15
|
+
],
|
|
10
16
|
UnrecognizedStr,
|
|
11
17
|
]
|
|
12
18
|
r"""The way payment method information made it to this transaction."""
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .refundtargettype import RefundTargetType
|
|
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 Optional
|
|
10
|
-
from typing_extensions import
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class TransactionRefundCreateTypedDict(TypedDict):
|
|
@@ -26,9 +24,7 @@ class TransactionRefundCreate(BaseModel):
|
|
|
26
24
|
amount: OptionalNullable[int] = UNSET
|
|
27
25
|
r"""The amount to refund, in the smallest currency unit (e.g., cents). If omitted, a full refund will be requested."""
|
|
28
26
|
|
|
29
|
-
target_type:
|
|
30
|
-
Optional[RefundTargetType], PlainValidator(validate_open_enum(False))
|
|
31
|
-
] = None
|
|
27
|
+
target_type: Optional[RefundTargetType] = None
|
|
32
28
|
|
|
33
29
|
target_id: OptionalNullable[str] = UNSET
|
|
34
30
|
r"""The optional ID of the instrument to refund for. This is only required when the `target_type` is set to `gift-card-redemption`."""
|