gr4vy 1.6.3__py3-none-any.whl → 1.6.4__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/models/__init__.py +91 -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/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/{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/{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.4.dist-info}/METADATA +1 -1
- {gr4vy-1.6.3.dist-info → gr4vy-1.6.4.dist-info}/RECORD +29 -29
- {gr4vy-1.6.3.dist-info → gr4vy-1.6.4.dist-info}/WHEEL +0 -0
|
@@ -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[
|
|
@@ -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"""
|
gr4vy/transactions.py
CHANGED
|
@@ -788,7 +788,7 @@ class Transactions(BaseSDK):
|
|
|
788
788
|
server_url: Optional[str] = None,
|
|
789
789
|
timeout_ms: Optional[int] = None,
|
|
790
790
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
791
|
-
) -> models.
|
|
791
|
+
) -> models.TransactionOutput:
|
|
792
792
|
r"""Create transaction
|
|
793
793
|
|
|
794
794
|
Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported.
|
|
@@ -983,7 +983,7 @@ class Transactions(BaseSDK):
|
|
|
983
983
|
|
|
984
984
|
response_data: Any = None
|
|
985
985
|
if utils.match_response(http_res, "201", "application/json"):
|
|
986
|
-
return unmarshal_json_response(models.
|
|
986
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
987
987
|
if utils.match_response(http_res, "400", "application/json"):
|
|
988
988
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
989
989
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1105,7 +1105,7 @@ class Transactions(BaseSDK):
|
|
|
1105
1105
|
server_url: Optional[str] = None,
|
|
1106
1106
|
timeout_ms: Optional[int] = None,
|
|
1107
1107
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1108
|
-
) -> models.
|
|
1108
|
+
) -> models.TransactionOutput:
|
|
1109
1109
|
r"""Create transaction
|
|
1110
1110
|
|
|
1111
1111
|
Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported.
|
|
@@ -1300,7 +1300,7 @@ class Transactions(BaseSDK):
|
|
|
1300
1300
|
|
|
1301
1301
|
response_data: Any = None
|
|
1302
1302
|
if utils.match_response(http_res, "201", "application/json"):
|
|
1303
|
-
return unmarshal_json_response(models.
|
|
1303
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
1304
1304
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1305
1305
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1306
1306
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1357,7 +1357,7 @@ class Transactions(BaseSDK):
|
|
|
1357
1357
|
server_url: Optional[str] = None,
|
|
1358
1358
|
timeout_ms: Optional[int] = None,
|
|
1359
1359
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1360
|
-
) -> models.
|
|
1360
|
+
) -> models.TransactionOutput:
|
|
1361
1361
|
r"""Get transaction
|
|
1362
1362
|
|
|
1363
1363
|
Retrieve the details of a transaction by its unique identifier.
|
|
@@ -1447,7 +1447,7 @@ class Transactions(BaseSDK):
|
|
|
1447
1447
|
|
|
1448
1448
|
response_data: Any = None
|
|
1449
1449
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1450
|
-
return unmarshal_json_response(models.
|
|
1450
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
1451
1451
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1452
1452
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1453
1453
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1504,7 +1504,7 @@ class Transactions(BaseSDK):
|
|
|
1504
1504
|
server_url: Optional[str] = None,
|
|
1505
1505
|
timeout_ms: Optional[int] = None,
|
|
1506
1506
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1507
|
-
) -> models.
|
|
1507
|
+
) -> models.TransactionOutput:
|
|
1508
1508
|
r"""Get transaction
|
|
1509
1509
|
|
|
1510
1510
|
Retrieve the details of a transaction by its unique identifier.
|
|
@@ -1594,7 +1594,7 @@ class Transactions(BaseSDK):
|
|
|
1594
1594
|
|
|
1595
1595
|
response_data: Any = None
|
|
1596
1596
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1597
|
-
return unmarshal_json_response(models.
|
|
1597
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
1598
1598
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1599
1599
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1600
1600
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1659,7 +1659,7 @@ class Transactions(BaseSDK):
|
|
|
1659
1659
|
server_url: Optional[str] = None,
|
|
1660
1660
|
timeout_ms: Optional[int] = None,
|
|
1661
1661
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1662
|
-
) -> models.
|
|
1662
|
+
) -> models.TransactionOutput:
|
|
1663
1663
|
r"""Manually update a transaction
|
|
1664
1664
|
|
|
1665
1665
|
Manually updates a transaction.
|
|
@@ -1763,7 +1763,7 @@ class Transactions(BaseSDK):
|
|
|
1763
1763
|
|
|
1764
1764
|
response_data: Any = None
|
|
1765
1765
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1766
|
-
return unmarshal_json_response(models.
|
|
1766
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
1767
1767
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1768
1768
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1769
1769
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1828,7 +1828,7 @@ class Transactions(BaseSDK):
|
|
|
1828
1828
|
server_url: Optional[str] = None,
|
|
1829
1829
|
timeout_ms: Optional[int] = None,
|
|
1830
1830
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1831
|
-
) -> models.
|
|
1831
|
+
) -> models.TransactionOutput:
|
|
1832
1832
|
r"""Manually update a transaction
|
|
1833
1833
|
|
|
1834
1834
|
Manually updates a transaction.
|
|
@@ -1932,7 +1932,7 @@ class Transactions(BaseSDK):
|
|
|
1932
1932
|
|
|
1933
1933
|
response_data: Any = None
|
|
1934
1934
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1935
|
-
return unmarshal_json_response(models.
|
|
1935
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
1936
1936
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1937
1937
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1938
1938
|
raise errors.Error400(response_data, http_res)
|
|
@@ -2897,7 +2897,7 @@ class Transactions(BaseSDK):
|
|
|
2897
2897
|
server_url: Optional[str] = None,
|
|
2898
2898
|
timeout_ms: Optional[int] = None,
|
|
2899
2899
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
2900
|
-
) -> models.
|
|
2900
|
+
) -> models.TransactionOutput:
|
|
2901
2901
|
r"""Sync transaction
|
|
2902
2902
|
|
|
2903
2903
|
Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers.
|
|
@@ -2983,7 +2983,7 @@ class Transactions(BaseSDK):
|
|
|
2983
2983
|
|
|
2984
2984
|
response_data: Any = None
|
|
2985
2985
|
if utils.match_response(http_res, "200", "application/json"):
|
|
2986
|
-
return unmarshal_json_response(models.
|
|
2986
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
2987
2987
|
if utils.match_response(http_res, "400", "application/json"):
|
|
2988
2988
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
2989
2989
|
raise errors.Error400(response_data, http_res)
|
|
@@ -3040,7 +3040,7 @@ class Transactions(BaseSDK):
|
|
|
3040
3040
|
server_url: Optional[str] = None,
|
|
3041
3041
|
timeout_ms: Optional[int] = None,
|
|
3042
3042
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
3043
|
-
) -> models.
|
|
3043
|
+
) -> models.TransactionOutput:
|
|
3044
3044
|
r"""Sync transaction
|
|
3045
3045
|
|
|
3046
3046
|
Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers.
|
|
@@ -3126,7 +3126,7 @@ class Transactions(BaseSDK):
|
|
|
3126
3126
|
|
|
3127
3127
|
response_data: Any = None
|
|
3128
3128
|
if utils.match_response(http_res, "200", "application/json"):
|
|
3129
|
-
return unmarshal_json_response(models.
|
|
3129
|
+
return unmarshal_json_response(models.TransactionOutput, http_res)
|
|
3130
3130
|
if utils.match_response(http_res, "400", "application/json"):
|
|
3131
3131
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
3132
3132
|
raise errors.Error400(response_data, http_res)
|