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
gr4vy/models/payoutcreate.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 .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
5
5
|
from .paymentmethodcard import PaymentMethodCard, PaymentMethodCardTypedDict
|
|
6
6
|
from .paymentmethodstoredcard import (
|
|
7
7
|
PaymentMethodStoredCard,
|
|
@@ -14,11 +14,9 @@ from .payoutconnectionoptions import (
|
|
|
14
14
|
)
|
|
15
15
|
from .payoutmerchant import PayoutMerchant, PayoutMerchantTypedDict
|
|
16
16
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
17
|
-
from gr4vy.utils import validate_open_enum
|
|
18
17
|
from pydantic import model_serializer
|
|
19
|
-
from pydantic.functional_validators import PlainValidator
|
|
20
18
|
from typing import Union
|
|
21
|
-
from typing_extensions import
|
|
19
|
+
from typing_extensions import NotRequired, TypeAliasType, TypedDict
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
PayoutCreatePaymentMethodTypedDict = TypeAliasType(
|
|
@@ -54,7 +52,7 @@ class PayoutCreateTypedDict(TypedDict):
|
|
|
54
52
|
r"""A value that can be used to match the payout against your own records."""
|
|
55
53
|
buyer_id: NotRequired[Nullable[str]]
|
|
56
54
|
r"""The `id` of a stored buyer to use for this payout Use this instead of the `buyer` or `buyer_external_identifier`."""
|
|
57
|
-
buyer: NotRequired[Nullable[
|
|
55
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
58
56
|
r"""Inline buyer details for the payout. Use this instead of the `buyer_id` or `buyer_external_identifier`."""
|
|
59
57
|
buyer_external_identifier: NotRequired[Nullable[str]]
|
|
60
58
|
r"""The `external_identifier` of a stored buyer to use for this payout. Use this instead of the `buyer_id` or `buyer`."""
|
|
@@ -82,9 +80,7 @@ class PayoutCreate(BaseModel):
|
|
|
82
80
|
payment_method: PayoutCreatePaymentMethod
|
|
83
81
|
r"""The type of payment method to send funds too."""
|
|
84
82
|
|
|
85
|
-
category:
|
|
86
|
-
OptionalNullable[PayoutCategory], PlainValidator(validate_open_enum(False))
|
|
87
|
-
] = UNSET
|
|
83
|
+
category: OptionalNullable[PayoutCategory] = UNSET
|
|
88
84
|
r"""The type of payout to process."""
|
|
89
85
|
|
|
90
86
|
external_identifier: OptionalNullable[str] = UNSET
|
|
@@ -93,7 +89,7 @@ class PayoutCreate(BaseModel):
|
|
|
93
89
|
buyer_id: OptionalNullable[str] = UNSET
|
|
94
90
|
r"""The `id` of a stored buyer to use for this payout Use this instead of the `buyer` or `buyer_external_identifier`."""
|
|
95
91
|
|
|
96
|
-
buyer: OptionalNullable[
|
|
92
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
97
93
|
r"""Inline buyer details for the payout. Use this instead of the `buyer_id` or `buyer_external_identifier`."""
|
|
98
94
|
|
|
99
95
|
buyer_external_identifier: OptionalNullable[str] = UNSET
|
gr4vy/models/payoutstatus.py
CHANGED
gr4vy/models/payoutsummary.py
CHANGED
|
@@ -12,10 +12,10 @@ from .transactionpaymentmethod import (
|
|
|
12
12
|
)
|
|
13
13
|
from datetime import datetime
|
|
14
14
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
15
|
-
from gr4vy.utils import validate_const
|
|
15
|
+
from gr4vy.utils import validate_const
|
|
16
16
|
import pydantic
|
|
17
17
|
from pydantic import model_serializer
|
|
18
|
-
from pydantic.functional_validators import AfterValidator
|
|
18
|
+
from pydantic.functional_validators import AfterValidator
|
|
19
19
|
from typing import Literal, Optional
|
|
20
20
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
21
21
|
|
|
@@ -74,7 +74,7 @@ class PayoutSummary(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
payment_service: PayoutPaymentService
|
|
76
76
|
|
|
77
|
-
status:
|
|
77
|
+
status: PayoutStatus
|
|
78
78
|
|
|
79
79
|
updated_at: datetime
|
|
80
80
|
r"""The date this payout was last updated at."""
|
|
@@ -93,9 +93,7 @@ class PayoutSummary(BaseModel):
|
|
|
93
93
|
buyer: OptionalNullable[TransactionBuyer] = UNSET
|
|
94
94
|
r"""The buyer used for this payout."""
|
|
95
95
|
|
|
96
|
-
category:
|
|
97
|
-
OptionalNullable[PayoutCategory], PlainValidator(validate_open_enum(False))
|
|
98
|
-
] = UNSET
|
|
96
|
+
category: OptionalNullable[PayoutCategory] = UNSET
|
|
99
97
|
r"""The type of payout to process."""
|
|
100
98
|
|
|
101
99
|
external_identifier: OptionalNullable[str] = UNSET
|
gr4vy/models/paypaloptions.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from .paypalshippingoptions import PaypalShippingOptions, PaypalShippingOptionsTypedDict
|
|
4
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
5
6
|
from pydantic import model_serializer
|
|
6
7
|
from typing import Dict, List
|
|
@@ -10,16 +11,21 @@ from typing_extensions import NotRequired, TypedDict
|
|
|
10
11
|
class PaypalOptionsTypedDict(TypedDict):
|
|
11
12
|
additional_data: NotRequired[Nullable[List[Dict[str, str]]]]
|
|
12
13
|
r"""Additional Set Transaction Context Values (STC) to be sent to PayPal as part of the transaction."""
|
|
14
|
+
shipping: NotRequired[Nullable[PaypalShippingOptionsTypedDict]]
|
|
15
|
+
r"""Shipping information to be passed to the PayPal API."""
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
class PaypalOptions(BaseModel):
|
|
16
19
|
additional_data: OptionalNullable[List[Dict[str, str]]] = UNSET
|
|
17
20
|
r"""Additional Set Transaction Context Values (STC) to be sent to PayPal as part of the transaction."""
|
|
18
21
|
|
|
22
|
+
shipping: OptionalNullable[PaypalShippingOptions] = UNSET
|
|
23
|
+
r"""Shipping information to be passed to the PayPal API."""
|
|
24
|
+
|
|
19
25
|
@model_serializer(mode="wrap")
|
|
20
26
|
def serialize_model(self, handler):
|
|
21
|
-
optional_fields = ["additional_data"]
|
|
22
|
-
nullable_fields = ["additional_data"]
|
|
27
|
+
optional_fields = ["additional_data", "shipping"]
|
|
28
|
+
nullable_fields = ["additional_data", "shipping"]
|
|
23
29
|
null_default_fields = []
|
|
24
30
|
|
|
25
31
|
serialized = handler(self)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .paypalshippingoptionsitem import (
|
|
5
|
+
PaypalShippingOptionsItem,
|
|
6
|
+
PaypalShippingOptionsItemTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
9
|
+
from pydantic import model_serializer
|
|
10
|
+
from typing import List
|
|
11
|
+
from typing_extensions import NotRequired, TypedDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PaypalShippingOptionsTypedDict(TypedDict):
|
|
15
|
+
options: NotRequired[Nullable[List[PaypalShippingOptionsItemTypedDict]]]
|
|
16
|
+
r"""Shipping options that the payee or merchant offers to the payer to ship or pick up their items."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PaypalShippingOptions(BaseModel):
|
|
20
|
+
options: OptionalNullable[List[PaypalShippingOptionsItem]] = UNSET
|
|
21
|
+
r"""Shipping options that the payee or merchant offers to the payer to ship or pick up their items."""
|
|
22
|
+
|
|
23
|
+
@model_serializer(mode="wrap")
|
|
24
|
+
def serialize_model(self, handler):
|
|
25
|
+
optional_fields = ["options"]
|
|
26
|
+
nullable_fields = ["options"]
|
|
27
|
+
null_default_fields = []
|
|
28
|
+
|
|
29
|
+
serialized = handler(self)
|
|
30
|
+
|
|
31
|
+
m = {}
|
|
32
|
+
|
|
33
|
+
for n, f in type(self).model_fields.items():
|
|
34
|
+
k = f.alias or n
|
|
35
|
+
val = serialized.get(k)
|
|
36
|
+
serialized.pop(k, None)
|
|
37
|
+
|
|
38
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
39
|
+
is_set = (
|
|
40
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
41
|
+
or k in null_default_fields
|
|
42
|
+
) # pylint: disable=no-member
|
|
43
|
+
|
|
44
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
45
|
+
m[k] = val
|
|
46
|
+
elif val != UNSET_SENTINEL and (
|
|
47
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
48
|
+
):
|
|
49
|
+
m[k] = val
|
|
50
|
+
|
|
51
|
+
return m
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .paypalshippingoptionsitemamount import (
|
|
5
|
+
PaypalShippingOptionsItemAmount,
|
|
6
|
+
PaypalShippingOptionsItemAmountTypedDict,
|
|
7
|
+
)
|
|
8
|
+
from gr4vy.types import (
|
|
9
|
+
BaseModel,
|
|
10
|
+
Nullable,
|
|
11
|
+
OptionalNullable,
|
|
12
|
+
UNSET,
|
|
13
|
+
UNSET_SENTINEL,
|
|
14
|
+
UnrecognizedStr,
|
|
15
|
+
)
|
|
16
|
+
from pydantic import model_serializer
|
|
17
|
+
from typing import Literal, Union
|
|
18
|
+
from typing_extensions import NotRequired, TypedDict
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PaypalShippingOptionsItemType = Union[
|
|
22
|
+
Literal[
|
|
23
|
+
"SHIPPING",
|
|
24
|
+
"PICKUP",
|
|
25
|
+
"PICKUP_IN_STORE",
|
|
26
|
+
"PICKUP_FROM_PERSON",
|
|
27
|
+
],
|
|
28
|
+
UnrecognizedStr,
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PaypalShippingOptionsItemTypedDict(TypedDict):
|
|
33
|
+
id: str
|
|
34
|
+
r"""A unique ID that identifies a payer-selected shipping option."""
|
|
35
|
+
label: str
|
|
36
|
+
r"""A description that the payer sees, which helps them choose an appropriate shipping option."""
|
|
37
|
+
selected: bool
|
|
38
|
+
r"""If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true."""
|
|
39
|
+
type: NotRequired[Nullable[PaypalShippingOptionsItemType]]
|
|
40
|
+
r"""A classification for the method of purchase fulfillment."""
|
|
41
|
+
amount: NotRequired[Nullable[PaypalShippingOptionsItemAmountTypedDict]]
|
|
42
|
+
r"""The shipping cost for the selected option."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class PaypalShippingOptionsItem(BaseModel):
|
|
46
|
+
id: str
|
|
47
|
+
r"""A unique ID that identifies a payer-selected shipping option."""
|
|
48
|
+
|
|
49
|
+
label: str
|
|
50
|
+
r"""A description that the payer sees, which helps them choose an appropriate shipping option."""
|
|
51
|
+
|
|
52
|
+
selected: bool
|
|
53
|
+
r"""If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true."""
|
|
54
|
+
|
|
55
|
+
type: OptionalNullable[PaypalShippingOptionsItemType] = UNSET
|
|
56
|
+
r"""A classification for the method of purchase fulfillment."""
|
|
57
|
+
|
|
58
|
+
amount: OptionalNullable[PaypalShippingOptionsItemAmount] = UNSET
|
|
59
|
+
r"""The shipping cost for the selected option."""
|
|
60
|
+
|
|
61
|
+
@model_serializer(mode="wrap")
|
|
62
|
+
def serialize_model(self, handler):
|
|
63
|
+
optional_fields = ["type", "amount"]
|
|
64
|
+
nullable_fields = ["type", "amount"]
|
|
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
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from gr4vy.types import BaseModel
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PaypalShippingOptionsItemAmountTypedDict(TypedDict):
|
|
9
|
+
currency_code: str
|
|
10
|
+
r"""The three-character ISO currency code."""
|
|
11
|
+
value: str
|
|
12
|
+
r"""The amount value, which might include a decimal portion."""
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PaypalShippingOptionsItemAmount(BaseModel):
|
|
16
|
+
currency_code: str
|
|
17
|
+
r"""The three-character ISO currency code."""
|
|
18
|
+
|
|
19
|
+
value: str
|
|
20
|
+
r"""The amount value, which might include a decimal portion."""
|
|
@@ -0,0 +1,106 @@
|
|
|
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 gr4vy.utils import validate_const
|
|
6
|
+
import pydantic
|
|
7
|
+
from pydantic import model_serializer
|
|
8
|
+
from pydantic.functional_validators import AfterValidator
|
|
9
|
+
from typing import Literal, Optional
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PlaidPaymentMethodCreateTypedDict(TypedDict):
|
|
14
|
+
r"""Plaid Payment Method
|
|
15
|
+
|
|
16
|
+
Plaid Payment Method to use in a transaction.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
token: str
|
|
20
|
+
r"""The public token obtained after using Plaid Link."""
|
|
21
|
+
method: Literal["plaid"]
|
|
22
|
+
r"""Always `plaid`."""
|
|
23
|
+
account_id: NotRequired[Nullable[str]]
|
|
24
|
+
r"""The Plaid account ID corresponding to the end-user account. If not provided will be fetched from Plaid API expecting to only have one."""
|
|
25
|
+
payment_service_id: NotRequired[Nullable[str]]
|
|
26
|
+
r"""The ID of the Plaid payment service related to the provided public token. If not provided will be fetched from the currently active expecting to have a single one."""
|
|
27
|
+
buyer_id: NotRequired[Nullable[str]]
|
|
28
|
+
r"""The ID of the buyer to attach the method to."""
|
|
29
|
+
buyer_external_identifier: NotRequired[Nullable[str]]
|
|
30
|
+
r"""The merchant reference for this payment method."""
|
|
31
|
+
external_identifier: NotRequired[Nullable[str]]
|
|
32
|
+
r"""The merchant identifier for this payment method."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class PlaidPaymentMethodCreate(BaseModel):
|
|
36
|
+
r"""Plaid Payment Method
|
|
37
|
+
|
|
38
|
+
Plaid Payment Method to use in a transaction.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
token: str
|
|
42
|
+
r"""The public token obtained after using Plaid Link."""
|
|
43
|
+
|
|
44
|
+
METHOD: Annotated[
|
|
45
|
+
Annotated[Optional[Literal["plaid"]], AfterValidator(validate_const("plaid"))],
|
|
46
|
+
pydantic.Field(alias="method"),
|
|
47
|
+
] = "plaid"
|
|
48
|
+
r"""Always `plaid`."""
|
|
49
|
+
|
|
50
|
+
account_id: OptionalNullable[str] = UNSET
|
|
51
|
+
r"""The Plaid account ID corresponding to the end-user account. If not provided will be fetched from Plaid API expecting to only have one."""
|
|
52
|
+
|
|
53
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
54
|
+
r"""The ID of the Plaid payment service related to the provided public token. If not provided will be fetched from the currently active expecting to have a single one."""
|
|
55
|
+
|
|
56
|
+
buyer_id: OptionalNullable[str] = UNSET
|
|
57
|
+
r"""The ID of the buyer to attach the method to."""
|
|
58
|
+
|
|
59
|
+
buyer_external_identifier: OptionalNullable[str] = UNSET
|
|
60
|
+
r"""The merchant reference for this payment method."""
|
|
61
|
+
|
|
62
|
+
external_identifier: OptionalNullable[str] = UNSET
|
|
63
|
+
r"""The merchant identifier for this payment method."""
|
|
64
|
+
|
|
65
|
+
@model_serializer(mode="wrap")
|
|
66
|
+
def serialize_model(self, handler):
|
|
67
|
+
optional_fields = [
|
|
68
|
+
"method",
|
|
69
|
+
"account_id",
|
|
70
|
+
"payment_service_id",
|
|
71
|
+
"buyer_id",
|
|
72
|
+
"buyer_external_identifier",
|
|
73
|
+
"external_identifier",
|
|
74
|
+
]
|
|
75
|
+
nullable_fields = [
|
|
76
|
+
"account_id",
|
|
77
|
+
"payment_service_id",
|
|
78
|
+
"buyer_id",
|
|
79
|
+
"buyer_external_identifier",
|
|
80
|
+
"external_identifier",
|
|
81
|
+
]
|
|
82
|
+
null_default_fields = []
|
|
83
|
+
|
|
84
|
+
serialized = handler(self)
|
|
85
|
+
|
|
86
|
+
m = {}
|
|
87
|
+
|
|
88
|
+
for n, f in type(self).model_fields.items():
|
|
89
|
+
k = f.alias or n
|
|
90
|
+
val = serialized.get(k)
|
|
91
|
+
serialized.pop(k, None)
|
|
92
|
+
|
|
93
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
94
|
+
is_set = (
|
|
95
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
96
|
+
or k in null_default_fields
|
|
97
|
+
) # pylint: disable=no-member
|
|
98
|
+
|
|
99
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
100
|
+
m[k] = val
|
|
101
|
+
elif val != UNSET_SENTINEL and (
|
|
102
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
103
|
+
):
|
|
104
|
+
m[k] = val
|
|
105
|
+
|
|
106
|
+
return m
|
|
@@ -9,11 +9,9 @@ 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
|
RedirectPaymentMethodCreateMethod = Union[
|
|
@@ -74,6 +72,7 @@ RedirectPaymentMethodCreateMethod = Union[
|
|
|
74
72
|
"oney_6x",
|
|
75
73
|
"ovo",
|
|
76
74
|
"oxxo",
|
|
75
|
+
"p24",
|
|
77
76
|
"pagoefectivo",
|
|
78
77
|
"payid",
|
|
79
78
|
"paymaya",
|
|
@@ -112,6 +111,7 @@ RedirectPaymentMethodCreateMethod = Union[
|
|
|
112
111
|
"waave",
|
|
113
112
|
"webpay",
|
|
114
113
|
"wechat",
|
|
114
|
+
"wero",
|
|
115
115
|
"yape",
|
|
116
116
|
"zippay",
|
|
117
117
|
],
|
|
@@ -142,9 +142,7 @@ class RedirectPaymentMethodCreateTypedDict(TypedDict):
|
|
|
142
142
|
class RedirectPaymentMethodCreate(BaseModel):
|
|
143
143
|
r"""Create a transaction for an APM/LPM that requires a redirect."""
|
|
144
144
|
|
|
145
|
-
method:
|
|
146
|
-
RedirectPaymentMethodCreateMethod, PlainValidator(validate_open_enum(False))
|
|
147
|
-
]
|
|
145
|
+
method: RedirectPaymentMethodCreateMethod
|
|
148
146
|
r"""The method to use, this can be any of the methods that support redirect requests."""
|
|
149
147
|
|
|
150
148
|
country: str
|
gr4vy/models/refund.py
CHANGED
|
@@ -6,10 +6,10 @@ from .refundstatus import RefundStatus
|
|
|
6
6
|
from .refundtargettype import RefundTargetType
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
9
|
-
from gr4vy.utils import validate_const
|
|
9
|
+
from gr4vy.utils import validate_const
|
|
10
10
|
import pydantic
|
|
11
11
|
from pydantic import model_serializer
|
|
12
|
-
from pydantic.functional_validators import AfterValidator
|
|
12
|
+
from pydantic.functional_validators import AfterValidator
|
|
13
13
|
from typing import Literal, Optional
|
|
14
14
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
15
|
|
|
@@ -62,7 +62,7 @@ class Refund(BaseModel):
|
|
|
62
62
|
transaction_id: str
|
|
63
63
|
r"""The ID of the transaction associated with this refund."""
|
|
64
64
|
|
|
65
|
-
status:
|
|
65
|
+
status: RefundStatus
|
|
66
66
|
|
|
67
67
|
currency: str
|
|
68
68
|
r"""The ISO 4217 currency code for this refund. Will always match that of the associated transaction."""
|
|
@@ -70,7 +70,7 @@ class Refund(BaseModel):
|
|
|
70
70
|
amount: int
|
|
71
71
|
r"""The amount of this refund, in the smallest currency unit (for example, cents or pence)."""
|
|
72
72
|
|
|
73
|
-
target_type:
|
|
73
|
+
target_type: RefundTargetType
|
|
74
74
|
|
|
75
75
|
reconciliation_id: str
|
|
76
76
|
r"""The base62 encoded refund ID. This represents a shorter version of this refund's `id` which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's refund against our system."""
|
gr4vy/models/refundstatus.py
CHANGED
|
@@ -6,5 +6,12 @@ from typing import Literal, Union
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
RefundStatus = Union[
|
|
9
|
-
Literal[
|
|
9
|
+
Literal[
|
|
10
|
+
"processing",
|
|
11
|
+
"succeeded",
|
|
12
|
+
"failed",
|
|
13
|
+
"declined",
|
|
14
|
+
"voided",
|
|
15
|
+
],
|
|
16
|
+
UnrecognizedStr,
|
|
10
17
|
]
|
gr4vy/models/refundtargettype.py
CHANGED
gr4vy/models/report.py
CHANGED
|
@@ -10,10 +10,10 @@ from .reportschedule import ReportSchedule
|
|
|
10
10
|
from .reportspec import ReportSpec, ReportSpecTypedDict
|
|
11
11
|
from datetime import datetime
|
|
12
12
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
13
|
-
from gr4vy.utils import validate_const
|
|
13
|
+
from gr4vy.utils import validate_const
|
|
14
14
|
import pydantic
|
|
15
15
|
from pydantic import model_serializer
|
|
16
|
-
from pydantic.functional_validators import AfterValidator
|
|
16
|
+
from pydantic.functional_validators import AfterValidator
|
|
17
17
|
from typing import Literal, Optional
|
|
18
18
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
19
|
|
|
@@ -67,7 +67,7 @@ class Report(BaseModel):
|
|
|
67
67
|
updated_at: datetime
|
|
68
68
|
r"""The date this report was last updated."""
|
|
69
69
|
|
|
70
|
-
schedule:
|
|
70
|
+
schedule: ReportSchedule
|
|
71
71
|
|
|
72
72
|
schedule_enabled: bool
|
|
73
73
|
r"""Whether the report schedule is enabled."""
|
|
@@ -91,9 +91,7 @@ class Report(BaseModel):
|
|
|
91
91
|
creator_display_name: OptionalNullable[str] = UNSET
|
|
92
92
|
r"""The display name of the report creator."""
|
|
93
93
|
|
|
94
|
-
creator_type:
|
|
95
|
-
OptionalNullable[ReportCreatorType], PlainValidator(validate_open_enum(False))
|
|
96
|
-
] = UNSET
|
|
94
|
+
creator_type: OptionalNullable[ReportCreatorType] = UNSET
|
|
97
95
|
r"""The type of the report creator."""
|
|
98
96
|
|
|
99
97
|
next_execution_at: OptionalNullable[datetime] = UNSET
|
gr4vy/models/reportcreate.py
CHANGED
|
@@ -19,9 +19,8 @@ from .transactionsreportspec import (
|
|
|
19
19
|
TransactionsReportSpecTypedDict,
|
|
20
20
|
)
|
|
21
21
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
22
|
-
from gr4vy.utils import get_discriminator
|
|
22
|
+
from gr4vy.utils import get_discriminator
|
|
23
23
|
from pydantic import Discriminator, Tag, model_serializer
|
|
24
|
-
from pydantic.functional_validators import PlainValidator
|
|
25
24
|
from typing import Optional, Union
|
|
26
25
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
27
26
|
|
|
@@ -68,7 +67,7 @@ class ReportCreate(BaseModel):
|
|
|
68
67
|
name: str
|
|
69
68
|
r"""The name of the report."""
|
|
70
69
|
|
|
71
|
-
schedule:
|
|
70
|
+
schedule: ReportSchedule
|
|
72
71
|
|
|
73
72
|
schedule_enabled: bool
|
|
74
73
|
r"""Whether the report schedule is enabled."""
|
gr4vy/models/reportexecution.py
CHANGED
|
@@ -9,9 +9,9 @@ from .reportexecutionstatus import ReportExecutionStatus
|
|
|
9
9
|
from .reportsummary import ReportSummary, ReportSummaryTypedDict
|
|
10
10
|
from datetime import datetime
|
|
11
11
|
from gr4vy.types import BaseModel
|
|
12
|
-
from gr4vy.utils import validate_const
|
|
12
|
+
from gr4vy.utils import validate_const
|
|
13
13
|
import pydantic
|
|
14
|
-
from pydantic.functional_validators import AfterValidator
|
|
14
|
+
from pydantic.functional_validators import AfterValidator
|
|
15
15
|
from typing import Literal, Optional
|
|
16
16
|
from typing_extensions import Annotated, TypedDict
|
|
17
17
|
|
|
@@ -40,7 +40,7 @@ class ReportExecution(BaseModel):
|
|
|
40
40
|
updated_at: datetime
|
|
41
41
|
r"""The date this report execution was last updated."""
|
|
42
42
|
|
|
43
|
-
status:
|
|
43
|
+
status: ReportExecutionStatus
|
|
44
44
|
|
|
45
45
|
context: ReportExecutionContext
|
|
46
46
|
|
|
@@ -6,6 +6,12 @@ from typing import Literal, Union
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
ReportExecutionStatus = Union[
|
|
9
|
-
Literal[
|
|
9
|
+
Literal[
|
|
10
|
+
"dispatched",
|
|
11
|
+
"failed",
|
|
12
|
+
"pending",
|
|
13
|
+
"processing",
|
|
14
|
+
"succeeded",
|
|
15
|
+
],
|
|
10
16
|
UnrecognizedStr,
|
|
11
17
|
]
|
|
@@ -8,9 +8,9 @@ from .reportexecutioncontext import (
|
|
|
8
8
|
from .reportexecutionstatus import ReportExecutionStatus
|
|
9
9
|
from datetime import datetime
|
|
10
10
|
from gr4vy.types import BaseModel
|
|
11
|
-
from gr4vy.utils import validate_const
|
|
11
|
+
from gr4vy.utils import validate_const
|
|
12
12
|
import pydantic
|
|
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, TypedDict
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ class ReportExecutionSummary(BaseModel):
|
|
|
38
38
|
updated_at: datetime
|
|
39
39
|
r"""The date this report execution was last updated."""
|
|
40
40
|
|
|
41
|
-
status:
|
|
41
|
+
status: ReportExecutionStatus
|
|
42
42
|
|
|
43
43
|
context: ReportExecutionContext
|
|
44
44
|
|
|
@@ -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 BaseModel
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ReportExecutionURLGenerateTypedDict(TypedDict):
|
|
10
|
+
expires_in: NotRequired[int]
|
|
11
|
+
r"""The URL expiration time, in minutes."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ReportExecutionURLGenerate(BaseModel):
|
|
15
|
+
expires_in: Optional[int] = 5
|
|
16
|
+
r"""The URL expiration time, in minutes."""
|
gr4vy/models/reportschedule.py
CHANGED
|
@@ -5,4 +5,12 @@ from gr4vy.types import UnrecognizedStr
|
|
|
5
5
|
from typing import Literal, Union
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
ReportSchedule = Union[
|
|
8
|
+
ReportSchedule = Union[
|
|
9
|
+
Literal[
|
|
10
|
+
"daily",
|
|
11
|
+
"monthly",
|
|
12
|
+
"once",
|
|
13
|
+
"weekly",
|
|
14
|
+
],
|
|
15
|
+
UnrecognizedStr,
|
|
16
|
+
]
|