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.

Potentially problematic release.


This version of gr4vy might be problematic. Click here for more details.

Files changed (44) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/checkout_sessions.py +20 -2
  3. gr4vy/models/__init__.py +137 -78
  4. gr4vy/models/auditlogentries.py +3 -3
  5. gr4vy/models/{auditlogentry.py → auditlogentry_output.py} +2 -2
  6. gr4vy/models/capture_transactionop.py +7 -4
  7. gr4vy/models/checkoutsession.py +26 -5
  8. gr4vy/models/checkoutsessioncreate.py +36 -2
  9. gr4vy/models/{checkoutsessionpaymentmethod.py → checkoutsessionpaymentmethod_output.py} +2 -2
  10. gr4vy/models/create_payment_methodop.py +6 -0
  11. gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -3
  12. gr4vy/models/instrumenttype.py +1 -0
  13. gr4vy/models/integrationclient.py +16 -0
  14. gr4vy/models/monatospeioptions.py +15 -0
  15. gr4vy/models/paymentlink.py +6 -3
  16. gr4vy/models/paymentmethodsummaries.py +6 -3
  17. gr4vy/models/{paymentmethodsummary.py → paymentmethodsummary_output.py} +2 -2
  18. gr4vy/models/{paymentoption.py → paymentoption_output.py} +2 -2
  19. gr4vy/models/paymentoptions.py +3 -3
  20. gr4vy/models/paymentservicedefinition.py +9 -1
  21. gr4vy/models/payoutsummary.py +11 -8
  22. gr4vy/models/paypaloptions.py +8 -2
  23. gr4vy/models/paypalshippingoptions.py +51 -0
  24. gr4vy/models/paypalshippingoptionsitem.py +94 -0
  25. gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
  26. gr4vy/models/plaidpaymentmethodcreate.py +99 -0
  27. gr4vy/models/{transaction.py → transaction_output.py} +25 -15
  28. gr4vy/models/{transactionbuyer.py → transactionbuyer_output.py} +2 -2
  29. gr4vy/models/transactioncancel.py +3 -3
  30. gr4vy/models/{transactioncapture.py → transactioncapture_output.py} +5 -5
  31. gr4vy/models/transactionconnectionoptions.py +10 -0
  32. gr4vy/models/transactioncreate.py +16 -0
  33. gr4vy/models/{transactionevent.py → transactionevent_output.py} +2 -2
  34. gr4vy/models/transactionevents.py +6 -3
  35. gr4vy/models/{transactionpaymentmethod.py → transactionpaymentmethod_output.py} +2 -2
  36. gr4vy/models/transactionsummaries.py +6 -3
  37. gr4vy/models/{transactionsummary.py → transactionsummary_output.py} +13 -10
  38. gr4vy/models/{transactionthreedsecuresummary.py → transactionthreedsecuresummary_output.py} +2 -2
  39. gr4vy/models/{transactionvoid.py → transactionvoid_output.py} +5 -5
  40. gr4vy/models/void_transactionop.py +7 -4
  41. gr4vy/transactions.py +22 -16
  42. {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/METADATA +3 -3
  43. {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/RECORD +44 -38
  44. {gr4vy-1.5.6.dist-info → gr4vy-1.7.1.dist-info}/WHEEL +0 -0
@@ -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 .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
16
+ from .transactionbuyer_output import (
17
+ TransactionBuyerOutput,
18
+ TransactionBuyerOutputTypedDict,
19
+ )
17
20
  from .transactionintent import TransactionIntent
18
21
  from .transactionintentoutcome import TransactionIntentOutcome
19
- from .transactionpaymentmethod import (
20
- TransactionPaymentMethod,
21
- TransactionPaymentMethodTypedDict,
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 .transactionthreedsecuresummary import (
30
- TransactionThreeDSecureSummary,
31
- TransactionThreeDSecureSummaryTypedDict,
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 TransactionTypedDict(TypedDict):
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[TransactionPaymentMethodTypedDict]]
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[TransactionBuyerTypedDict]]
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[TransactionThreeDSecureSummaryTypedDict]]
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."""
@@ -158,6 +161,8 @@ class TransactionTypedDict(TypedDict):
158
161
  r"""An optional merchant advice code which provides insight into the type of transaction or reason why the payment failed."""
159
162
  installment_count: NotRequired[Nullable[int]]
160
163
  r"""The number of installments for this transaction, if applicable."""
164
+ session_token: NotRequired[Nullable[str]]
165
+ r"""A session token that can be used to fetch session data for direct client integrations."""
161
166
  tax_amount: NotRequired[Nullable[int]]
162
167
  r"""The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`"""
163
168
  merchant_tax_id: NotRequired[Nullable[str]]
@@ -174,7 +179,7 @@ class TransactionTypedDict(TypedDict):
174
179
  r"""Total shipping amount."""
175
180
 
176
181
 
177
- class Transaction(BaseModel):
182
+ class TransactionOutput(BaseModel):
178
183
  r"""A full transaction resource."""
179
184
 
180
185
  id: str
@@ -262,7 +267,7 @@ class Transaction(BaseModel):
262
267
  external_identifier: OptionalNullable[str] = UNSET
263
268
  r"""An external identifier that can be used to match the transaction against your own records."""
264
269
 
265
- payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
270
+ payment_method: OptionalNullable[TransactionPaymentMethodOutput] = UNSET
266
271
  r"""The payment method used for this transaction."""
267
272
 
268
273
  method: Annotated[
@@ -284,7 +289,7 @@ class Transaction(BaseModel):
284
289
  pending_review: Optional[bool] = False
285
290
  r"""Whether a manual anti fraud review is pending with an anti fraud service."""
286
291
 
287
- buyer: OptionalNullable[TransactionBuyer] = UNSET
292
+ buyer: OptionalNullable[TransactionBuyerOutput] = UNSET
288
293
  r"""The buyer used for this transaction."""
289
294
 
290
295
  raw_response_code: OptionalNullable[str] = UNSET
@@ -332,7 +337,7 @@ class Transaction(BaseModel):
332
337
  scheme_transaction_id: OptionalNullable[str] = UNSET
333
338
  r"""An identifier for the transaction used by the scheme itself, when available."""
334
339
 
335
- three_d_secure: OptionalNullable[TransactionThreeDSecureSummary] = UNSET
340
+ three_d_secure: OptionalNullable[TransactionThreeDSecureSummaryOutput] = UNSET
336
341
  r"""The 3-D Secure data that was sent to the payment service for the transaction."""
337
342
 
338
343
  payment_service_transaction_id: OptionalNullable[str] = UNSET
@@ -371,6 +376,9 @@ class Transaction(BaseModel):
371
376
  installment_count: OptionalNullable[int] = UNSET
372
377
  r"""The number of installments for this transaction, if applicable."""
373
378
 
379
+ session_token: OptionalNullable[str] = UNSET
380
+ r"""A session token that can be used to fetch session data for direct client integrations."""
381
+
374
382
  tax_amount: OptionalNullable[int] = UNSET
375
383
  r"""The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`"""
376
384
 
@@ -432,6 +440,7 @@ class Transaction(BaseModel):
432
440
  "recipient",
433
441
  "merchant_advice_code",
434
442
  "installment_count",
443
+ "session_token",
435
444
  "tax_amount",
436
445
  "merchant_tax_id",
437
446
  "customer_reference_number",
@@ -475,6 +484,7 @@ class Transaction(BaseModel):
475
484
  "recipient",
476
485
  "merchant_advice_code",
477
486
  "installment_count",
487
+ "session_token",
478
488
  "tax_amount",
479
489
  "merchant_tax_id",
480
490
  "customer_reference_number",
@@ -11,7 +11,7 @@ from typing import Literal, Optional
11
11
  from typing_extensions import Annotated, NotRequired, TypedDict
12
12
 
13
13
 
14
- class TransactionBuyerTypedDict(TypedDict):
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 TransactionBuyer(BaseModel):
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 .transaction import Transaction, TransactionTypedDict
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: TransactionTypedDict
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: 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 .transaction import Transaction, TransactionTypedDict
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 TransactionCaptureTypedDict(TypedDict):
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: TransactionTypedDict
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 TransactionCapture(BaseModel):
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: Transaction
41
+ transaction: TransactionOutput
42
42
  r"""A full transaction resource."""
43
43
 
44
44
  TYPE: Annotated[
@@ -23,6 +23,7 @@ from .givingblockoptions import GivingBlockOptions, GivingBlockOptionsTypedDict
23
23
  from .latitudeoptions import LatitudeOptions, LatitudeOptionsTypedDict
24
24
  from .mattildatapioptions import MattildaTapiOptions, MattildaTapiOptionsTypedDict
25
25
  from .mockcardoptions import MockCardOptions, MockCardOptionsTypedDict
26
+ from .monatospeioptions import MonatoSpeiOptions, MonatoSpeiOptionsTypedDict
26
27
  from .nuveioptions import NuveiOptions, NuveiOptionsTypedDict
27
28
  from .nuveipseoptions import NuveiPSEOptions, NuveiPSEOptionsTypedDict
28
29
  from .oxxooptions import OxxoOptions, OxxoOptionsTypedDict
@@ -94,6 +95,8 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
94
95
  r"""Custom options to be passed to the `mattilda-tapi` connector."""
95
96
  mattilda_tapifintechs: NotRequired[Nullable[MattildaTapiOptionsTypedDict]]
96
97
  r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
98
+ monato_spei: NotRequired[Nullable[MonatoSpeiOptionsTypedDict]]
99
+ r"""Custom options to be passed to the `monato-spei` connector."""
97
100
  mock_card: NotRequired[Nullable[MockCardOptionsTypedDict]]
98
101
  r"""Custom options to be passed to the `mock-card` connector."""
99
102
  nuvei_card: NotRequired[Nullable[NuveiOptionsTypedDict]]
@@ -260,6 +263,11 @@ class TransactionConnectionOptions(BaseModel):
260
263
  ] = UNSET
261
264
  r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
262
265
 
266
+ monato_spei: Annotated[
267
+ OptionalNullable[MonatoSpeiOptions], pydantic.Field(alias="monato-spei")
268
+ ] = UNSET
269
+ r"""Custom options to be passed to the `monato-spei` connector."""
270
+
263
271
  mock_card: Annotated[
264
272
  OptionalNullable[MockCardOptions], pydantic.Field(alias="mock-card")
265
273
  ] = UNSET
@@ -351,6 +359,7 @@ class TransactionConnectionOptions(BaseModel):
351
359
  "latitude-latitudeds",
352
360
  "mattilda-tapi",
353
361
  "mattilda-tapifintechs",
362
+ "monato-spei",
354
363
  "mock-card",
355
364
  "nuvei-card",
356
365
  "nuvei-pse",
@@ -392,6 +401,7 @@ class TransactionConnectionOptions(BaseModel):
392
401
  "latitude-latitudeds",
393
402
  "mattilda-tapi",
394
403
  "mattilda-tapifintechs",
404
+ "monato-spei",
395
405
  "mock-card",
396
406
  "nuvei-card",
397
407
  "nuvei-pse",
@@ -41,10 +41,15 @@ from .googlepaypaymentmethodcreate import (
41
41
  GooglePayPaymentMethodCreateTypedDict,
42
42
  )
43
43
  from .guestbuyer_input import GuestBuyerInput, GuestBuyerInputTypedDict
44
+ from .integrationclient import IntegrationClient
44
45
  from .networktokenpaymentmethodcreate import (
45
46
  NetworkTokenPaymentMethodCreate,
46
47
  NetworkTokenPaymentMethodCreateTypedDict,
47
48
  )
49
+ from .plaidpaymentmethodcreate import (
50
+ PlaidPaymentMethodCreate,
51
+ PlaidPaymentMethodCreateTypedDict,
52
+ )
48
53
  from .recipient import Recipient, RecipientTypedDict
49
54
  from .redirectpaymentmethodcreate import (
50
55
  RedirectPaymentMethodCreate,
@@ -75,6 +80,7 @@ TransactionCreatePaymentMethodTypedDict = TypeAliasType(
75
80
  "TransactionCreatePaymentMethodTypedDict",
76
81
  Union[
77
82
  TokenPaymentMethodCreateTypedDict,
83
+ PlaidPaymentMethodCreateTypedDict,
78
84
  CheckoutSessionWithURLPaymentMethodCreateTypedDict,
79
85
  RedirectPaymentMethodCreateTypedDict,
80
86
  ClickToPayPaymentMethodCreateTypedDict,
@@ -93,6 +99,7 @@ TransactionCreatePaymentMethod = TypeAliasType(
93
99
  "TransactionCreatePaymentMethod",
94
100
  Union[
95
101
  TokenPaymentMethodCreate,
102
+ PlaidPaymentMethodCreate,
96
103
  CheckoutSessionWithURLPaymentMethodCreate,
97
104
  RedirectPaymentMethodCreate,
98
105
  ClickToPayPaymentMethodCreate,
@@ -226,6 +233,8 @@ class TransactionCreateTypedDict(TypedDict):
226
233
  r"""Total charges for import/export duties."""
227
234
  shipping_amount: NotRequired[Nullable[int]]
228
235
  r"""Total shipping amount."""
236
+ integration_client: NotRequired[Nullable[IntegrationClient]]
237
+ r"""Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance."""
229
238
 
230
239
 
231
240
  class TransactionCreate(BaseModel):
@@ -364,6 +373,11 @@ class TransactionCreate(BaseModel):
364
373
  shipping_amount: OptionalNullable[int] = UNSET
365
374
  r"""Total shipping amount."""
366
375
 
376
+ integration_client: Annotated[
377
+ OptionalNullable[IntegrationClient], PlainValidator(validate_open_enum(False))
378
+ ] = UNSET
379
+ r"""Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance."""
380
+
367
381
  @model_serializer(mode="wrap")
368
382
  def serialize_model(self, handler):
369
383
  optional_fields = [
@@ -402,6 +416,7 @@ class TransactionCreate(BaseModel):
402
416
  "supplier_order_number",
403
417
  "duty_amount",
404
418
  "shipping_amount",
419
+ "integration_client",
405
420
  ]
406
421
  nullable_fields = [
407
422
  "country",
@@ -431,6 +446,7 @@ class TransactionCreate(BaseModel):
431
446
  "supplier_order_number",
432
447
  "duty_amount",
433
448
  "shipping_amount",
449
+ "integration_client",
434
450
  ]
435
451
  null_default_fields = []
436
452
 
@@ -68,7 +68,7 @@ Name = Union[
68
68
  r"""The specific event name."""
69
69
 
70
70
 
71
- class TransactionEventTypedDict(TypedDict):
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 TransactionEvent(BaseModel):
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 .transactionevent import TransactionEvent, TransactionEventTypedDict
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[TransactionEventTypedDict]
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[TransactionEvent]
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 TransactionPaymentMethodTypedDict(TypedDict):
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 TransactionPaymentMethod(BaseModel):
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 .transactionsummary import TransactionSummary, TransactionSummaryTypedDict
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[TransactionSummaryTypedDict]
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[TransactionSummary]
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 .transactionbuyer import TransactionBuyer, TransactionBuyerTypedDict
9
+ from .transactionbuyer_output import (
10
+ TransactionBuyerOutput,
11
+ TransactionBuyerOutputTypedDict,
12
+ )
10
13
  from .transactionintent import TransactionIntent
11
- from .transactionpaymentmethod import (
12
- TransactionPaymentMethod,
13
- TransactionPaymentMethodTypedDict,
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 TransactionSummaryTypedDict(TypedDict):
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[TransactionPaymentMethodTypedDict]]
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[TransactionBuyerTypedDict]]
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 TransactionSummary(BaseModel):
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[TransactionPaymentMethod] = UNSET
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[TransactionBuyer] = UNSET
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 TransactionThreeDSecureSummaryTypedDict(TypedDict):
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 TransactionThreeDSecureSummary(BaseModel):
40
+ class TransactionThreeDSecureSummaryOutput(BaseModel):
41
41
  version: OptionalNullable[str] = UNSET
42
42
  r"""The version of 3DS used for this transaction."""
43
43