gr4vy 1.5.6__py3-none-any.whl → 1.7.1__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/checkout_sessions.py +20 -2
- gr4vy/models/__init__.py +137 -78
- gr4vy/models/auditlogentries.py +3 -3
- gr4vy/models/{auditlogentry.py → auditlogentry_output.py} +2 -2
- gr4vy/models/capture_transactionop.py +7 -4
- gr4vy/models/checkoutsession.py +26 -5
- gr4vy/models/checkoutsessioncreate.py +36 -2
- gr4vy/models/{checkoutsessionpaymentmethod.py → checkoutsessionpaymentmethod_output.py} +2 -2
- gr4vy/models/create_payment_methodop.py +6 -0
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -3
- gr4vy/models/instrumenttype.py +1 -0
- gr4vy/models/integrationclient.py +16 -0
- gr4vy/models/monatospeioptions.py +15 -0
- gr4vy/models/paymentlink.py +6 -3
- gr4vy/models/paymentmethodsummaries.py +6 -3
- gr4vy/models/{paymentmethodsummary.py → paymentmethodsummary_output.py} +2 -2
- gr4vy/models/{paymentoption.py → paymentoption_output.py} +2 -2
- gr4vy/models/paymentoptions.py +3 -3
- gr4vy/models/paymentservicedefinition.py +9 -1
- gr4vy/models/payoutsummary.py +11 -8
- gr4vy/models/paypaloptions.py +8 -2
- gr4vy/models/paypalshippingoptions.py +51 -0
- gr4vy/models/paypalshippingoptionsitem.py +94 -0
- gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
- gr4vy/models/plaidpaymentmethodcreate.py +99 -0
- gr4vy/models/{transaction.py → transaction_output.py} +25 -15
- gr4vy/models/{transactionbuyer.py → transactionbuyer_output.py} +2 -2
- gr4vy/models/transactioncancel.py +3 -3
- gr4vy/models/{transactioncapture.py → transactioncapture_output.py} +5 -5
- gr4vy/models/transactionconnectionoptions.py +10 -0
- gr4vy/models/transactioncreate.py +16 -0
- gr4vy/models/{transactionevent.py → transactionevent_output.py} +2 -2
- gr4vy/models/transactionevents.py +6 -3
- gr4vy/models/{transactionpaymentmethod.py → transactionpaymentmethod_output.py} +2 -2
- gr4vy/models/transactionsummaries.py +6 -3
- gr4vy/models/{transactionsummary.py → transactionsummary_output.py} +13 -10
- gr4vy/models/{transactionthreedsecuresummary.py → transactionthreedsecuresummary_output.py} +2 -2
- gr4vy/models/{transactionvoid.py → transactionvoid_output.py} +5 -5
- gr4vy/models/void_transactionop.py +7 -4
- gr4vy/transactions.py +22 -16
- {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/METADATA +3 -3
- {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/RECORD +44 -38
- {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/WHEEL +0 -0
gr4vy/models/checkoutsession.py
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
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_output import (
|
|
7
|
+
CheckoutSessionPaymentMethodOutput,
|
|
8
|
+
CheckoutSessionPaymentMethodOutputTypedDict,
|
|
9
9
|
)
|
|
10
10
|
from .guestbuyer_output import GuestBuyerOutput, GuestBuyerOutputTypedDict
|
|
11
11
|
from datetime import datetime
|
|
@@ -31,9 +31,15 @@ class CheckoutSessionTypedDict(TypedDict):
|
|
|
31
31
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
32
32
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
33
33
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
34
|
+
amount: NotRequired[Nullable[int]]
|
|
35
|
+
r"""The total amount for this transaction."""
|
|
36
|
+
currency: NotRequired[Nullable[str]]
|
|
37
|
+
r"""The currency code for this transaction."""
|
|
38
|
+
payment_service_id: NotRequired[Nullable[str]]
|
|
39
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
34
40
|
type: Literal["checkout-session"]
|
|
35
41
|
r"""Always `checkout-session`"""
|
|
36
|
-
payment_method: NotRequired[Nullable[
|
|
42
|
+
payment_method: NotRequired[Nullable[CheckoutSessionPaymentMethodOutputTypedDict]]
|
|
37
43
|
r"""Information about the payment method stored on the checkout session."""
|
|
38
44
|
|
|
39
45
|
|
|
@@ -56,6 +62,15 @@ class CheckoutSession(BaseModel):
|
|
|
56
62
|
airline: OptionalNullable[Airline] = UNSET
|
|
57
63
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
58
64
|
|
|
65
|
+
amount: OptionalNullable[int] = UNSET
|
|
66
|
+
r"""The total amount for this transaction."""
|
|
67
|
+
|
|
68
|
+
currency: OptionalNullable[str] = UNSET
|
|
69
|
+
r"""The currency code for this transaction."""
|
|
70
|
+
|
|
71
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
72
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
73
|
+
|
|
59
74
|
TYPE: Annotated[
|
|
60
75
|
Annotated[
|
|
61
76
|
Optional[Literal["checkout-session"]],
|
|
@@ -65,7 +80,7 @@ class CheckoutSession(BaseModel):
|
|
|
65
80
|
] = "checkout-session"
|
|
66
81
|
r"""Always `checkout-session`"""
|
|
67
82
|
|
|
68
|
-
payment_method: OptionalNullable[
|
|
83
|
+
payment_method: OptionalNullable[CheckoutSessionPaymentMethodOutput] = UNSET
|
|
69
84
|
r"""Information about the payment method stored on the checkout session."""
|
|
70
85
|
|
|
71
86
|
@model_serializer(mode="wrap")
|
|
@@ -75,6 +90,9 @@ class CheckoutSession(BaseModel):
|
|
|
75
90
|
"metadata",
|
|
76
91
|
"buyer",
|
|
77
92
|
"airline",
|
|
93
|
+
"amount",
|
|
94
|
+
"currency",
|
|
95
|
+
"payment_service_id",
|
|
78
96
|
"type",
|
|
79
97
|
"payment_method",
|
|
80
98
|
]
|
|
@@ -83,6 +101,9 @@ class CheckoutSession(BaseModel):
|
|
|
83
101
|
"metadata",
|
|
84
102
|
"buyer",
|
|
85
103
|
"airline",
|
|
104
|
+
"amount",
|
|
105
|
+
"currency",
|
|
106
|
+
"payment_service_id",
|
|
86
107
|
"payment_method",
|
|
87
108
|
]
|
|
88
109
|
null_default_fields = []
|
|
@@ -19,7 +19,14 @@ class CheckoutSessionCreateTypedDict(TypedDict):
|
|
|
19
19
|
r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
|
|
20
20
|
airline: NotRequired[Nullable[AirlineTypedDict]]
|
|
21
21
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
22
|
+
amount: NotRequired[Nullable[int]]
|
|
23
|
+
r"""The total amount for this transaction."""
|
|
24
|
+
currency: NotRequired[Nullable[str]]
|
|
25
|
+
r"""The currency code for this transaction."""
|
|
26
|
+
payment_service_id: NotRequired[Nullable[str]]
|
|
27
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
22
28
|
expires_in: NotRequired[float]
|
|
29
|
+
r"""The time in seconds when this checkout session expires."""
|
|
23
30
|
|
|
24
31
|
|
|
25
32
|
class CheckoutSessionCreate(BaseModel):
|
|
@@ -35,12 +42,39 @@ class CheckoutSessionCreate(BaseModel):
|
|
|
35
42
|
airline: OptionalNullable[Airline] = UNSET
|
|
36
43
|
r"""The airline addendum data which describes the airline booking associated with this transaction."""
|
|
37
44
|
|
|
45
|
+
amount: OptionalNullable[int] = UNSET
|
|
46
|
+
r"""The total amount for this transaction."""
|
|
47
|
+
|
|
48
|
+
currency: OptionalNullable[str] = UNSET
|
|
49
|
+
r"""The currency code for this transaction."""
|
|
50
|
+
|
|
51
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
52
|
+
r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
|
|
53
|
+
|
|
38
54
|
expires_in: Optional[float] = 3600
|
|
55
|
+
r"""The time in seconds when this checkout session expires."""
|
|
39
56
|
|
|
40
57
|
@model_serializer(mode="wrap")
|
|
41
58
|
def serialize_model(self, handler):
|
|
42
|
-
optional_fields = [
|
|
43
|
-
|
|
59
|
+
optional_fields = [
|
|
60
|
+
"cart_items",
|
|
61
|
+
"metadata",
|
|
62
|
+
"buyer",
|
|
63
|
+
"airline",
|
|
64
|
+
"amount",
|
|
65
|
+
"currency",
|
|
66
|
+
"payment_service_id",
|
|
67
|
+
"expires_in",
|
|
68
|
+
]
|
|
69
|
+
nullable_fields = [
|
|
70
|
+
"cart_items",
|
|
71
|
+
"metadata",
|
|
72
|
+
"buyer",
|
|
73
|
+
"airline",
|
|
74
|
+
"amount",
|
|
75
|
+
"currency",
|
|
76
|
+
"payment_service_id",
|
|
77
|
+
]
|
|
44
78
|
null_default_fields = []
|
|
45
79
|
|
|
46
80
|
serialized = handler(self)
|
|
@@ -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 CheckoutSessionPaymentMethodOutputTypedDict(TypedDict):
|
|
19
19
|
type: Literal["payment-method"]
|
|
20
20
|
r"""Always `payment-method`"""
|
|
21
21
|
id: NotRequired[Nullable[str]]
|
|
@@ -32,7 +32,7 @@ class CheckoutSessionPaymentMethodTypedDict(TypedDict):
|
|
|
32
32
|
r"""The unique hash derived from the card number."""
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
class
|
|
35
|
+
class CheckoutSessionPaymentMethodOutput(BaseModel):
|
|
36
36
|
TYPE: Annotated[
|
|
37
37
|
Annotated[
|
|
38
38
|
Optional[Literal["payment-method"]],
|
|
@@ -9,6 +9,10 @@ from .checkoutsessionpaymentmethodcreate import (
|
|
|
9
9
|
CheckoutSessionPaymentMethodCreate,
|
|
10
10
|
CheckoutSessionPaymentMethodCreateTypedDict,
|
|
11
11
|
)
|
|
12
|
+
from .plaidpaymentmethodcreate import (
|
|
13
|
+
PlaidPaymentMethodCreate,
|
|
14
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
15
|
+
)
|
|
12
16
|
from .redirectpaymentmethodcreate import (
|
|
13
17
|
RedirectPaymentMethodCreate,
|
|
14
18
|
RedirectPaymentMethodCreateTypedDict,
|
|
@@ -38,6 +42,7 @@ BodyTypedDict = TypeAliasType(
|
|
|
38
42
|
"BodyTypedDict",
|
|
39
43
|
Union[
|
|
40
44
|
CheckoutSessionPaymentMethodCreateTypedDict,
|
|
45
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
41
46
|
RedirectPaymentMethodCreateTypedDict,
|
|
42
47
|
CardPaymentMethodCreateTypedDict,
|
|
43
48
|
],
|
|
@@ -48,6 +53,7 @@ Body = TypeAliasType(
|
|
|
48
53
|
"Body",
|
|
49
54
|
Union[
|
|
50
55
|
CheckoutSessionPaymentMethodCreate,
|
|
56
|
+
PlaidPaymentMethodCreate,
|
|
51
57
|
RedirectPaymentMethodCreate,
|
|
52
58
|
CardPaymentMethodCreate,
|
|
53
59
|
],
|
|
@@ -16,7 +16,7 @@ from typing import Literal, Union
|
|
|
16
16
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
ForterAntiFraudOptionsCartItemBasicItemDataType = Union[
|
|
20
20
|
Literal[
|
|
21
21
|
"TANGIBLE",
|
|
22
22
|
"NON_TANGIBLE",
|
|
@@ -26,13 +26,14 @@ Type = Union[
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class ForterAntiFraudOptionsCartItemBasicItemDataTypedDict(TypedDict):
|
|
29
|
-
type: NotRequired[Nullable[
|
|
29
|
+
type: NotRequired[Nullable[ForterAntiFraudOptionsCartItemBasicItemDataType]]
|
|
30
30
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class ForterAntiFraudOptionsCartItemBasicItemData(BaseModel):
|
|
34
34
|
type: Annotated[
|
|
35
|
-
OptionalNullable[
|
|
35
|
+
OptionalNullable[ForterAntiFraudOptionsCartItemBasicItemDataType],
|
|
36
|
+
PlainValidator(validate_open_enum(False)),
|
|
36
37
|
] = UNSET
|
|
37
38
|
r"""Indicates whether the item is a physical good or a service/digital item."""
|
|
38
39
|
|
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
|
+
]
|
|
@@ -0,0 +1,15 @@
|
|
|
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 MonatoSpeiOptionsTypedDict(TypedDict):
|
|
9
|
+
approval_url: str
|
|
10
|
+
r"""Approval URL that will receive a charge payment method reference."""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MonatoSpeiOptions(BaseModel):
|
|
14
|
+
approval_url: str
|
|
15
|
+
r"""Approval URL that will receive a charge payment method reference."""
|
gr4vy/models/paymentlink.py
CHANGED
|
@@ -5,7 +5,10 @@ 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 .
|
|
8
|
+
from .transactionbuyer_output import (
|
|
9
|
+
TransactionBuyerOutput,
|
|
10
|
+
TransactionBuyerOutputTypedDict,
|
|
11
|
+
)
|
|
9
12
|
from .transactionintent import TransactionIntent
|
|
10
13
|
from .transactionpaymentsource import TransactionPaymentSource
|
|
11
14
|
from datetime import datetime
|
|
@@ -67,7 +70,7 @@ class PaymentLinkTypedDict(TypedDict):
|
|
|
67
70
|
r"""The return URL after payment completion."""
|
|
68
71
|
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
|
69
72
|
r"""Arbitrary metadata for the payment link."""
|
|
70
|
-
buyer: NotRequired[Nullable[
|
|
73
|
+
buyer: NotRequired[Nullable[TransactionBuyerOutputTypedDict]]
|
|
71
74
|
r"""The buyer associated with the payment link."""
|
|
72
75
|
shipping_details: NotRequired[Nullable[ShippingDetailsTypedDict]]
|
|
73
76
|
r"""The shipping details for the payment link."""
|
|
@@ -157,7 +160,7 @@ class PaymentLink(BaseModel):
|
|
|
157
160
|
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
|
158
161
|
r"""Arbitrary metadata for the payment link."""
|
|
159
162
|
|
|
160
|
-
buyer: OptionalNullable[
|
|
163
|
+
buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
|
|
161
164
|
r"""The buyer associated with the payment link."""
|
|
162
165
|
|
|
163
166
|
shipping_details: OptionalNullable[ShippingDetails] = UNSET
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .paymentmethodsummary_output import (
|
|
5
|
+
PaymentMethodSummaryOutput,
|
|
6
|
+
PaymentMethodSummaryOutputTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from gr4vy.types import BaseModel
|
|
6
9
|
from typing import List
|
|
7
10
|
from typing_extensions import TypedDict
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
class PaymentMethodSummariesTypedDict(TypedDict):
|
|
11
|
-
items: List[
|
|
14
|
+
items: List[PaymentMethodSummaryOutputTypedDict]
|
|
12
15
|
r"""A list of items returned for this request."""
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
class PaymentMethodSummaries(BaseModel):
|
|
16
|
-
items: List[
|
|
19
|
+
items: List[PaymentMethodSummaryOutput]
|
|
17
20
|
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 PaymentMethodSummaryOutputTypedDict(TypedDict):
|
|
22
22
|
r"""Payment Method
|
|
23
23
|
|
|
24
24
|
A summary of a payment method.
|
|
@@ -65,7 +65,7 @@ class PaymentMethodSummaryTypedDict(TypedDict):
|
|
|
65
65
|
r"""The timestamp when this payment method was last used in a transaction."""
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
class
|
|
68
|
+
class PaymentMethodSummaryOutput(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 PaymentOptionOutputTypedDict(TypedDict):
|
|
42
42
|
method: str
|
|
43
43
|
mode: Mode
|
|
44
44
|
can_store_payment_method: bool
|
|
@@ -49,7 +49,7 @@ class PaymentOptionTypedDict(TypedDict):
|
|
|
49
49
|
context: NotRequired[Nullable[ContextTypedDict]]
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
class
|
|
52
|
+
class PaymentOptionOutput(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_output import PaymentOptionOutput, PaymentOptionOutputTypedDict
|
|
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[PaymentOptionOutputTypedDict]
|
|
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[PaymentOptionOutput]
|
|
17
17
|
r"""A list of items returned for this request."""
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .definitionfield import DefinitionField, DefinitionFieldTypedDict
|
|
5
|
+
from .integrationclient import IntegrationClient
|
|
5
6
|
from .method import Method
|
|
6
7
|
from .mode import Mode
|
|
7
8
|
from .paymentserviceconfiguration import (
|
|
@@ -41,6 +42,8 @@ class PaymentServiceDefinitionTypedDict(TypedDict):
|
|
|
41
42
|
required_checkout_fields: List[RequiredCheckoutFieldsTypedDict]
|
|
42
43
|
r"""A list of condition that define when some fields must be provided with a transaction request."""
|
|
43
44
|
configuration: PaymentServiceConfigurationTypedDict
|
|
45
|
+
supported_integration_clients: Nullable[List[IntegrationClient]]
|
|
46
|
+
r"""List of supported integration clients. Defaults to redirect for most redirect connectors."""
|
|
44
47
|
type: Literal["payment-service-definition"]
|
|
45
48
|
r"""Always `payment-service-definition`."""
|
|
46
49
|
icon_url: NotRequired[Nullable[str]]
|
|
@@ -78,6 +81,11 @@ class PaymentServiceDefinition(BaseModel):
|
|
|
78
81
|
|
|
79
82
|
configuration: PaymentServiceConfiguration
|
|
80
83
|
|
|
84
|
+
supported_integration_clients: Nullable[
|
|
85
|
+
List[Annotated[IntegrationClient, PlainValidator(validate_open_enum(False))]]
|
|
86
|
+
]
|
|
87
|
+
r"""List of supported integration clients. Defaults to redirect for most redirect connectors."""
|
|
88
|
+
|
|
81
89
|
TYPE: Annotated[
|
|
82
90
|
Annotated[
|
|
83
91
|
Optional[Literal["payment-service-definition"]],
|
|
@@ -93,7 +101,7 @@ class PaymentServiceDefinition(BaseModel):
|
|
|
93
101
|
@model_serializer(mode="wrap")
|
|
94
102
|
def serialize_model(self, handler):
|
|
95
103
|
optional_fields = ["type", "icon_url"]
|
|
96
|
-
nullable_fields = ["icon_url"]
|
|
104
|
+
nullable_fields = ["icon_url", "supported_integration_clients"]
|
|
97
105
|
null_default_fields = []
|
|
98
106
|
|
|
99
107
|
serialized = handler(self)
|
gr4vy/models/payoutsummary.py
CHANGED
|
@@ -5,10 +5,13 @@ 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
|
-
|
|
8
|
+
from .transactionbuyer_output import (
|
|
9
|
+
TransactionBuyerOutput,
|
|
10
|
+
TransactionBuyerOutputTypedDict,
|
|
11
|
+
)
|
|
12
|
+
from .transactionpaymentmethod_output import (
|
|
13
|
+
TransactionPaymentMethodOutput,
|
|
14
|
+
TransactionPaymentMethodOutputTypedDict,
|
|
12
15
|
)
|
|
13
16
|
from datetime import datetime
|
|
14
17
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
@@ -32,7 +35,7 @@ class PayoutSummaryTypedDict(TypedDict):
|
|
|
32
35
|
r"""The date this payout was created at."""
|
|
33
36
|
currency: str
|
|
34
37
|
r"""A supported ISO-4217 currency code."""
|
|
35
|
-
payment_method:
|
|
38
|
+
payment_method: TransactionPaymentMethodOutputTypedDict
|
|
36
39
|
payment_service: PayoutPaymentServiceTypedDict
|
|
37
40
|
status: PayoutStatus
|
|
38
41
|
updated_at: datetime
|
|
@@ -41,7 +44,7 @@ class PayoutSummaryTypedDict(TypedDict):
|
|
|
41
44
|
r"""Always `payout`."""
|
|
42
45
|
id: NotRequired[Nullable[str]]
|
|
43
46
|
r"""The ID for the payout."""
|
|
44
|
-
buyer: NotRequired[Nullable[
|
|
47
|
+
buyer: NotRequired[Nullable[TransactionBuyerOutputTypedDict]]
|
|
45
48
|
r"""The buyer used for this payout."""
|
|
46
49
|
category: NotRequired[Nullable[PayoutCategory]]
|
|
47
50
|
r"""The type of payout to process."""
|
|
@@ -70,7 +73,7 @@ class PayoutSummary(BaseModel):
|
|
|
70
73
|
currency: str
|
|
71
74
|
r"""A supported ISO-4217 currency code."""
|
|
72
75
|
|
|
73
|
-
payment_method:
|
|
76
|
+
payment_method: TransactionPaymentMethodOutput
|
|
74
77
|
|
|
75
78
|
payment_service: PayoutPaymentService
|
|
76
79
|
|
|
@@ -90,7 +93,7 @@ class PayoutSummary(BaseModel):
|
|
|
90
93
|
id: OptionalNullable[str] = UNSET
|
|
91
94
|
r"""The ID for the payout."""
|
|
92
95
|
|
|
93
|
-
buyer: OptionalNullable[
|
|
96
|
+
buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
|
|
94
97
|
r"""The buyer used for this payout."""
|
|
95
98
|
|
|
96
99
|
category: Annotated[
|
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,94 @@
|
|
|
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 gr4vy.utils import validate_open_enum
|
|
17
|
+
from pydantic import model_serializer
|
|
18
|
+
from pydantic.functional_validators import PlainValidator
|
|
19
|
+
from typing import Literal, Union
|
|
20
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
PaypalShippingOptionsItemType = Union[
|
|
24
|
+
Literal[
|
|
25
|
+
"SHIPPING",
|
|
26
|
+
"PICKUP",
|
|
27
|
+
"PICKUP_IN_STORE",
|
|
28
|
+
"PICKUP_FROM_PERSON",
|
|
29
|
+
],
|
|
30
|
+
UnrecognizedStr,
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class PaypalShippingOptionsItemTypedDict(TypedDict):
|
|
35
|
+
id: str
|
|
36
|
+
r"""A unique ID that identifies a payer-selected shipping option."""
|
|
37
|
+
label: str
|
|
38
|
+
r"""A description that the payer sees, which helps them choose an appropriate shipping option."""
|
|
39
|
+
selected: bool
|
|
40
|
+
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."""
|
|
41
|
+
type: NotRequired[Nullable[PaypalShippingOptionsItemType]]
|
|
42
|
+
r"""A classification for the method of purchase fulfillment."""
|
|
43
|
+
amount: NotRequired[Nullable[PaypalShippingOptionsItemAmountTypedDict]]
|
|
44
|
+
r"""The shipping cost for the selected option."""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class PaypalShippingOptionsItem(BaseModel):
|
|
48
|
+
id: str
|
|
49
|
+
r"""A unique ID that identifies a payer-selected shipping option."""
|
|
50
|
+
|
|
51
|
+
label: str
|
|
52
|
+
r"""A description that the payer sees, which helps them choose an appropriate shipping option."""
|
|
53
|
+
|
|
54
|
+
selected: bool
|
|
55
|
+
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."""
|
|
56
|
+
|
|
57
|
+
type: Annotated[
|
|
58
|
+
OptionalNullable[PaypalShippingOptionsItemType],
|
|
59
|
+
PlainValidator(validate_open_enum(False)),
|
|
60
|
+
] = UNSET
|
|
61
|
+
r"""A classification for the method of purchase fulfillment."""
|
|
62
|
+
|
|
63
|
+
amount: OptionalNullable[PaypalShippingOptionsItemAmount] = UNSET
|
|
64
|
+
r"""The shipping cost for the selected option."""
|
|
65
|
+
|
|
66
|
+
@model_serializer(mode="wrap")
|
|
67
|
+
def serialize_model(self, handler):
|
|
68
|
+
optional_fields = ["type", "amount"]
|
|
69
|
+
nullable_fields = ["type", "amount"]
|
|
70
|
+
null_default_fields = []
|
|
71
|
+
|
|
72
|
+
serialized = handler(self)
|
|
73
|
+
|
|
74
|
+
m = {}
|
|
75
|
+
|
|
76
|
+
for n, f in type(self).model_fields.items():
|
|
77
|
+
k = f.alias or n
|
|
78
|
+
val = serialized.get(k)
|
|
79
|
+
serialized.pop(k, None)
|
|
80
|
+
|
|
81
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
82
|
+
is_set = (
|
|
83
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
84
|
+
or k in null_default_fields
|
|
85
|
+
) # pylint: disable=no-member
|
|
86
|
+
|
|
87
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
88
|
+
m[k] = val
|
|
89
|
+
elif val != UNSET_SENTINEL and (
|
|
90
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
91
|
+
):
|
|
92
|
+
m[k] = val
|
|
93
|
+
|
|
94
|
+
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."""
|