gr4vy 1.7.16__py3-none-any.whl → 1.8.0__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/buyers_sdk.py +8 -8
- gr4vy/checkout_sessions.py +4 -4
- gr4vy/models/__init__.py +92 -113
- gr4vy/models/auditlogentries.py +3 -3
- gr4vy/models/{auditlogentry_output.py → auditlogentry.py} +2 -2
- gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
- gr4vy/models/buyer.py +3 -3
- gr4vy/models/buyercreate.py +3 -3
- gr4vy/models/buyerupdate.py +3 -3
- gr4vy/models/capture_transactionop.py +23 -10
- gr4vy/models/checkoutsession.py +8 -8
- gr4vy/models/checkoutsessioncreate.py +3 -3
- gr4vy/models/{checkoutsessionpaymentmethod_output.py → checkoutsessionpaymentmethod.py} +2 -2
- gr4vy/models/cybersourceoptions.py +7 -0
- gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
- gr4vy/models/paymentlink.py +3 -6
- gr4vy/models/paymentlinkcreate.py +3 -3
- gr4vy/models/paymentmethodsummaries.py +3 -6
- gr4vy/models/{paymentmethodsummary_output.py → paymentmethodsummary.py} +2 -2
- gr4vy/models/{paymentoption_output.py → paymentoption.py} +2 -2
- gr4vy/models/paymentoptions.py +3 -3
- gr4vy/models/payoutcreate.py +3 -3
- gr4vy/models/payoutsummary.py +8 -11
- gr4vy/models/{transaction_output.py → transaction.py} +15 -18
- gr4vy/models/{transactionbuyer_output.py → transactionbuyer.py} +5 -5
- gr4vy/models/transactioncancel.py +3 -3
- gr4vy/models/{transactioncapture_output.py → transactioncapture.py} +5 -5
- gr4vy/models/transactioncreate.py +3 -3
- gr4vy/models/{transactionevent_output.py → transactionevent.py} +9 -5
- gr4vy/models/transactioneventcontext.py +32 -0
- gr4vy/models/transactionevents.py +3 -6
- gr4vy/models/{transactionpaymentmethod_output.py → transactionpaymentmethod.py} +2 -2
- gr4vy/models/transactionsummaries.py +3 -6
- gr4vy/models/{transactionsummary_output.py → transactionsummary.py} +10 -13
- gr4vy/models/{transactionthreedsecuresummary_output.py → transactionthreedsecuresummary.py} +2 -2
- gr4vy/models/{transactionvoid_output.py → transactionvoid.py} +5 -5
- gr4vy/models/void_transactionop.py +28 -11
- gr4vy/payment_links_sdk.py +4 -4
- gr4vy/payouts.py +4 -4
- gr4vy/transactions.py +20 -20
- gr4vy/utils/retries.py +69 -5
- {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/METADATA +1 -1
- {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/RECORD +45 -46
- gr4vy/models/billingdetails_output.py +0 -87
- gr4vy/models/guestbuyer_output.py +0 -80
- {gr4vy-1.7.16.dist-info → gr4vy-1.8.0.dist-info}/WHEEL +0 -0
gr4vy/models/buyerupdate.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .billingdetails import BillingDetails, BillingDetailsTypedDict
|
|
5
5
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
6
|
from pydantic import model_serializer
|
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
|
@@ -16,7 +16,7 @@ class BuyerUpdateTypedDict(TypedDict):
|
|
|
16
16
|
r"""The merchant identifier for this buyer."""
|
|
17
17
|
account_number: NotRequired[Nullable[str]]
|
|
18
18
|
r"""The buyer account number"""
|
|
19
|
-
billing_details: NotRequired[Nullable[
|
|
19
|
+
billing_details: NotRequired[Nullable[BillingDetailsTypedDict]]
|
|
20
20
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
21
21
|
|
|
22
22
|
|
|
@@ -32,7 +32,7 @@ class BuyerUpdate(BaseModel):
|
|
|
32
32
|
account_number: OptionalNullable[str] = UNSET
|
|
33
33
|
r"""The buyer account number"""
|
|
34
34
|
|
|
35
|
-
billing_details: OptionalNullable[
|
|
35
|
+
billing_details: OptionalNullable[BillingDetails] = UNSET
|
|
36
36
|
r"""The billing name, address, email, and other fields for this buyer."""
|
|
37
37
|
|
|
38
38
|
@model_serializer(mode="wrap")
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
from .
|
|
6
|
-
TransactionCaptureOutput,
|
|
7
|
-
TransactionCaptureOutputTypedDict,
|
|
8
|
-
)
|
|
4
|
+
from .transaction import Transaction, TransactionTypedDict
|
|
5
|
+
from .transactioncapture import TransactionCapture, TransactionCaptureTypedDict
|
|
9
6
|
from .transactioncapturecreate import (
|
|
10
7
|
TransactionCaptureCreate,
|
|
11
8
|
TransactionCaptureCreateTypedDict,
|
|
@@ -16,9 +13,10 @@ from gr4vy.utils import (
|
|
|
16
13
|
HeaderMetadata,
|
|
17
14
|
PathParamMetadata,
|
|
18
15
|
RequestMetadata,
|
|
16
|
+
get_discriminator,
|
|
19
17
|
)
|
|
20
18
|
import pydantic
|
|
21
|
-
from pydantic import model_serializer
|
|
19
|
+
from pydantic import Discriminator, Tag, model_serializer
|
|
22
20
|
from typing import List, Optional, Union
|
|
23
21
|
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
24
22
|
|
|
@@ -104,12 +102,27 @@ class CaptureTransactionRequest(BaseModel):
|
|
|
104
102
|
|
|
105
103
|
ResponseCaptureTransactionTypedDict = TypeAliasType(
|
|
106
104
|
"ResponseCaptureTransactionTypedDict",
|
|
107
|
-
Union[
|
|
105
|
+
Union[TransactionCaptureTypedDict, TransactionTypedDict],
|
|
108
106
|
)
|
|
109
107
|
r"""Successful Response"""
|
|
110
108
|
|
|
111
109
|
|
|
112
|
-
ResponseCaptureTransaction =
|
|
113
|
-
|
|
114
|
-
)
|
|
110
|
+
ResponseCaptureTransaction = Annotated[
|
|
111
|
+
Union[
|
|
112
|
+
Annotated[Transaction, Tag("processing")],
|
|
113
|
+
Annotated[Transaction, Tag("authorization_succeeded")],
|
|
114
|
+
Annotated[Transaction, Tag("authorization_declined")],
|
|
115
|
+
Annotated[Transaction, Tag("authorization_failed")],
|
|
116
|
+
Annotated[Transaction, Tag("authorization_voided")],
|
|
117
|
+
Annotated[Transaction, Tag("authorization_void_pending")],
|
|
118
|
+
Annotated[Transaction, Tag("capture_succeeded")],
|
|
119
|
+
Annotated[Transaction, Tag("capture_pending")],
|
|
120
|
+
Annotated[Transaction, Tag("buyer_approval_pending")],
|
|
121
|
+
Annotated[TransactionCapture, Tag("succeeded")],
|
|
122
|
+
Annotated[TransactionCapture, Tag("pending")],
|
|
123
|
+
Annotated[TransactionCapture, Tag("declined")],
|
|
124
|
+
Annotated[TransactionCapture, Tag("failed")],
|
|
125
|
+
],
|
|
126
|
+
Discriminator(lambda m: get_discriminator(m, "status", "status")),
|
|
127
|
+
]
|
|
115
128
|
r"""Successful Response"""
|
gr4vy/models/checkoutsession.py
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .airline import Airline, AirlineTypedDict
|
|
5
5
|
from .cartitem import CartItem, CartItemTypedDict
|
|
6
|
-
from .
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
from .checkoutsessionpaymentmethod import (
|
|
7
|
+
CheckoutSessionPaymentMethod,
|
|
8
|
+
CheckoutSessionPaymentMethodTypedDict,
|
|
9
9
|
)
|
|
10
|
-
from .
|
|
10
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
11
11
|
from datetime import datetime
|
|
12
12
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
13
13
|
from gr4vy.utils import validate_const
|
|
@@ -27,7 +27,7 @@ class CheckoutSessionTypedDict(TypedDict):
|
|
|
27
27
|
r"""An array of cart items that represents the line items of a transaction."""
|
|
28
28
|
metadata: NotRequired[Nullable[Dict[str, str]]]
|
|
29
29
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
30
|
-
buyer: NotRequired[Nullable[
|
|
30
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
31
31
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
32
32
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
33
33
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
@@ -39,7 +39,7 @@ class CheckoutSessionTypedDict(TypedDict):
|
|
|
39
39
|
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
40
40
|
type: Literal["checkout-session"]
|
|
41
41
|
r"""Always `checkout-session`"""
|
|
42
|
-
payment_method: NotRequired[Nullable[
|
|
42
|
+
payment_method: NotRequired[Nullable[CheckoutSessionPaymentMethodTypedDict]]
|
|
43
43
|
r"""Information about the payment method stored on the checkout session."""
|
|
44
44
|
|
|
45
45
|
|
|
@@ -56,7 +56,7 @@ class CheckoutSession(BaseModel):
|
|
|
56
56
|
metadata: OptionalNullable[Dict[str, str]] = UNSET
|
|
57
57
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
58
58
|
|
|
59
|
-
buyer: OptionalNullable[
|
|
59
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
60
60
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
61
61
|
|
|
62
62
|
airline: OptionalNullable[Airline] = UNSET
|
|
@@ -80,7 +80,7 @@ class CheckoutSession(BaseModel):
|
|
|
80
80
|
] = "checkout-session"
|
|
81
81
|
r"""Always `checkout-session`"""
|
|
82
82
|
|
|
83
|
-
payment_method: OptionalNullable[
|
|
83
|
+
payment_method: OptionalNullable[CheckoutSessionPaymentMethod] = UNSET
|
|
84
84
|
r"""Information about the payment method stored on the checkout session."""
|
|
85
85
|
|
|
86
86
|
@model_serializer(mode="wrap")
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .airline import Airline, AirlineTypedDict
|
|
5
5
|
from .cartitem import CartItem, CartItemTypedDict
|
|
6
|
-
from .
|
|
6
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
7
7
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
8
8
|
from pydantic import model_serializer
|
|
9
9
|
from typing import Dict, List, Optional
|
|
@@ -15,7 +15,7 @@ class CheckoutSessionCreateTypedDict(TypedDict):
|
|
|
15
15
|
r"""An array of cart items that represents the line items of a transaction."""
|
|
16
16
|
metadata: NotRequired[Nullable[Dict[str, str]]]
|
|
17
17
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
18
|
-
buyer: NotRequired[Nullable[
|
|
18
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
19
19
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
20
20
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
21
21
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
@@ -36,7 +36,7 @@ class CheckoutSessionCreate(BaseModel):
|
|
|
36
36
|
metadata: OptionalNullable[Dict[str, str]] = UNSET
|
|
37
37
|
r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
|
|
38
38
|
|
|
39
|
-
buyer: OptionalNullable[
|
|
39
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
40
40
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
41
41
|
|
|
42
42
|
airline: OptionalNullable[Airline] = UNSET
|
|
@@ -15,7 +15,7 @@ from typing import Literal, Optional
|
|
|
15
15
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class
|
|
18
|
+
class CheckoutSessionPaymentMethodTypedDict(TypedDict):
|
|
19
19
|
type: Literal["payment-method"]
|
|
20
20
|
r"""Always `payment-method`"""
|
|
21
21
|
id: NotRequired[Nullable[str]]
|
|
@@ -32,7 +32,7 @@ class CheckoutSessionPaymentMethodOutputTypedDict(TypedDict):
|
|
|
32
32
|
r"""The unique hash derived from the card number."""
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
class
|
|
35
|
+
class CheckoutSessionPaymentMethod(BaseModel):
|
|
36
36
|
TYPE: Annotated[
|
|
37
37
|
Annotated[
|
|
38
38
|
Optional[Literal["payment-method"]],
|
|
@@ -14,6 +14,8 @@ class CybersourceOptionsTypedDict(TypedDict):
|
|
|
14
14
|
r"""A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string."""
|
|
15
15
|
ship_to_method: NotRequired[Nullable[str]]
|
|
16
16
|
r"""The shipping method for this transaction."""
|
|
17
|
+
comments: NotRequired[Nullable[str]]
|
|
18
|
+
r"""Brief description of the order or any comment you wish to add to the order."""
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
class CybersourceOptions(BaseModel):
|
|
@@ -26,17 +28,22 @@ class CybersourceOptions(BaseModel):
|
|
|
26
28
|
ship_to_method: OptionalNullable[str] = UNSET
|
|
27
29
|
r"""The shipping method for this transaction."""
|
|
28
30
|
|
|
31
|
+
comments: OptionalNullable[str] = UNSET
|
|
32
|
+
r"""Brief description of the order or any comment you wish to add to the order."""
|
|
33
|
+
|
|
29
34
|
@model_serializer(mode="wrap")
|
|
30
35
|
def serialize_model(self, handler):
|
|
31
36
|
optional_fields = [
|
|
32
37
|
"meta_key_merchant_id",
|
|
33
38
|
"merchant_defined_information",
|
|
34
39
|
"ship_to_method",
|
|
40
|
+
"comments",
|
|
35
41
|
]
|
|
36
42
|
nullable_fields = [
|
|
37
43
|
"meta_key_merchant_id",
|
|
38
44
|
"merchant_defined_information",
|
|
39
45
|
"ship_to_method",
|
|
46
|
+
"comments",
|
|
40
47
|
]
|
|
41
48
|
null_default_fields = []
|
|
42
49
|
|
|
@@ -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/paymentlink.py
CHANGED
|
@@ -5,10 +5,7 @@ from .cartitem import CartItem, CartItemTypedDict
|
|
|
5
5
|
from .paymentlinkstatus import PaymentLinkStatus
|
|
6
6
|
from .shippingdetails import ShippingDetails, ShippingDetailsTypedDict
|
|
7
7
|
from .statementdescriptor import StatementDescriptor, StatementDescriptorTypedDict
|
|
8
|
-
from .
|
|
9
|
-
TransactionBuyerOutput,
|
|
10
|
-
TransactionBuyerOutputTypedDict,
|
|
11
|
-
)
|
|
8
|
+
from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
|
|
12
9
|
from .transactionintent import TransactionIntent
|
|
13
10
|
from .transactionpaymentsource import TransactionPaymentSource
|
|
14
11
|
from datetime import datetime
|
|
@@ -70,7 +67,7 @@ class PaymentLinkTypedDict(TypedDict):
|
|
|
70
67
|
r"""The return URL after payment completion."""
|
|
71
68
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
72
69
|
r"""Arbitrary metadata for the payment link."""
|
|
73
|
-
buyer: NotRequired[Nullable[
|
|
70
|
+
buyer: NotRequired[Nullable[TransactionBuyerTypedDict]]
|
|
74
71
|
r"""The buyer associated with the payment link."""
|
|
75
72
|
shipping_details: NotRequired[Nullable[ShippingDetailsTypedDict]]
|
|
76
73
|
r"""The shipping details for the payment link."""
|
|
@@ -160,7 +157,7 @@ class PaymentLink(BaseModel):
|
|
|
160
157
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
|
161
158
|
r"""Arbitrary metadata for the payment link."""
|
|
162
159
|
|
|
163
|
-
buyer: OptionalNullable[
|
|
160
|
+
buyer: OptionalNullable[TransactionBuyer] = UNSET
|
|
164
161
|
r"""The buyer associated with the payment link."""
|
|
165
162
|
|
|
166
163
|
shipping_details: OptionalNullable[ShippingDetails] = UNSET
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cartitem import CartItem, CartItemTypedDict
|
|
5
|
-
from .
|
|
5
|
+
from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
|
|
6
6
|
from .statementdescriptor import StatementDescriptor, StatementDescriptorTypedDict
|
|
7
7
|
from .transactionconnectionoptions import (
|
|
8
8
|
TransactionConnectionOptions,
|
|
@@ -26,7 +26,7 @@ class PaymentLinkCreateTypedDict(TypedDict):
|
|
|
26
26
|
r"""The country code for the payment link."""
|
|
27
27
|
currency: str
|
|
28
28
|
r"""The currency code for the payment link."""
|
|
29
|
-
buyer: NotRequired[Nullable[
|
|
29
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
30
30
|
r"""The guest buyer for the payment link."""
|
|
31
31
|
expires_at: NotRequired[Nullable[datetime]]
|
|
32
32
|
r"""The expiration date and time for the payment link."""
|
|
@@ -73,7 +73,7 @@ class PaymentLinkCreate(BaseModel):
|
|
|
73
73
|
currency: str
|
|
74
74
|
r"""The currency code for the payment link."""
|
|
75
75
|
|
|
76
|
-
buyer: OptionalNullable[
|
|
76
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
77
77
|
r"""The guest buyer for the payment link."""
|
|
78
78
|
|
|
79
79
|
expires_at: OptionalNullable[datetime] = UNSET
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
PaymentMethodSummaryOutput,
|
|
6
|
-
PaymentMethodSummaryOutputTypedDict,
|
|
7
|
-
)
|
|
4
|
+
from .paymentmethodsummary import PaymentMethodSummary, PaymentMethodSummaryTypedDict
|
|
8
5
|
from gr4vy.types import BaseModel
|
|
9
6
|
from typing import List
|
|
10
7
|
from typing_extensions import TypedDict
|
|
11
8
|
|
|
12
9
|
|
|
13
10
|
class PaymentMethodSummariesTypedDict(TypedDict):
|
|
14
|
-
items: List[
|
|
11
|
+
items: List[PaymentMethodSummaryTypedDict]
|
|
15
12
|
r"""A list of items returned for this request."""
|
|
16
13
|
|
|
17
14
|
|
|
18
15
|
class PaymentMethodSummaries(BaseModel):
|
|
19
|
-
items: List[
|
|
16
|
+
items: List[PaymentMethodSummary]
|
|
20
17
|
r"""A list of items returned for this request."""
|
|
@@ -18,7 +18,7 @@ from typing import List, Literal, Optional
|
|
|
18
18
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class PaymentMethodSummaryTypedDict(TypedDict):
|
|
22
22
|
r"""Payment Method
|
|
23
23
|
|
|
24
24
|
A summary of a payment method.
|
|
@@ -65,7 +65,7 @@ class PaymentMethodSummaryOutputTypedDict(TypedDict):
|
|
|
65
65
|
r"""The timestamp when this payment method was last used in a transaction."""
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
class
|
|
68
|
+
class PaymentMethodSummary(BaseModel):
|
|
69
69
|
r"""Payment Method
|
|
70
70
|
|
|
71
71
|
A summary of a payment method.
|
|
@@ -38,7 +38,7 @@ Context = TypeAliasType(
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class PaymentOptionTypedDict(TypedDict):
|
|
42
42
|
method: str
|
|
43
43
|
mode: Mode
|
|
44
44
|
can_store_payment_method: bool
|
|
@@ -49,7 +49,7 @@ class PaymentOptionOutputTypedDict(TypedDict):
|
|
|
49
49
|
context: NotRequired[Nullable[ContextTypedDict]]
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
class
|
|
52
|
+
class PaymentOption(BaseModel):
|
|
53
53
|
method: str
|
|
54
54
|
|
|
55
55
|
mode: Annotated[Mode, PlainValidator(validate_open_enum(False))]
|
gr4vy/models/paymentoptions.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .paymentoption import PaymentOption, PaymentOptionTypedDict
|
|
5
5
|
from gr4vy.types import BaseModel
|
|
6
6
|
from typing import List
|
|
7
7
|
from typing_extensions import TypedDict
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class PaymentOptionsTypedDict(TypedDict):
|
|
11
|
-
items: List[
|
|
11
|
+
items: List[PaymentOptionTypedDict]
|
|
12
12
|
r"""A list of items returned for this request."""
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class PaymentOptions(BaseModel):
|
|
16
|
-
items: List[
|
|
16
|
+
items: List[PaymentOption]
|
|
17
17
|
r"""A list of items returned for this request."""
|
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,
|
|
@@ -54,7 +54,7 @@ class PayoutCreateTypedDict(TypedDict):
|
|
|
54
54
|
r"""A value that can be used to match the payout against your own records."""
|
|
55
55
|
buyer_id: NotRequired[Nullable[str]]
|
|
56
56
|
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[
|
|
57
|
+
buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
|
|
58
58
|
r"""Inline buyer details for the payout. Use this instead of the `buyer_id` or `buyer_external_identifier`."""
|
|
59
59
|
buyer_external_identifier: NotRequired[Nullable[str]]
|
|
60
60
|
r"""The `external_identifier` of a stored buyer to use for this payout. Use this instead of the `buyer_id` or `buyer`."""
|
|
@@ -93,7 +93,7 @@ class PayoutCreate(BaseModel):
|
|
|
93
93
|
buyer_id: OptionalNullable[str] = UNSET
|
|
94
94
|
r"""The `id` of a stored buyer to use for this payout Use this instead of the `buyer` or `buyer_external_identifier`."""
|
|
95
95
|
|
|
96
|
-
buyer: OptionalNullable[
|
|
96
|
+
buyer: OptionalNullable[GuestBuyer] = UNSET
|
|
97
97
|
r"""Inline buyer details for the payout. Use this instead of the `buyer_id` or `buyer_external_identifier`."""
|
|
98
98
|
|
|
99
99
|
buyer_external_identifier: OptionalNullable[str] = UNSET
|
gr4vy/models/payoutsummary.py
CHANGED
|
@@ -5,13 +5,10 @@ from .payoutcategory import PayoutCategory
|
|
|
5
5
|
from .payoutmerchantsummary import PayoutMerchantSummary, PayoutMerchantSummaryTypedDict
|
|
6
6
|
from .payoutpaymentservice import PayoutPaymentService, PayoutPaymentServiceTypedDict
|
|
7
7
|
from .payoutstatus import PayoutStatus
|
|
8
|
-
from .
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
from .transactionpaymentmethod_output import (
|
|
13
|
-
TransactionPaymentMethodOutput,
|
|
14
|
-
TransactionPaymentMethodOutputTypedDict,
|
|
8
|
+
from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
|
|
9
|
+
from .transactionpaymentmethod import (
|
|
10
|
+
TransactionPaymentMethod,
|
|
11
|
+
TransactionPaymentMethodTypedDict,
|
|
15
12
|
)
|
|
16
13
|
from datetime import datetime
|
|
17
14
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
@@ -35,7 +32,7 @@ class PayoutSummaryTypedDict(TypedDict):
|
|
|
35
32
|
r"""The date this payout was created at."""
|
|
36
33
|
currency: str
|
|
37
34
|
r"""A supported ISO-4217 currency code."""
|
|
38
|
-
payment_method:
|
|
35
|
+
payment_method: TransactionPaymentMethodTypedDict
|
|
39
36
|
payment_service: PayoutPaymentServiceTypedDict
|
|
40
37
|
status: PayoutStatus
|
|
41
38
|
updated_at: datetime
|
|
@@ -44,7 +41,7 @@ class PayoutSummaryTypedDict(TypedDict):
|
|
|
44
41
|
r"""Always `payout`."""
|
|
45
42
|
id: NotRequired[Nullable[str]]
|
|
46
43
|
r"""The ID for the payout."""
|
|
47
|
-
buyer: NotRequired[Nullable[
|
|
44
|
+
buyer: NotRequired[Nullable[TransactionBuyerTypedDict]]
|
|
48
45
|
r"""The buyer used for this payout."""
|
|
49
46
|
category: NotRequired[Nullable[PayoutCategory]]
|
|
50
47
|
r"""The type of payout to process."""
|
|
@@ -73,7 +70,7 @@ class PayoutSummary(BaseModel):
|
|
|
73
70
|
currency: str
|
|
74
71
|
r"""A supported ISO-4217 currency code."""
|
|
75
72
|
|
|
76
|
-
payment_method:
|
|
73
|
+
payment_method: TransactionPaymentMethod
|
|
77
74
|
|
|
78
75
|
payment_service: PayoutPaymentService
|
|
79
76
|
|
|
@@ -93,7 +90,7 @@ class PayoutSummary(BaseModel):
|
|
|
93
90
|
id: OptionalNullable[str] = UNSET
|
|
94
91
|
r"""The ID for the payout."""
|
|
95
92
|
|
|
96
|
-
buyer: OptionalNullable[
|
|
93
|
+
buyer: OptionalNullable[TransactionBuyer] = UNSET
|
|
97
94
|
r"""The buyer used for this payout."""
|
|
98
95
|
|
|
99
96
|
category: Annotated[
|
|
@@ -13,15 +13,12 @@ from .method import Method
|
|
|
13
13
|
from .recipient import Recipient, RecipientTypedDict
|
|
14
14
|
from .shippingdetails import ShippingDetails, ShippingDetailsTypedDict
|
|
15
15
|
from .statementdescriptor import StatementDescriptor, StatementDescriptorTypedDict
|
|
16
|
-
from .
|
|
17
|
-
TransactionBuyerOutput,
|
|
18
|
-
TransactionBuyerOutputTypedDict,
|
|
19
|
-
)
|
|
16
|
+
from .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
|
|
20
17
|
from .transactionintent import TransactionIntent
|
|
21
18
|
from .transactionintentoutcome import TransactionIntentOutcome
|
|
22
|
-
from .
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
from .transactionpaymentmethod import (
|
|
20
|
+
TransactionPaymentMethod,
|
|
21
|
+
TransactionPaymentMethodTypedDict,
|
|
25
22
|
)
|
|
26
23
|
from .transactionpaymentservice import (
|
|
27
24
|
TransactionPaymentService,
|
|
@@ -29,9 +26,9 @@ from .transactionpaymentservice import (
|
|
|
29
26
|
)
|
|
30
27
|
from .transactionpaymentsource import TransactionPaymentSource
|
|
31
28
|
from .transactionstatus import TransactionStatus
|
|
32
|
-
from .
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
from .transactionthreedsecuresummary import (
|
|
30
|
+
TransactionThreeDSecureSummary,
|
|
31
|
+
TransactionThreeDSecureSummaryTypedDict,
|
|
35
32
|
)
|
|
36
33
|
from datetime import datetime
|
|
37
34
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
@@ -43,7 +40,7 @@ from typing import Dict, List, Literal, Optional
|
|
|
43
40
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
44
41
|
|
|
45
42
|
|
|
46
|
-
class
|
|
43
|
+
class TransactionTypedDict(TypedDict):
|
|
47
44
|
r"""A full transaction resource."""
|
|
48
45
|
|
|
49
46
|
id: str
|
|
@@ -95,7 +92,7 @@ class TransactionOutputTypedDict(TypedDict):
|
|
|
95
92
|
r"""The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing."""
|
|
96
93
|
external_identifier: NotRequired[Nullable[str]]
|
|
97
94
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
98
|
-
payment_method: NotRequired[Nullable[
|
|
95
|
+
payment_method: NotRequired[Nullable[TransactionPaymentMethodTypedDict]]
|
|
99
96
|
r"""The payment method used for this transaction."""
|
|
100
97
|
method: NotRequired[Nullable[Method]]
|
|
101
98
|
r"""The method used for the transaction."""
|
|
@@ -107,7 +104,7 @@ class TransactionOutputTypedDict(TypedDict):
|
|
|
107
104
|
r"""The payment service used for this transaction."""
|
|
108
105
|
pending_review: NotRequired[bool]
|
|
109
106
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
110
|
-
buyer: NotRequired[Nullable[
|
|
107
|
+
buyer: NotRequired[Nullable[TransactionBuyerTypedDict]]
|
|
111
108
|
r"""The buyer used for this transaction."""
|
|
112
109
|
raw_response_code: NotRequired[Nullable[str]]
|
|
113
110
|
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."""
|
|
@@ -135,7 +132,7 @@ class TransactionOutputTypedDict(TypedDict):
|
|
|
135
132
|
r"""The statement descriptor is the text to be shown on the buyer's statements."""
|
|
136
133
|
scheme_transaction_id: NotRequired[Nullable[str]]
|
|
137
134
|
r"""An identifier for the transaction used by the scheme itself, when available."""
|
|
138
|
-
three_d_secure: NotRequired[Nullable[
|
|
135
|
+
three_d_secure: NotRequired[Nullable[TransactionThreeDSecureSummaryTypedDict]]
|
|
139
136
|
r"""The 3-D Secure data that was sent to the payment service for the transaction."""
|
|
140
137
|
payment_service_transaction_id: NotRequired[Nullable[str]]
|
|
141
138
|
r"""The payment service's unique ID for the transaction."""
|
|
@@ -181,7 +178,7 @@ class TransactionOutputTypedDict(TypedDict):
|
|
|
181
178
|
r"""Total shipping amount."""
|
|
182
179
|
|
|
183
180
|
|
|
184
|
-
class
|
|
181
|
+
class Transaction(BaseModel):
|
|
185
182
|
r"""A full transaction resource."""
|
|
186
183
|
|
|
187
184
|
id: str
|
|
@@ -269,7 +266,7 @@ class TransactionOutput(BaseModel):
|
|
|
269
266
|
external_identifier: OptionalNullable[str] = UNSET
|
|
270
267
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
271
268
|
|
|
272
|
-
payment_method: OptionalNullable[
|
|
269
|
+
payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
|
|
273
270
|
r"""The payment method used for this transaction."""
|
|
274
271
|
|
|
275
272
|
method: Annotated[
|
|
@@ -291,7 +288,7 @@ class TransactionOutput(BaseModel):
|
|
|
291
288
|
pending_review: Optional[bool] = False
|
|
292
289
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
293
290
|
|
|
294
|
-
buyer: OptionalNullable[
|
|
291
|
+
buyer: OptionalNullable[TransactionBuyer] = UNSET
|
|
295
292
|
r"""The buyer used for this transaction."""
|
|
296
293
|
|
|
297
294
|
raw_response_code: OptionalNullable[str] = UNSET
|
|
@@ -339,7 +336,7 @@ class TransactionOutput(BaseModel):
|
|
|
339
336
|
scheme_transaction_id: OptionalNullable[str] = UNSET
|
|
340
337
|
r"""An identifier for the transaction used by the scheme itself, when available."""
|
|
341
338
|
|
|
342
|
-
three_d_secure: OptionalNullable[
|
|
339
|
+
three_d_secure: OptionalNullable[TransactionThreeDSecureSummary] = UNSET
|
|
343
340
|
r"""The 3-D Secure data that was sent to the payment service for the transaction."""
|
|
344
341
|
|
|
345
342
|
payment_service_transaction_id: OptionalNullable[str] = UNSET
|
|
@@ -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
|
|
@@ -11,7 +11,7 @@ from typing import Literal, Optional
|
|
|
11
11
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class TransactionBuyerTypedDict(TypedDict):
|
|
15
15
|
type: Literal["buyer"]
|
|
16
16
|
r"""Always `buyer`."""
|
|
17
17
|
id: NotRequired[Nullable[str]]
|
|
@@ -20,13 +20,13 @@ class TransactionBuyerOutputTypedDict(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."""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class TransactionBuyer(BaseModel):
|
|
30
30
|
TYPE: Annotated[
|
|
31
31
|
Annotated[Optional[Literal["buyer"]], AfterValidator(validate_const("buyer"))],
|
|
32
32
|
pydantic.Field(alias="type"),
|
|
@@ -42,7 +42,7 @@ class TransactionBuyerOutput(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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cancelstatus import CancelStatus
|
|
5
|
-
from .
|
|
5
|
+
from .transaction import Transaction, TransactionTypedDict
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
7
7
|
from gr4vy.utils import validate_const, validate_open_enum
|
|
8
8
|
import pydantic
|
|
@@ -20,7 +20,7 @@ class TransactionCancelTypedDict(TypedDict):
|
|
|
20
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
21
|
raw_response_description: Nullable[str]
|
|
22
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:
|
|
23
|
+
transaction: TransactionTypedDict
|
|
24
24
|
r"""A full transaction resource."""
|
|
25
25
|
type: Literal["transaction-cancel"]
|
|
26
26
|
r"""Always `transaction-cancel`."""
|
|
@@ -38,7 +38,7 @@ class TransactionCancel(BaseModel):
|
|
|
38
38
|
raw_response_description: Nullable[str]
|
|
39
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
40
|
|
|
41
|
-
transaction:
|
|
41
|
+
transaction: Transaction
|
|
42
42
|
r"""A full transaction resource."""
|
|
43
43
|
|
|
44
44
|
TYPE: Annotated[
|