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.
- 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,89 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .dlocalupirecurringinfooptions import (
|
|
5
|
+
DlocalUPIRecurringInfoOptions,
|
|
6
|
+
DlocalUPIRecurringInfoOptionsTypedDict,
|
|
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 DlocalUPIWalletOptionsTypedDict(TypedDict):
|
|
14
|
+
name: NotRequired[Nullable[str]]
|
|
15
|
+
r"""Passes `wallet.name` to the dLocal API for those connectors that need it."""
|
|
16
|
+
email: NotRequired[Nullable[str]]
|
|
17
|
+
r"""Passes `wallet.email` to the dLocal API for those connectors that need it."""
|
|
18
|
+
token: NotRequired[Nullable[str]]
|
|
19
|
+
r"""Passes `wallet.token` to the dLocal API for those connectors that need it."""
|
|
20
|
+
username: NotRequired[Nullable[str]]
|
|
21
|
+
r"""Passes `wallet.username` to the dLocal API for those connectors that need it."""
|
|
22
|
+
verify: NotRequired[Nullable[bool]]
|
|
23
|
+
r"""Passes `wallet.verify` to the dLocal API for those connectors that need it."""
|
|
24
|
+
recurring_info: NotRequired[Nullable[DlocalUPIRecurringInfoOptionsTypedDict]]
|
|
25
|
+
r"""Passes `wallet.recurring_info` to the dLocal API for those connectors that need it."""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DlocalUPIWalletOptions(BaseModel):
|
|
29
|
+
name: OptionalNullable[str] = UNSET
|
|
30
|
+
r"""Passes `wallet.name` to the dLocal API for those connectors that need it."""
|
|
31
|
+
|
|
32
|
+
email: OptionalNullable[str] = UNSET
|
|
33
|
+
r"""Passes `wallet.email` to the dLocal API for those connectors that need it."""
|
|
34
|
+
|
|
35
|
+
token: OptionalNullable[str] = UNSET
|
|
36
|
+
r"""Passes `wallet.token` to the dLocal API for those connectors that need it."""
|
|
37
|
+
|
|
38
|
+
username: OptionalNullable[str] = UNSET
|
|
39
|
+
r"""Passes `wallet.username` to the dLocal API for those connectors that need it."""
|
|
40
|
+
|
|
41
|
+
verify: OptionalNullable[bool] = UNSET
|
|
42
|
+
r"""Passes `wallet.verify` to the dLocal API for those connectors that need it."""
|
|
43
|
+
|
|
44
|
+
recurring_info: OptionalNullable[DlocalUPIRecurringInfoOptions] = UNSET
|
|
45
|
+
r"""Passes `wallet.recurring_info` to the dLocal API for those connectors that need it."""
|
|
46
|
+
|
|
47
|
+
@model_serializer(mode="wrap")
|
|
48
|
+
def serialize_model(self, handler):
|
|
49
|
+
optional_fields = [
|
|
50
|
+
"name",
|
|
51
|
+
"email",
|
|
52
|
+
"token",
|
|
53
|
+
"username",
|
|
54
|
+
"verify",
|
|
55
|
+
"recurring_info",
|
|
56
|
+
]
|
|
57
|
+
nullable_fields = [
|
|
58
|
+
"name",
|
|
59
|
+
"email",
|
|
60
|
+
"token",
|
|
61
|
+
"username",
|
|
62
|
+
"verify",
|
|
63
|
+
"recurring_info",
|
|
64
|
+
]
|
|
65
|
+
null_default_fields = []
|
|
66
|
+
|
|
67
|
+
serialized = handler(self)
|
|
68
|
+
|
|
69
|
+
m = {}
|
|
70
|
+
|
|
71
|
+
for n, f in type(self).model_fields.items():
|
|
72
|
+
k = f.alias or n
|
|
73
|
+
val = serialized.get(k)
|
|
74
|
+
serialized.pop(k, None)
|
|
75
|
+
|
|
76
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
77
|
+
is_set = (
|
|
78
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
79
|
+
or k in null_default_fields
|
|
80
|
+
) # pylint: disable=no-member
|
|
81
|
+
|
|
82
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
83
|
+
m[k] = val
|
|
84
|
+
elif val != UNSET_SENTINEL and (
|
|
85
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
86
|
+
):
|
|
87
|
+
m[k] = val
|
|
88
|
+
|
|
89
|
+
return m
|
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/errorlocation.py
CHANGED
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,15 +17,18 @@ 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[
|
|
28
|
-
Literal[
|
|
26
|
+
Literal[
|
|
27
|
+
"DIGITAL",
|
|
28
|
+
"PHYSICAL",
|
|
29
|
+
"HYBRID",
|
|
30
|
+
],
|
|
31
|
+
UnrecognizedStr,
|
|
29
32
|
]
|
|
30
33
|
|
|
31
34
|
|
|
@@ -43,10 +46,7 @@ class ForterAntiFraudOptionsTypedDict(TypedDict):
|
|
|
43
46
|
|
|
44
47
|
|
|
45
48
|
class ForterAntiFraudOptions(BaseModel):
|
|
46
|
-
delivery_type:
|
|
47
|
-
OptionalNullable[ForterAntiFraudOptionsDeliveryType],
|
|
48
|
-
PlainValidator(validate_open_enum(False)),
|
|
49
|
-
] = UNSET
|
|
49
|
+
delivery_type: OptionalNullable[ForterAntiFraudOptionsDeliveryType] = UNSET
|
|
50
50
|
r"""The delivery type"""
|
|
51
51
|
|
|
52
52
|
delivery_method: OptionalNullable[str] = UNSET
|
|
@@ -9,25 +9,27 @@ 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[
|
|
18
|
+
Literal[
|
|
19
|
+
"TANGIBLE",
|
|
20
|
+
"NON_TANGIBLE",
|
|
21
|
+
],
|
|
22
|
+
UnrecognizedStr,
|
|
23
|
+
]
|
|
20
24
|
|
|
21
25
|
|
|
22
26
|
class ForterAntiFraudOptionsCartItemBasicItemDataTypedDict(TypedDict):
|
|
23
|
-
type: NotRequired[Nullable[
|
|
27
|
+
type: NotRequired[Nullable[ForterAntiFraudOptionsCartItemBasicItemDataType]]
|
|
24
28
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
class ForterAntiFraudOptionsCartItemBasicItemData(BaseModel):
|
|
28
|
-
type:
|
|
29
|
-
OptionalNullable[Type], PlainValidator(validate_open_enum(False))
|
|
30
|
-
] = UNSET
|
|
32
|
+
type: OptionalNullable[ForterAntiFraudOptionsCartItemBasicItemDataType] = UNSET
|
|
31
33
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
32
34
|
|
|
33
35
|
@model_serializer(mode="wrap")
|
|
@@ -9,15 +9,18 @@ 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
|
ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType = Union[
|
|
20
|
-
Literal[
|
|
18
|
+
Literal[
|
|
19
|
+
"DIGITAL",
|
|
20
|
+
"PHYSICAL",
|
|
21
|
+
"HYBRID",
|
|
22
|
+
],
|
|
23
|
+
UnrecognizedStr,
|
|
21
24
|
]
|
|
22
25
|
|
|
23
26
|
|
|
@@ -31,9 +34,8 @@ class ForterAntiFraudOptionsCartItemDeliveryDetailsTypedDict(TypedDict):
|
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
class ForterAntiFraudOptionsCartItemDeliveryDetails(BaseModel):
|
|
34
|
-
delivery_type:
|
|
35
|
-
|
|
36
|
-
PlainValidator(validate_open_enum(False)),
|
|
37
|
+
delivery_type: OptionalNullable[
|
|
38
|
+
ForterAntiFraudOptionsCartItemDeliveryDetailsDeliveryType
|
|
37
39
|
] = UNSET
|
|
38
40
|
r"""The type of delivery for this cart item."""
|
|
39
41
|
|
|
@@ -5,10 +5,10 @@ from .giftcarderrorcode import GiftCardErrorCode
|
|
|
5
5
|
from .giftcardredemptionstatus import GiftCardRedemptionStatus
|
|
6
6
|
from .transactiongiftcard import TransactionGiftCard, TransactionGiftCardTypedDict
|
|
7
7
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
8
|
-
from gr4vy.utils import validate_const
|
|
8
|
+
from gr4vy.utils import validate_const
|
|
9
9
|
import pydantic
|
|
10
10
|
from pydantic import model_serializer
|
|
11
|
-
from pydantic.functional_validators import AfterValidator
|
|
11
|
+
from pydantic.functional_validators import AfterValidator
|
|
12
12
|
from typing import Literal, Optional
|
|
13
13
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
14
14
|
|
|
@@ -38,9 +38,7 @@ class GiftCardRedemption(BaseModel):
|
|
|
38
38
|
id: str
|
|
39
39
|
r"""The ID for the gift card redemption."""
|
|
40
40
|
|
|
41
|
-
status:
|
|
42
|
-
GiftCardRedemptionStatus, PlainValidator(validate_open_enum(False))
|
|
43
|
-
]
|
|
41
|
+
status: GiftCardRedemptionStatus
|
|
44
42
|
|
|
45
43
|
amount: int
|
|
46
44
|
r"""The amount redeemed for this gift card."""
|
|
@@ -62,9 +60,7 @@ class GiftCardRedemption(BaseModel):
|
|
|
62
60
|
gift_card_service_redemption_id: OptionalNullable[str] = UNSET
|
|
63
61
|
r"""The gift card service's unique ID for the redemption."""
|
|
64
62
|
|
|
65
|
-
error_code:
|
|
66
|
-
OptionalNullable[GiftCardErrorCode], PlainValidator(validate_open_enum(False))
|
|
67
|
-
] = UNSET
|
|
63
|
+
error_code: OptionalNullable[GiftCardErrorCode] = UNSET
|
|
68
64
|
r"""If this gift card redemption resulted in an error, this will contain the internal code for the error."""
|
|
69
65
|
|
|
70
66
|
raw_error_code: OptionalNullable[str] = UNSET
|
gr4vy/models/giftcardservice.py
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .giftcardserviceprovider import GiftCardServiceProvider
|
|
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
|
|
|
@@ -24,9 +24,7 @@ class GiftCardService(BaseModel):
|
|
|
24
24
|
id: str
|
|
25
25
|
r"""The ID for the gift card service."""
|
|
26
26
|
|
|
27
|
-
gift_card_service_definition_id:
|
|
28
|
-
GiftCardServiceProvider, PlainValidator(validate_open_enum(False))
|
|
29
|
-
]
|
|
27
|
+
gift_card_service_definition_id: GiftCardServiceProvider
|
|
30
28
|
|
|
31
29
|
display_name: str
|
|
32
30
|
r"""The display name for the gift card service."""
|
gr4vy/models/giftcardsummary.py
CHANGED
|
@@ -4,10 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
from .giftcarderrorcode import GiftCardErrorCode
|
|
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 Literal, Optional
|
|
12
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
13
|
|
|
@@ -72,9 +72,7 @@ class GiftCardSummary(BaseModel):
|
|
|
72
72
|
balance: OptionalNullable[int] = UNSET
|
|
73
73
|
r"""The amount remaining on the balance for this gift card according to the gift card service. This may be `null` if the balance could not be fetched."""
|
|
74
74
|
|
|
75
|
-
balance_error_code:
|
|
76
|
-
OptionalNullable[GiftCardErrorCode], PlainValidator(validate_open_enum(False))
|
|
77
|
-
] = UNSET
|
|
75
|
+
balance_error_code: OptionalNullable[GiftCardErrorCode] = UNSET
|
|
78
76
|
r"""If the last balance update failed, this will contain the internal code for this error."""
|
|
79
77
|
|
|
80
78
|
balance_raw_error_code: OptionalNullable[str] = UNSET
|
|
@@ -1,19 +1,19 @@
|
|
|
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 .shippingdetailscreate import ShippingDetailsCreate, ShippingDetailsCreateTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
7
|
from pydantic import model_serializer
|
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class GuestBuyerTypedDict(TypedDict):
|
|
12
12
|
display_name: NotRequired[Nullable[str]]
|
|
13
13
|
r"""The display name for the buyer."""
|
|
14
14
|
external_identifier: NotRequired[Nullable[str]]
|
|
15
15
|
r"""The merchant identifier for this buyer."""
|
|
16
|
-
billing_details: NotRequired[Nullable[
|
|
16
|
+
billing_details: NotRequired[Nullable[BillingDetailsTypedDict]]
|
|
17
17
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
18
18
|
account_number: NotRequired[Nullable[str]]
|
|
19
19
|
r"""The buyer account number"""
|
|
@@ -21,14 +21,14 @@ class GuestBuyerInputTypedDict(TypedDict):
|
|
|
21
21
|
r"""The optional shipping details for this buyer."""
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class
|
|
24
|
+
class GuestBuyer(BaseModel):
|
|
25
25
|
display_name: OptionalNullable[str] = UNSET
|
|
26
26
|
r"""The display name for the buyer."""
|
|
27
27
|
|
|
28
28
|
external_identifier: OptionalNullable[str] = UNSET
|
|
29
29
|
r"""The merchant identifier for this buyer."""
|
|
30
30
|
|
|
31
|
-
billing_details: OptionalNullable[
|
|
31
|
+
billing_details: OptionalNullable[BillingDetails] = UNSET
|
|
32
32
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
33
33
|
|
|
34
34
|
account_number: OptionalNullable[str] = UNSET
|
gr4vy/models/instrumenttype.py
CHANGED
|
@@ -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
|
+
IntegrationClient = Union[
|
|
9
|
+
Literal[
|
|
10
|
+
"redirect",
|
|
11
|
+
"web",
|
|
12
|
+
"android",
|
|
13
|
+
"ios",
|
|
14
|
+
],
|
|
15
|
+
UnrecognizedStr,
|
|
16
|
+
]
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
from importlib import import_module
|
|
5
5
|
import builtins
|
|
6
|
+
import sys
|
|
6
7
|
|
|
7
8
|
if TYPE_CHECKING:
|
|
8
9
|
from .globals import Globals, GlobalsTypedDict
|
|
@@ -15,6 +16,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
def dynamic_import(modname, retries=3):
|
|
20
|
+
for attempt in range(retries):
|
|
21
|
+
try:
|
|
22
|
+
return import_module(modname, __package__)
|
|
23
|
+
except KeyError:
|
|
24
|
+
# Clear any half-initialized module and retry
|
|
25
|
+
sys.modules.pop(modname, None)
|
|
26
|
+
if attempt == retries - 1:
|
|
27
|
+
break
|
|
28
|
+
raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
|
|
29
|
+
|
|
30
|
+
|
|
18
31
|
def __getattr__(attr_name: str) -> object:
|
|
19
32
|
module_name = _dynamic_imports.get(attr_name)
|
|
20
33
|
if module_name is None:
|
|
@@ -23,7 +36,7 @@ def __getattr__(attr_name: str) -> object:
|
|
|
23
36
|
)
|
|
24
37
|
|
|
25
38
|
try:
|
|
26
|
-
module =
|
|
39
|
+
module = dynamic_import(module_name)
|
|
27
40
|
result = getattr(module, attr_name)
|
|
28
41
|
return result
|
|
29
42
|
except ImportError as e:
|
|
@@ -5,15 +5,9 @@ from .reportexecutions import ReportExecutions, ReportExecutionsTypedDict
|
|
|
5
5
|
from .reportexecutionstatus import ReportExecutionStatus
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
8
|
-
from gr4vy.utils import
|
|
9
|
-
FieldMetadata,
|
|
10
|
-
HeaderMetadata,
|
|
11
|
-
QueryParamMetadata,
|
|
12
|
-
validate_open_enum,
|
|
13
|
-
)
|
|
8
|
+
from gr4vy.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
14
9
|
import pydantic
|
|
15
10
|
from pydantic import model_serializer
|
|
16
|
-
from pydantic.functional_validators import PlainValidator
|
|
17
11
|
from typing import Callable, List, Optional
|
|
18
12
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
13
|
|
|
@@ -83,13 +77,7 @@ class ListAllReportExecutionsRequest(BaseModel):
|
|
|
83
77
|
r"""Filters the results to only reports created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`."""
|
|
84
78
|
|
|
85
79
|
status: Annotated[
|
|
86
|
-
OptionalNullable[
|
|
87
|
-
List[
|
|
88
|
-
Annotated[
|
|
89
|
-
ReportExecutionStatus, PlainValidator(validate_open_enum(False))
|
|
90
|
-
]
|
|
91
|
-
]
|
|
92
|
-
],
|
|
80
|
+
OptionalNullable[List[ReportExecutionStatus]],
|
|
93
81
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
94
82
|
] = UNSET
|
|
95
83
|
r"""Filters the results to only the reports that have a `status` that matches with any of the provided status values."""
|
|
@@ -4,15 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
from .auditlogaction import AuditLogAction
|
|
5
5
|
from .auditlogentries import AuditLogEntries, AuditLogEntriesTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import
|
|
8
|
-
FieldMetadata,
|
|
9
|
-
HeaderMetadata,
|
|
10
|
-
QueryParamMetadata,
|
|
11
|
-
validate_open_enum,
|
|
12
|
-
)
|
|
7
|
+
from gr4vy.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
13
8
|
import pydantic
|
|
14
9
|
from pydantic import model_serializer
|
|
15
|
-
from pydantic.functional_validators import PlainValidator
|
|
16
10
|
from typing import Callable, Optional
|
|
17
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
12
|
|
|
@@ -60,9 +54,7 @@ class ListAuditLogsRequest(BaseModel):
|
|
|
60
54
|
r"""The maximum number of items that are at returned."""
|
|
61
55
|
|
|
62
56
|
action: Annotated[
|
|
63
|
-
|
|
64
|
-
OptionalNullable[AuditLogAction], PlainValidator(validate_open_enum(False))
|
|
65
|
-
],
|
|
57
|
+
OptionalNullable[AuditLogAction],
|
|
66
58
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
67
59
|
] = UNSET
|
|
68
60
|
r"""Filters the results to only the items for which the `audit-log` has an `action` that matches this value."""
|
|
@@ -14,11 +14,10 @@ from gr4vy.utils import (
|
|
|
14
14
|
HeaderMetadata,
|
|
15
15
|
QueryParamMetadata,
|
|
16
16
|
validate_const,
|
|
17
|
-
validate_open_enum,
|
|
18
17
|
)
|
|
19
18
|
import pydantic
|
|
20
19
|
from pydantic import model_serializer
|
|
21
|
-
from pydantic.functional_validators import AfterValidator
|
|
20
|
+
from pydantic.functional_validators import AfterValidator
|
|
22
21
|
from typing import Literal, Optional, Union
|
|
23
22
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
24
23
|
|
|
@@ -37,7 +36,13 @@ class ListBuyerPaymentMethodsGlobals(BaseModel):
|
|
|
37
36
|
r"""The ID of the merchant account to use for this request."""
|
|
38
37
|
|
|
39
38
|
|
|
40
|
-
OrderBy = Union[
|
|
39
|
+
OrderBy = Union[
|
|
40
|
+
Literal[
|
|
41
|
+
"asc",
|
|
42
|
+
"desc",
|
|
43
|
+
],
|
|
44
|
+
UnrecognizedStr,
|
|
45
|
+
]
|
|
41
46
|
r"""The direction to sort the payment methods in."""
|
|
42
47
|
|
|
43
48
|
|
|
@@ -82,7 +87,7 @@ class ListBuyerPaymentMethodsRequest(BaseModel):
|
|
|
82
87
|
r"""The field to sort the payment methods by."""
|
|
83
88
|
|
|
84
89
|
order_by: Annotated[
|
|
85
|
-
|
|
90
|
+
Optional[OrderBy],
|
|
86
91
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
87
92
|
] = "desc"
|
|
88
93
|
r"""The direction to sort the payment methods in."""
|
|
@@ -4,15 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
from .paymentmethods import PaymentMethods, PaymentMethodsTypedDict
|
|
5
5
|
from .paymentmethodstatus import PaymentMethodStatus
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import
|
|
8
|
-
FieldMetadata,
|
|
9
|
-
HeaderMetadata,
|
|
10
|
-
QueryParamMetadata,
|
|
11
|
-
validate_open_enum,
|
|
12
|
-
)
|
|
7
|
+
from gr4vy.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
13
8
|
import pydantic
|
|
14
9
|
from pydantic import model_serializer
|
|
15
|
-
from pydantic.functional_validators import PlainValidator
|
|
16
10
|
from typing import Callable, List, Optional
|
|
17
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
12
|
|
|
@@ -73,13 +67,7 @@ class ListPaymentMethodsRequest(BaseModel):
|
|
|
73
67
|
r"""The external identifier of the buyer to filter payment methods by."""
|
|
74
68
|
|
|
75
69
|
status: Annotated[
|
|
76
|
-
OptionalNullable[
|
|
77
|
-
List[
|
|
78
|
-
Annotated[
|
|
79
|
-
PaymentMethodStatus, PlainValidator(validate_open_enum(False))
|
|
80
|
-
]
|
|
81
|
-
]
|
|
82
|
-
],
|
|
70
|
+
OptionalNullable[List[PaymentMethodStatus]],
|
|
83
71
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
84
72
|
] = UNSET
|
|
85
73
|
|
|
@@ -4,15 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
from .method import Method
|
|
5
5
|
from .paymentservices import PaymentServices, PaymentServicesTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import
|
|
8
|
-
FieldMetadata,
|
|
9
|
-
HeaderMetadata,
|
|
10
|
-
QueryParamMetadata,
|
|
11
|
-
validate_open_enum,
|
|
12
|
-
)
|
|
7
|
+
from gr4vy.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
13
8
|
import pydantic
|
|
14
9
|
from pydantic import model_serializer
|
|
15
|
-
from pydantic.functional_validators import PlainValidator
|
|
16
10
|
from typing import Callable, Optional
|
|
17
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
12
|
|
|
@@ -46,7 +40,7 @@ class ListPaymentServicesRequestTypedDict(TypedDict):
|
|
|
46
40
|
|
|
47
41
|
class ListPaymentServicesRequest(BaseModel):
|
|
48
42
|
method: Annotated[
|
|
49
|
-
|
|
43
|
+
OptionalNullable[Method],
|
|
50
44
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
51
45
|
] = UNSET
|
|
52
46
|
r"""Return any payment service for this method."""
|
gr4vy/models/list_reportsop.py
CHANGED
|
@@ -4,15 +4,9 @@ from __future__ import annotations
|
|
|
4
4
|
from .reports import Reports, ReportsTypedDict
|
|
5
5
|
from .reportschedule import ReportSchedule
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
|
-
from gr4vy.utils import
|
|
8
|
-
FieldMetadata,
|
|
9
|
-
HeaderMetadata,
|
|
10
|
-
QueryParamMetadata,
|
|
11
|
-
validate_open_enum,
|
|
12
|
-
)
|
|
7
|
+
from gr4vy.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
13
8
|
import pydantic
|
|
14
9
|
from pydantic import model_serializer
|
|
15
|
-
from pydantic.functional_validators import PlainValidator
|
|
16
10
|
from typing import Callable, List, Optional
|
|
17
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
18
12
|
|
|
@@ -60,9 +54,7 @@ class ListReportsRequest(BaseModel):
|
|
|
60
54
|
r"""The maximum number of items that are at returned."""
|
|
61
55
|
|
|
62
56
|
schedule: Annotated[
|
|
63
|
-
OptionalNullable[
|
|
64
|
-
List[Annotated[ReportSchedule, PlainValidator(validate_open_enum(False))]]
|
|
65
|
-
],
|
|
57
|
+
OptionalNullable[List[ReportSchedule]],
|
|
66
58
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
67
59
|
] = UNSET
|
|
68
60
|
r"""Filters the reports by the type of schedule at which they run."""
|