gr4vy 1.6.3__py3-none-any.whl → 1.6.5__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/models/__init__.py +99 -75
- 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 +5 -5
- gr4vy/models/{checkoutsessionpaymentmethod.py → checkoutsessionpaymentmethod_output.py} +2 -2
- gr4vy/models/create_payment_methodop.py +6 -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/payoutsummary.py +11 -8
- gr4vy/models/plaidpaymentmethodcreate.py +99 -0
- gr4vy/models/{transaction.py → transaction_output.py} +18 -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/transactioncreate.py +6 -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 +16 -16
- {gr4vy-1.6.3.dist-info → gr4vy-1.6.5.dist-info}/METADATA +1 -1
- {gr4vy-1.6.3.dist-info → gr4vy-1.6.5.dist-info}/RECORD +32 -31
- {gr4vy-1.6.3.dist-info → gr4vy-1.6.5.dist-info}/WHEEL +0 -0
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[
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
|
|
32
|
+
|
|
33
|
+
class PlaidPaymentMethodCreate(BaseModel):
|
|
34
|
+
r"""Plaid Payment Method
|
|
35
|
+
|
|
36
|
+
Plaid Payment Method to use in a transaction.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
token: str
|
|
40
|
+
r"""The public token obtained after using Plaid Link."""
|
|
41
|
+
|
|
42
|
+
METHOD: Annotated[
|
|
43
|
+
Annotated[Optional[Literal["plaid"]], AfterValidator(validate_const("plaid"))],
|
|
44
|
+
pydantic.Field(alias="method"),
|
|
45
|
+
] = "plaid"
|
|
46
|
+
r"""Always `plaid`."""
|
|
47
|
+
|
|
48
|
+
account_id: OptionalNullable[str] = UNSET
|
|
49
|
+
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."""
|
|
50
|
+
|
|
51
|
+
payment_service_id: OptionalNullable[str] = UNSET
|
|
52
|
+
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."""
|
|
53
|
+
|
|
54
|
+
buyer_id: OptionalNullable[str] = UNSET
|
|
55
|
+
r"""The ID of the buyer to attach the method to."""
|
|
56
|
+
|
|
57
|
+
buyer_external_identifier: OptionalNullable[str] = UNSET
|
|
58
|
+
r"""The merchant reference for this payment method."""
|
|
59
|
+
|
|
60
|
+
@model_serializer(mode="wrap")
|
|
61
|
+
def serialize_model(self, handler):
|
|
62
|
+
optional_fields = [
|
|
63
|
+
"method",
|
|
64
|
+
"account_id",
|
|
65
|
+
"payment_service_id",
|
|
66
|
+
"buyer_id",
|
|
67
|
+
"buyer_external_identifier",
|
|
68
|
+
]
|
|
69
|
+
nullable_fields = [
|
|
70
|
+
"account_id",
|
|
71
|
+
"payment_service_id",
|
|
72
|
+
"buyer_id",
|
|
73
|
+
"buyer_external_identifier",
|
|
74
|
+
]
|
|
75
|
+
null_default_fields = []
|
|
76
|
+
|
|
77
|
+
serialized = handler(self)
|
|
78
|
+
|
|
79
|
+
m = {}
|
|
80
|
+
|
|
81
|
+
for n, f in type(self).model_fields.items():
|
|
82
|
+
k = f.alias or n
|
|
83
|
+
val = serialized.get(k)
|
|
84
|
+
serialized.pop(k, None)
|
|
85
|
+
|
|
86
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
87
|
+
is_set = (
|
|
88
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
89
|
+
or k in null_default_fields
|
|
90
|
+
) # pylint: disable=no-member
|
|
91
|
+
|
|
92
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
93
|
+
m[k] = val
|
|
94
|
+
elif val != UNSET_SENTINEL and (
|
|
95
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
96
|
+
):
|
|
97
|
+
m[k] = val
|
|
98
|
+
|
|
99
|
+
return m
|
|
@@ -13,12 +13,15 @@ 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 .
|
|
16
|
+
from .transactionbuyer_output import (
|
|
17
|
+
TransactionBuyerOutput,
|
|
18
|
+
TransactionBuyerOutputTypedDict,
|
|
19
|
+
)
|
|
17
20
|
from .transactionintent import TransactionIntent
|
|
18
21
|
from .transactionintentoutcome import TransactionIntentOutcome
|
|
19
|
-
from .
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
from .transactionpaymentmethod_output import (
|
|
23
|
+
TransactionPaymentMethodOutput,
|
|
24
|
+
TransactionPaymentMethodOutputTypedDict,
|
|
22
25
|
)
|
|
23
26
|
from .transactionpaymentservice import (
|
|
24
27
|
TransactionPaymentService,
|
|
@@ -26,9 +29,9 @@ from .transactionpaymentservice import (
|
|
|
26
29
|
)
|
|
27
30
|
from .transactionpaymentsource import TransactionPaymentSource
|
|
28
31
|
from .transactionstatus import TransactionStatus
|
|
29
|
-
from .
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
from .transactionthreedsecuresummary_output import (
|
|
33
|
+
TransactionThreeDSecureSummaryOutput,
|
|
34
|
+
TransactionThreeDSecureSummaryOutputTypedDict,
|
|
32
35
|
)
|
|
33
36
|
from datetime import datetime
|
|
34
37
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
@@ -40,7 +43,7 @@ from typing import Dict, List, Literal, Optional
|
|
|
40
43
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
41
44
|
|
|
42
45
|
|
|
43
|
-
class
|
|
46
|
+
class TransactionOutputTypedDict(TypedDict):
|
|
44
47
|
r"""A full transaction resource."""
|
|
45
48
|
|
|
46
49
|
id: str
|
|
@@ -92,7 +95,7 @@ class TransactionTypedDict(TypedDict):
|
|
|
92
95
|
r"""The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing."""
|
|
93
96
|
external_identifier: NotRequired[Nullable[str]]
|
|
94
97
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
95
|
-
payment_method: NotRequired[Nullable[
|
|
98
|
+
payment_method: NotRequired[Nullable[TransactionPaymentMethodOutputTypedDict]]
|
|
96
99
|
r"""The payment method used for this transaction."""
|
|
97
100
|
method: NotRequired[Nullable[Method]]
|
|
98
101
|
r"""The method used for the transaction."""
|
|
@@ -104,7 +107,7 @@ class TransactionTypedDict(TypedDict):
|
|
|
104
107
|
r"""The payment service used for this transaction."""
|
|
105
108
|
pending_review: NotRequired[bool]
|
|
106
109
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
107
|
-
buyer: NotRequired[Nullable[
|
|
110
|
+
buyer: NotRequired[Nullable[TransactionBuyerOutputTypedDict]]
|
|
108
111
|
r"""The buyer used for this transaction."""
|
|
109
112
|
raw_response_code: NotRequired[Nullable[str]]
|
|
110
113
|
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."""
|
|
@@ -132,7 +135,7 @@ class TransactionTypedDict(TypedDict):
|
|
|
132
135
|
r"""The statement descriptor is the text to be shown on the buyer's statements."""
|
|
133
136
|
scheme_transaction_id: NotRequired[Nullable[str]]
|
|
134
137
|
r"""An identifier for the transaction used by the scheme itself, when available."""
|
|
135
|
-
three_d_secure: NotRequired[Nullable[
|
|
138
|
+
three_d_secure: NotRequired[Nullable[TransactionThreeDSecureSummaryOutputTypedDict]]
|
|
136
139
|
r"""The 3-D Secure data that was sent to the payment service for the transaction."""
|
|
137
140
|
payment_service_transaction_id: NotRequired[Nullable[str]]
|
|
138
141
|
r"""The payment service's unique ID for the transaction."""
|
|
@@ -176,7 +179,7 @@ class TransactionTypedDict(TypedDict):
|
|
|
176
179
|
r"""Total shipping amount."""
|
|
177
180
|
|
|
178
181
|
|
|
179
|
-
class
|
|
182
|
+
class TransactionOutput(BaseModel):
|
|
180
183
|
r"""A full transaction resource."""
|
|
181
184
|
|
|
182
185
|
id: str
|
|
@@ -264,7 +267,7 @@ class Transaction(BaseModel):
|
|
|
264
267
|
external_identifier: OptionalNullable[str] = UNSET
|
|
265
268
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
266
269
|
|
|
267
|
-
payment_method: OptionalNullable[
|
|
270
|
+
payment_method: OptionalNullable[TransactionPaymentMethodOutput] = UNSET
|
|
268
271
|
r"""The payment method used for this transaction."""
|
|
269
272
|
|
|
270
273
|
method: Annotated[
|
|
@@ -286,7 +289,7 @@ class Transaction(BaseModel):
|
|
|
286
289
|
pending_review: Optional[bool] = False
|
|
287
290
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
288
291
|
|
|
289
|
-
buyer: OptionalNullable[
|
|
292
|
+
buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
|
|
290
293
|
r"""The buyer used for this transaction."""
|
|
291
294
|
|
|
292
295
|
raw_response_code: OptionalNullable[str] = UNSET
|
|
@@ -334,7 +337,7 @@ class Transaction(BaseModel):
|
|
|
334
337
|
scheme_transaction_id: OptionalNullable[str] = UNSET
|
|
335
338
|
r"""An identifier for the transaction used by the scheme itself, when available."""
|
|
336
339
|
|
|
337
|
-
three_d_secure: OptionalNullable[
|
|
340
|
+
three_d_secure: OptionalNullable[TransactionThreeDSecureSummaryOutput] = UNSET
|
|
338
341
|
r"""The 3-D Secure data that was sent to the payment service for the transaction."""
|
|
339
342
|
|
|
340
343
|
payment_service_transaction_id: OptionalNullable[str] = UNSET
|
|
@@ -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 TransactionBuyerOutputTypedDict(TypedDict):
|
|
15
15
|
type: Literal["buyer"]
|
|
16
16
|
r"""Always `buyer`."""
|
|
17
17
|
id: NotRequired[Nullable[str]]
|
|
@@ -26,7 +26,7 @@ class TransactionBuyerTypedDict(TypedDict):
|
|
|
26
26
|
r"""The buyer account number."""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class TransactionBuyerOutput(BaseModel):
|
|
30
30
|
TYPE: Annotated[
|
|
31
31
|
Annotated[Optional[Literal["buyer"]], AfterValidator(validate_const("buyer"))],
|
|
32
32
|
pydantic.Field(alias="type"),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .cancelstatus import CancelStatus
|
|
5
|
-
from .
|
|
5
|
+
from .transaction_output import TransactionOutput, TransactionOutputTypedDict
|
|
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: TransactionOutputTypedDict
|
|
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: TransactionOutput
|
|
42
42
|
r"""A full transaction resource."""
|
|
43
43
|
|
|
44
44
|
TYPE: Annotated[
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .capturestatus import CaptureStatus
|
|
5
|
-
from .
|
|
5
|
+
from .transaction_output import TransactionOutput, TransactionOutputTypedDict
|
|
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
|
|
@@ -12,7 +12,7 @@ from typing import Literal, Optional
|
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class TransactionCaptureOutputTypedDict(TypedDict):
|
|
16
16
|
status: CaptureStatus
|
|
17
17
|
code: Nullable[str]
|
|
18
18
|
r"""The standardized error code set by Gr4vy."""
|
|
@@ -20,13 +20,13 @@ class TransactionCaptureTypedDict(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: TransactionOutputTypedDict
|
|
24
24
|
r"""A full transaction resource."""
|
|
25
25
|
type: Literal["transaction-capture"]
|
|
26
26
|
r"""Always `transaction-capture`."""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class TransactionCaptureOutput(BaseModel):
|
|
30
30
|
status: Annotated[CaptureStatus, PlainValidator(validate_open_enum(False))]
|
|
31
31
|
|
|
32
32
|
code: Nullable[str]
|
|
@@ -38,7 +38,7 @@ class TransactionCapture(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: TransactionOutput
|
|
42
42
|
r"""A full transaction resource."""
|
|
43
43
|
|
|
44
44
|
TYPE: Annotated[
|
|
@@ -46,6 +46,10 @@ from .networktokenpaymentmethodcreate import (
|
|
|
46
46
|
NetworkTokenPaymentMethodCreate,
|
|
47
47
|
NetworkTokenPaymentMethodCreateTypedDict,
|
|
48
48
|
)
|
|
49
|
+
from .plaidpaymentmethodcreate import (
|
|
50
|
+
PlaidPaymentMethodCreate,
|
|
51
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
52
|
+
)
|
|
49
53
|
from .recipient import Recipient, RecipientTypedDict
|
|
50
54
|
from .redirectpaymentmethodcreate import (
|
|
51
55
|
RedirectPaymentMethodCreate,
|
|
@@ -76,6 +80,7 @@ TransactionCreatePaymentMethodTypedDict = TypeAliasType(
|
|
|
76
80
|
"TransactionCreatePaymentMethodTypedDict",
|
|
77
81
|
Union[
|
|
78
82
|
TokenPaymentMethodCreateTypedDict,
|
|
83
|
+
PlaidPaymentMethodCreateTypedDict,
|
|
79
84
|
CheckoutSessionWithURLPaymentMethodCreateTypedDict,
|
|
80
85
|
RedirectPaymentMethodCreateTypedDict,
|
|
81
86
|
ClickToPayPaymentMethodCreateTypedDict,
|
|
@@ -94,6 +99,7 @@ TransactionCreatePaymentMethod = TypeAliasType(
|
|
|
94
99
|
"TransactionCreatePaymentMethod",
|
|
95
100
|
Union[
|
|
96
101
|
TokenPaymentMethodCreate,
|
|
102
|
+
PlaidPaymentMethodCreate,
|
|
97
103
|
CheckoutSessionWithURLPaymentMethodCreate,
|
|
98
104
|
RedirectPaymentMethodCreate,
|
|
99
105
|
ClickToPayPaymentMethodCreate,
|
|
@@ -68,7 +68,7 @@ Name = Union[
|
|
|
68
68
|
r"""The specific event name."""
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
class
|
|
71
|
+
class TransactionEventOutputTypedDict(TypedDict):
|
|
72
72
|
id: str
|
|
73
73
|
r"""The ID for the event."""
|
|
74
74
|
name: Name
|
|
@@ -80,7 +80,7 @@ class TransactionEventTypedDict(TypedDict):
|
|
|
80
80
|
r"""Always `transaction-event`."""
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
class
|
|
83
|
+
class TransactionEventOutput(BaseModel):
|
|
84
84
|
id: str
|
|
85
85
|
r"""The ID for the event."""
|
|
86
86
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .transactionevent_output import (
|
|
5
|
+
TransactionEventOutput,
|
|
6
|
+
TransactionEventOutputTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
9
|
from pydantic import model_serializer
|
|
7
10
|
from typing import List, Optional
|
|
@@ -9,7 +12,7 @@ from typing_extensions import NotRequired, TypedDict
|
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
class TransactionEventsTypedDict(TypedDict):
|
|
12
|
-
items: List[
|
|
15
|
+
items: List[TransactionEventOutputTypedDict]
|
|
13
16
|
r"""A list of items returned for this request."""
|
|
14
17
|
limit: NotRequired[int]
|
|
15
18
|
r"""The number of items for this page."""
|
|
@@ -20,7 +23,7 @@ class TransactionEventsTypedDict(TypedDict):
|
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
class TransactionEvents(BaseModel):
|
|
23
|
-
items: List[
|
|
26
|
+
items: List[TransactionEventOutput]
|
|
24
27
|
r"""A list of items returned for this request."""
|
|
25
28
|
|
|
26
29
|
limit: Optional[int] = 20
|
|
@@ -19,7 +19,7 @@ from typing import Literal, Optional
|
|
|
19
19
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class
|
|
22
|
+
class TransactionPaymentMethodOutputTypedDict(TypedDict):
|
|
23
23
|
method: Method
|
|
24
24
|
type: Literal["payment-method"]
|
|
25
25
|
r"""Always `payment-method`."""
|
|
@@ -53,7 +53,7 @@ class TransactionPaymentMethodTypedDict(TypedDict):
|
|
|
53
53
|
r"""The payment account reference (PAR) returned by the card scheme. This is a unique reference to the underlying account that has been used to fund this payment method."""
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class
|
|
56
|
+
class TransactionPaymentMethodOutput(BaseModel):
|
|
57
57
|
method: Annotated[Method, PlainValidator(validate_open_enum(False))]
|
|
58
58
|
|
|
59
59
|
TYPE: Annotated[
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
4
|
+
from .transactionsummary_output import (
|
|
5
|
+
TransactionSummaryOutput,
|
|
6
|
+
TransactionSummaryOutputTypedDict,
|
|
7
|
+
)
|
|
5
8
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
6
9
|
from pydantic import model_serializer
|
|
7
10
|
from typing import List, Optional
|
|
@@ -9,7 +12,7 @@ from typing_extensions import NotRequired, TypedDict
|
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
class TransactionSummariesTypedDict(TypedDict):
|
|
12
|
-
items: List[
|
|
15
|
+
items: List[TransactionSummaryOutputTypedDict]
|
|
13
16
|
r"""A list of items returned for this request."""
|
|
14
17
|
limit: NotRequired[int]
|
|
15
18
|
r"""The number of items for this page."""
|
|
@@ -20,7 +23,7 @@ class TransactionSummariesTypedDict(TypedDict):
|
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
class TransactionSummaries(BaseModel):
|
|
23
|
-
items: List[
|
|
26
|
+
items: List[TransactionSummaryOutput]
|
|
24
27
|
r"""A list of items returned for this request."""
|
|
25
28
|
|
|
26
29
|
limit: Optional[int] = 20
|
|
@@ -6,11 +6,14 @@ from .giftcardservice import GiftCardService, GiftCardServiceTypedDict
|
|
|
6
6
|
from .instrumenttype import InstrumentType
|
|
7
7
|
from .method import Method
|
|
8
8
|
from .shippingdetails import ShippingDetails, ShippingDetailsTypedDict
|
|
9
|
-
from .
|
|
9
|
+
from .transactionbuyer_output import (
|
|
10
|
+
TransactionBuyerOutput,
|
|
11
|
+
TransactionBuyerOutputTypedDict,
|
|
12
|
+
)
|
|
10
13
|
from .transactionintent import TransactionIntent
|
|
11
|
-
from .
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
from .transactionpaymentmethod_output import (
|
|
15
|
+
TransactionPaymentMethodOutput,
|
|
16
|
+
TransactionPaymentMethodOutputTypedDict,
|
|
14
17
|
)
|
|
15
18
|
from .transactionpaymentservice import (
|
|
16
19
|
TransactionPaymentService,
|
|
@@ -27,7 +30,7 @@ from typing import List, Literal, Optional
|
|
|
27
30
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
28
31
|
|
|
29
32
|
|
|
30
|
-
class
|
|
33
|
+
class TransactionSummaryOutputTypedDict(TypedDict):
|
|
31
34
|
r"""A transaction, summarised"""
|
|
32
35
|
|
|
33
36
|
id: str
|
|
@@ -68,7 +71,7 @@ class TransactionSummaryTypedDict(TypedDict):
|
|
|
68
71
|
r"""The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing."""
|
|
69
72
|
external_identifier: NotRequired[Nullable[str]]
|
|
70
73
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
71
|
-
payment_method: NotRequired[Nullable[
|
|
74
|
+
payment_method: NotRequired[Nullable[TransactionPaymentMethodOutputTypedDict]]
|
|
72
75
|
r"""The payment method used for this transaction."""
|
|
73
76
|
method: NotRequired[Nullable[Method]]
|
|
74
77
|
r"""The method used for the transaction."""
|
|
@@ -80,7 +83,7 @@ class TransactionSummaryTypedDict(TypedDict):
|
|
|
80
83
|
r"""The payment service used for this transaction."""
|
|
81
84
|
pending_review: NotRequired[bool]
|
|
82
85
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
83
|
-
buyer: NotRequired[Nullable[
|
|
86
|
+
buyer: NotRequired[Nullable[TransactionBuyerOutputTypedDict]]
|
|
84
87
|
r"""The buyer used for this transaction."""
|
|
85
88
|
raw_response_code: NotRequired[Nullable[str]]
|
|
86
89
|
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."""
|
|
@@ -94,7 +97,7 @@ class TransactionSummaryTypedDict(TypedDict):
|
|
|
94
97
|
r"""The gift card service used for this transaction."""
|
|
95
98
|
|
|
96
99
|
|
|
97
|
-
class
|
|
100
|
+
class TransactionSummaryOutput(BaseModel):
|
|
98
101
|
r"""A transaction, summarised"""
|
|
99
102
|
|
|
100
103
|
id: str
|
|
@@ -161,7 +164,7 @@ class TransactionSummary(BaseModel):
|
|
|
161
164
|
external_identifier: OptionalNullable[str] = UNSET
|
|
162
165
|
r"""An external identifier that can be used to match the transaction against your own records."""
|
|
163
166
|
|
|
164
|
-
payment_method: OptionalNullable[
|
|
167
|
+
payment_method: OptionalNullable[TransactionPaymentMethodOutput] = UNSET
|
|
165
168
|
r"""The payment method used for this transaction."""
|
|
166
169
|
|
|
167
170
|
method: Annotated[
|
|
@@ -183,7 +186,7 @@ class TransactionSummary(BaseModel):
|
|
|
183
186
|
pending_review: Optional[bool] = False
|
|
184
187
|
r"""Whether a manual anti fraud review is pending with an anti fraud service."""
|
|
185
188
|
|
|
186
|
-
buyer: OptionalNullable[
|
|
189
|
+
buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
|
|
187
190
|
r"""The buyer used for this transaction."""
|
|
188
191
|
|
|
189
192
|
raw_response_code: OptionalNullable[str] = UNSET
|
|
@@ -24,7 +24,7 @@ ResponseData = TypeAliasType("ResponseData", Union[ThreeDSecureDataV1, ThreeDSec
|
|
|
24
24
|
r"""The 3DS data sent to the payment service for this transaction. This will only be populated if external 3DS data was passed in directly as part of the transaction API call, or if our 3DS server returned a status code of `Y` or `A`. In case of a failure to authenticate (status `N`, `R`, or `U`) this field will not be populated. To see full details about the 3DS calls please use our transaction events API."""
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class TransactionThreeDSecureSummaryOutputTypedDict(TypedDict):
|
|
28
28
|
version: NotRequired[Nullable[str]]
|
|
29
29
|
r"""The version of 3DS used for this transaction."""
|
|
30
30
|
status: NotRequired[Nullable[ThreeDSecureStatus]]
|
|
@@ -37,7 +37,7 @@ class TransactionThreeDSecureSummaryTypedDict(TypedDict):
|
|
|
37
37
|
r"""The error data received from our 3DS server. This will not be populated if the customer failed the authentication with a status code of `N`, `R`, or `U`. To see full details about the 3DS calls in those situations please use our transaction events API."""
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
class
|
|
40
|
+
class TransactionThreeDSecureSummaryOutput(BaseModel):
|
|
41
41
|
version: OptionalNullable[str] = UNSET
|
|
42
42
|
r"""The version of 3DS used for this transaction."""
|
|
43
43
|
|
|
@@ -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 .transaction_output import TransactionOutput, TransactionOutputTypedDict
|
|
5
5
|
from .voidstatus import VoidStatus
|
|
6
6
|
from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
|
|
7
7
|
from gr4vy.utils import validate_const, validate_open_enum
|
|
@@ -12,7 +12,7 @@ from typing import Literal, Optional
|
|
|
12
12
|
from typing_extensions import Annotated, TypedDict
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class TransactionVoidOutputTypedDict(TypedDict):
|
|
16
16
|
status: VoidStatus
|
|
17
17
|
code: Nullable[str]
|
|
18
18
|
r"""The standardized error code set by Gr4vy."""
|
|
@@ -20,13 +20,13 @@ class TransactionVoidTypedDict(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: TransactionOutputTypedDict
|
|
24
24
|
r"""A full transaction resource."""
|
|
25
25
|
type: Literal["transaction-void"]
|
|
26
26
|
r"""Always `transaction-void`."""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class TransactionVoidOutput(BaseModel):
|
|
30
30
|
status: Annotated[VoidStatus, PlainValidator(validate_open_enum(False))]
|
|
31
31
|
|
|
32
32
|
code: Nullable[str]
|
|
@@ -38,7 +38,7 @@ class TransactionVoid(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: TransactionOutput
|
|
42
42
|
r"""A full transaction resource."""
|
|
43
43
|
|
|
44
44
|
TYPE: Annotated[
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .
|
|
5
|
-
from .
|
|
4
|
+
from .transaction_output import TransactionOutput, TransactionOutputTypedDict
|
|
5
|
+
from .transactionvoid_output import (
|
|
6
|
+
TransactionVoidOutput,
|
|
7
|
+
TransactionVoidOutputTypedDict,
|
|
8
|
+
)
|
|
6
9
|
from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
7
10
|
from gr4vy.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
|
|
8
11
|
import pydantic
|
|
@@ -86,12 +89,12 @@ class VoidTransactionRequest(BaseModel):
|
|
|
86
89
|
|
|
87
90
|
ResponseVoidTransactionTypedDict = TypeAliasType(
|
|
88
91
|
"ResponseVoidTransactionTypedDict",
|
|
89
|
-
Union[
|
|
92
|
+
Union[TransactionVoidOutputTypedDict, TransactionOutputTypedDict],
|
|
90
93
|
)
|
|
91
94
|
r"""Successful Response"""
|
|
92
95
|
|
|
93
96
|
|
|
94
97
|
ResponseVoidTransaction = TypeAliasType(
|
|
95
|
-
"ResponseVoidTransaction", Union[
|
|
98
|
+
"ResponseVoidTransaction", Union[TransactionVoidOutput, TransactionOutput]
|
|
96
99
|
)
|
|
97
100
|
r"""Successful Response"""
|