gr4vy 1.5.2__py3-none-any.whl → 1.10.9__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.
Files changed (169) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/actions.py +307 -0
  3. gr4vy/all.py +4 -2
  4. gr4vy/audit_logs.py +4 -2
  5. gr4vy/balances.py +4 -2
  6. gr4vy/basesdk.py +6 -0
  7. gr4vy/buyers_gift_cards.py +4 -2
  8. gr4vy/buyers_payment_methods.py +4 -2
  9. gr4vy/buyers_sdk.py +28 -18
  10. gr4vy/buyers_shipping_details.py +20 -10
  11. gr4vy/card_scheme_definitions_sdk.py +4 -2
  12. gr4vy/checkout_sessions.py +40 -14
  13. gr4vy/digital_wallets_sdk.py +20 -10
  14. gr4vy/domains.py +8 -4
  15. gr4vy/errors/apierror.py +1 -1
  16. gr4vy/errors/error400.py +1 -5
  17. gr4vy/errors/error401.py +1 -5
  18. gr4vy/errors/error403.py +1 -5
  19. gr4vy/errors/error404.py +1 -5
  20. gr4vy/errors/error405.py +1 -5
  21. gr4vy/errors/error409.py +1 -5
  22. gr4vy/errors/error425.py +1 -5
  23. gr4vy/errors/error429.py +1 -5
  24. gr4vy/errors/error500.py +1 -5
  25. gr4vy/errors/error502.py +1 -5
  26. gr4vy/errors/error504.py +1 -5
  27. gr4vy/errors/gr4vyerror.py +1 -1
  28. gr4vy/errors/httpvalidationerror.py +1 -1
  29. gr4vy/errors/no_response_error.py +1 -1
  30. gr4vy/errors/responsevalidationerror.py +1 -1
  31. gr4vy/events.py +54 -7
  32. gr4vy/executions.py +12 -6
  33. gr4vy/gift_cards_sdk.py +16 -8
  34. gr4vy/jobs.py +4 -2
  35. gr4vy/merchant_accounts_sdk.py +16 -8
  36. gr4vy/models/__init__.py +103 -29
  37. gr4vy/models/adyencardoptions.py +1 -6
  38. gr4vy/models/adyensepaoptions.py +1 -6
  39. gr4vy/models/airline.py +2 -7
  40. gr4vy/models/airlineleg.py +2 -6
  41. gr4vy/models/airlinepassenger.py +2 -6
  42. gr4vy/models/auditlogentry.py +3 -3
  43. gr4vy/models/auditlogentryuser.py +3 -3
  44. gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
  45. gr4vy/models/braintreedynamicdatafieldsoptions.py +2 -7
  46. gr4vy/models/browserinfo.py +2 -4
  47. gr4vy/models/buyer.py +3 -3
  48. gr4vy/models/buyercreate.py +3 -3
  49. gr4vy/models/buyerupdate.py +3 -3
  50. gr4vy/models/cartitem.py +9 -6
  51. gr4vy/models/chaseoptions.py +46 -0
  52. gr4vy/models/checkoutsession.py +24 -3
  53. gr4vy/models/checkoutsessioncreate.py +39 -5
  54. gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
  55. gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
  56. gr4vy/models/create_payment_methodop.py +6 -0
  57. gr4vy/models/createsession.py +3 -3
  58. gr4vy/models/cybersourceoptions.py +7 -0
  59. gr4vy/models/definitionfield.py +1 -6
  60. gr4vy/models/digitalwallet.py +3 -5
  61. gr4vy/models/digitalwalletcreate.py +2 -6
  62. gr4vy/models/dlocalupirecurringinfooptions.py +13 -15
  63. gr4vy/models/errordetail.py +2 -4
  64. gr4vy/models/flow.py +16 -0
  65. gr4vy/models/flowaction.py +16 -0
  66. gr4vy/models/forterantifraudoptions.py +2 -7
  67. gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -8
  68. gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +3 -6
  69. gr4vy/models/giftcardredemption.py +4 -8
  70. gr4vy/models/giftcardservice.py +3 -5
  71. gr4vy/models/giftcardsummary.py +3 -5
  72. gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
  73. gr4vy/models/instrumenttype.py +1 -0
  74. gr4vy/models/integrationclient.py +16 -0
  75. gr4vy/models/list_all_report_executionsop.py +2 -14
  76. gr4vy/models/list_audit_logsop.py +2 -10
  77. gr4vy/models/list_buyer_payment_methodsop.py +2 -3
  78. gr4vy/models/list_payment_methodsop.py +2 -14
  79. gr4vy/models/list_payment_servicesop.py +2 -8
  80. gr4vy/models/list_reportsop.py +2 -10
  81. gr4vy/models/list_transaction_actionsop.py +43 -0
  82. gr4vy/models/list_transaction_eventsop.py +12 -1
  83. gr4vy/models/list_transactionsop.py +4 -22
  84. gr4vy/models/merchantaccount.py +3 -5
  85. gr4vy/models/merchantaccountcreate.py +2 -6
  86. gr4vy/models/merchantaccountupdate.py +2 -6
  87. gr4vy/models/method.py +3 -0
  88. gr4vy/models/mockcardoptions.py +7 -2
  89. gr4vy/models/mode.py +1 -0
  90. gr4vy/models/monatospeioptions.py +15 -0
  91. gr4vy/models/networktoken.py +3 -3
  92. gr4vy/models/networktokenpaymentmethodcreate.py +4 -8
  93. gr4vy/models/nuveiidealoptions.py +49 -0
  94. gr4vy/models/paymentlink.py +18 -7
  95. gr4vy/models/paymentlinkcreate.py +23 -37
  96. gr4vy/models/paymentmethod.py +7 -13
  97. gr4vy/models/paymentmethodcard.py +3 -5
  98. gr4vy/models/paymentmethoddetailscard.py +2 -6
  99. gr4vy/models/paymentmethodsummary.py +6 -12
  100. gr4vy/models/paymentoption.py +3 -3
  101. gr4vy/models/paymentservice.py +4 -6
  102. gr4vy/models/paymentserviceconfiguration.py +2 -6
  103. gr4vy/models/paymentservicedefinition.py +11 -5
  104. gr4vy/models/paymentservicetoken.py +3 -3
  105. gr4vy/models/payoutcreate.py +5 -9
  106. gr4vy/models/payoutsummary.py +4 -6
  107. gr4vy/models/paypaloptions.py +8 -2
  108. gr4vy/models/paypalshippingoptions.py +51 -0
  109. gr4vy/models/paypalshippingoptionsitem.py +89 -0
  110. gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
  111. gr4vy/models/plaidpaymentmethodcreate.py +106 -0
  112. gr4vy/models/redirectpaymentmethodcreate.py +3 -6
  113. gr4vy/models/refund.py +4 -4
  114. gr4vy/models/report.py +4 -6
  115. gr4vy/models/reportcreate.py +2 -3
  116. gr4vy/models/reportexecution.py +3 -3
  117. gr4vy/models/reportexecutionsummary.py +3 -3
  118. gr4vy/models/reportspec.py +2 -4
  119. gr4vy/models/reportsummary.py +3 -5
  120. gr4vy/models/taxid.py +2 -4
  121. gr4vy/models/taxidkind.py +6 -0
  122. gr4vy/models/threedsecuredatav1.py +2 -6
  123. gr4vy/models/threedsecuredatav2.py +2 -6
  124. gr4vy/models/transaction.py +74 -25
  125. gr4vy/models/transactionaction.py +48 -0
  126. gr4vy/models/transactionactions.py +17 -0
  127. gr4vy/models/transactionbuyer.py +3 -3
  128. gr4vy/models/transactioncancel.py +3 -3
  129. gr4vy/models/transactioncapture.py +3 -3
  130. gr4vy/models/transactionconnectionoptions.py +30 -0
  131. gr4vy/models/transactioncreate.py +27 -12
  132. gr4vy/models/transactionevent.py +5 -3
  133. gr4vy/models/transactionpaymentmethod.py +6 -12
  134. gr4vy/models/transactionpaymentservice.py +3 -3
  135. gr4vy/models/transactionrefundcreate.py +2 -6
  136. gr4vy/models/transactionsummary.py +6 -10
  137. gr4vy/models/transactionthreedsecuresummary.py +3 -9
  138. gr4vy/models/transactionvoid.py +3 -3
  139. gr4vy/models/trustlyoptions.py +2 -9
  140. gr4vy/network_tokens_cryptogram.py +4 -2
  141. gr4vy/payment_links_sdk.py +34 -14
  142. gr4vy/payment_methods_network_tokens.py +20 -10
  143. gr4vy/payment_methods_payment_service_tokens.py +12 -6
  144. gr4vy/payment_methods_sdk.py +16 -8
  145. gr4vy/payment_options_sdk.py +4 -2
  146. gr4vy/payment_service_definitions_sdk.py +12 -6
  147. gr4vy/payment_services_sdk.py +28 -14
  148. gr4vy/payouts.py +16 -10
  149. gr4vy/refunds_sdk.py +4 -2
  150. gr4vy/report_executions_sdk.py +4 -2
  151. gr4vy/reports_sdk.py +16 -8
  152. gr4vy/sessions.py +12 -6
  153. gr4vy/transactions.py +99 -28
  154. gr4vy/transactions_refunds.py +12 -6
  155. gr4vy/transactions_settlements.py +8 -4
  156. gr4vy/types/basemodel.py +41 -3
  157. gr4vy/utils/__init__.py +0 -3
  158. gr4vy/utils/enums.py +60 -0
  159. gr4vy/utils/forms.py +21 -10
  160. gr4vy/utils/queryparams.py +14 -2
  161. gr4vy/utils/requestbodies.py +1 -1
  162. gr4vy/utils/retries.py +69 -5
  163. gr4vy/utils/serializers.py +0 -20
  164. gr4vy/utils/unmarshal_json_response.py +15 -1
  165. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/METADATA +39 -39
  166. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/RECORD +167 -155
  167. gr4vy/models/billingdetails_output.py +0 -87
  168. gr4vy/models/guestbuyer_output.py +0 -80
  169. {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +0 -0
@@ -32,10 +32,10 @@ from .transactionthreedsecuresummary import (
32
32
  )
33
33
  from datetime import datetime
34
34
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
35
- from gr4vy.utils import validate_const, validate_open_enum
35
+ from gr4vy.utils import validate_const
36
36
  import pydantic
37
37
  from pydantic import model_serializer
38
- from pydantic.functional_validators import AfterValidator, PlainValidator
38
+ from pydantic.functional_validators import AfterValidator
39
39
  from typing import Dict, List, Literal, Optional
40
40
  from typing_extensions import Annotated, NotRequired, TypedDict
41
41
 
@@ -158,6 +158,24 @@ class TransactionTypedDict(TypedDict):
158
158
  r"""An optional merchant advice code which provides insight into the type of transaction or reason why the payment failed."""
159
159
  installment_count: NotRequired[Nullable[int]]
160
160
  r"""The number of installments for this transaction, if applicable."""
161
+ session_token: NotRequired[Nullable[str]]
162
+ r"""A session token that can be used to fetch session data for direct client integrations."""
163
+ tax_amount: NotRequired[Nullable[int]]
164
+ 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`"""
165
+ merchant_tax_id: NotRequired[Nullable[str]]
166
+ r"""Merchant tax ID (for example, EIN or VAT number)."""
167
+ purchase_order_number: NotRequired[Nullable[str]]
168
+ r"""Invoice number or Purchase Order number."""
169
+ customer_reference_number: NotRequired[Nullable[str]]
170
+ r"""Customer code or reference."""
171
+ amount_includes_tax: NotRequired[Nullable[bool]]
172
+ r"""Whether the tax is included in the amount."""
173
+ supplier_order_number: NotRequired[Nullable[str]]
174
+ r"""The merchant's unique identifier for the sales order or invoice."""
175
+ duty_amount: NotRequired[Nullable[int]]
176
+ r"""Total charges for import/export duties."""
177
+ shipping_amount: NotRequired[Nullable[int]]
178
+ r"""Total shipping amount."""
161
179
 
162
180
 
163
181
  class Transaction(BaseModel):
@@ -178,7 +196,7 @@ class Transaction(BaseModel):
178
196
  amount: int
179
197
  r"""The total amount for this transaction across all funding sources including gift cards."""
180
198
 
181
- status: Annotated[TransactionStatus, PlainValidator(validate_open_enum(False))]
199
+ status: TransactionStatus
182
200
 
183
201
  authorized_amount: int
184
202
  r"""The amount for this transaction that has been authorized for the `payment_method`. This can be less than the `amount` if gift cards were used."""
@@ -195,7 +213,7 @@ class Transaction(BaseModel):
195
213
  settled: bool
196
214
  r"""Indicates whether this transaction has been settled."""
197
215
 
198
- intent: Annotated[TransactionIntent, PlainValidator(validate_open_enum(False))]
216
+ intent: TransactionIntent
199
217
 
200
218
  gift_card_redemptions: List[GiftCardRedemption]
201
219
  r"""The gift cards redeemed for this transaction."""
@@ -209,9 +227,7 @@ class Transaction(BaseModel):
209
227
  disputed: bool
210
228
  r"""Indicates whether this transaction has been disputed."""
211
229
 
212
- payment_source: Annotated[
213
- TransactionPaymentSource, PlainValidator(validate_open_enum(False))
214
- ]
230
+ payment_source: TransactionPaymentSource
215
231
  r"""The way payment method information made it to this transaction."""
216
232
 
217
233
  merchant_initiated: bool
@@ -220,9 +236,7 @@ class Transaction(BaseModel):
220
236
  is_subsequent_payment: bool
221
237
  r"""Indicates whether the transaction represents a subsequent payment or an initial one."""
222
238
 
223
- intent_outcome: Annotated[
224
- TransactionIntentOutcome, PlainValidator(validate_open_enum(False))
225
- ]
239
+ intent_outcome: TransactionIntentOutcome
226
240
 
227
241
  multi_tender: bool
228
242
  r"""The outcome of the original intent of a transaction. This allows you to understand if the intent of the transaction (e.g. `capture` or `authorize`) has been achieved when dealing with multiple payment instruments."""
@@ -251,14 +265,10 @@ class Transaction(BaseModel):
251
265
  payment_method: OptionalNullable[TransactionPaymentMethod] = UNSET
252
266
  r"""The payment method used for this transaction."""
253
267
 
254
- method: Annotated[
255
- OptionalNullable[Method], PlainValidator(validate_open_enum(False))
256
- ] = UNSET
268
+ method: OptionalNullable[Method] = UNSET
257
269
  r"""The method used for the transaction."""
258
270
 
259
- instrument_type: Annotated[
260
- OptionalNullable[InstrumentType], PlainValidator(validate_open_enum(False))
261
- ] = UNSET
271
+ instrument_type: OptionalNullable[InstrumentType] = UNSET
262
272
  r"""The name of the instrument used to process the transaction."""
263
273
 
264
274
  error_code: OptionalNullable[str] = UNSET
@@ -294,19 +304,13 @@ class Transaction(BaseModel):
294
304
  auth_response_code: OptionalNullable[str] = UNSET
295
305
  r"""This is the response description received from the processor."""
296
306
 
297
- avs_response_code: Annotated[
298
- OptionalNullable[AVSResponseCode], PlainValidator(validate_open_enum(False))
299
- ] = UNSET
307
+ avs_response_code: OptionalNullable[AVSResponseCode] = UNSET
300
308
  r"""The response code received from the payment service for the Address Verification Check (AVS). This code is mapped to a standardized Gr4vy AVS response code."""
301
309
 
302
- cvv_response_code: Annotated[
303
- OptionalNullable[CVVResponseCode], PlainValidator(validate_open_enum(False))
304
- ] = UNSET
310
+ cvv_response_code: OptionalNullable[CVVResponseCode] = UNSET
305
311
  r"""The response code received from the payment service for the Card Verification Value (CVV). This code is mapped to a standardized Gr4vy CVV response code."""
306
312
 
307
- anti_fraud_decision: Annotated[
308
- OptionalNullable[AntiFraudDecision], PlainValidator(validate_open_enum(False))
309
- ] = UNSET
313
+ anti_fraud_decision: OptionalNullable[AntiFraudDecision] = UNSET
310
314
  r"""The mapped decision received from the anti-fraud service. In case of a review decision this field is not updated once the review is resolved."""
311
315
 
312
316
  cart_items: OptionalNullable[List[CartItem]] = UNSET
@@ -357,6 +361,33 @@ class Transaction(BaseModel):
357
361
  installment_count: OptionalNullable[int] = UNSET
358
362
  r"""The number of installments for this transaction, if applicable."""
359
363
 
364
+ session_token: OptionalNullable[str] = UNSET
365
+ r"""A session token that can be used to fetch session data for direct client integrations."""
366
+
367
+ tax_amount: OptionalNullable[int] = UNSET
368
+ 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`"""
369
+
370
+ merchant_tax_id: OptionalNullable[str] = UNSET
371
+ r"""Merchant tax ID (for example, EIN or VAT number)."""
372
+
373
+ purchase_order_number: OptionalNullable[str] = UNSET
374
+ r"""Invoice number or Purchase Order number."""
375
+
376
+ customer_reference_number: OptionalNullable[str] = UNSET
377
+ r"""Customer code or reference."""
378
+
379
+ amount_includes_tax: OptionalNullable[bool] = UNSET
380
+ r"""Whether the tax is included in the amount."""
381
+
382
+ supplier_order_number: OptionalNullable[str] = UNSET
383
+ r"""The merchant's unique identifier for the sales order or invoice."""
384
+
385
+ duty_amount: OptionalNullable[int] = UNSET
386
+ r"""Total charges for import/export duties."""
387
+
388
+ shipping_amount: OptionalNullable[int] = UNSET
389
+ r"""Total shipping amount."""
390
+
360
391
  @model_serializer(mode="wrap")
361
392
  def serialize_model(self, handler):
362
393
  optional_fields = [
@@ -397,6 +428,15 @@ class Transaction(BaseModel):
397
428
  "recipient",
398
429
  "merchant_advice_code",
399
430
  "installment_count",
431
+ "session_token",
432
+ "tax_amount",
433
+ "merchant_tax_id",
434
+ "purchase_order_number",
435
+ "customer_reference_number",
436
+ "amount_includes_tax",
437
+ "supplier_order_number",
438
+ "duty_amount",
439
+ "shipping_amount",
400
440
  ]
401
441
  nullable_fields = [
402
442
  "settled_currency",
@@ -433,6 +473,15 @@ class Transaction(BaseModel):
433
473
  "recipient",
434
474
  "merchant_advice_code",
435
475
  "installment_count",
476
+ "session_token",
477
+ "tax_amount",
478
+ "merchant_tax_id",
479
+ "purchase_order_number",
480
+ "customer_reference_number",
481
+ "amount_includes_tax",
482
+ "supplier_order_number",
483
+ "duty_amount",
484
+ "shipping_amount",
436
485
  ]
437
486
  null_default_fields = []
438
487
 
@@ -0,0 +1,48 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .flow import Flow
5
+ from .flowaction import FlowAction
6
+ from datetime import datetime
7
+ from gr4vy.types import BaseModel
8
+ from gr4vy.utils import validate_const
9
+ import pydantic
10
+ from pydantic.functional_validators import AfterValidator
11
+ from typing import Any, Dict, Literal, Optional
12
+ from typing_extensions import Annotated, TypedDict
13
+
14
+
15
+ class TransactionActionTypedDict(TypedDict):
16
+ id: FlowAction
17
+ flow: Flow
18
+ rule_id: str
19
+ r"""The ID of the rule that triggered this action."""
20
+ created_at: datetime
21
+ r"""The date this action was created at."""
22
+ outcome: Dict[str, Any]
23
+ r"""The outcome of the action."""
24
+ type: Literal["action"]
25
+ r"""Always `action`."""
26
+
27
+
28
+ class TransactionAction(BaseModel):
29
+ id: FlowAction
30
+
31
+ flow: Flow
32
+
33
+ rule_id: str
34
+ r"""The ID of the rule that triggered this action."""
35
+
36
+ created_at: datetime
37
+ r"""The date this action was created at."""
38
+
39
+ outcome: Dict[str, Any]
40
+ r"""The outcome of the action."""
41
+
42
+ TYPE: Annotated[
43
+ Annotated[
44
+ Optional[Literal["action"]], AfterValidator(validate_const("action"))
45
+ ],
46
+ pydantic.Field(alias="type"),
47
+ ] = "action"
48
+ r"""Always `action`."""
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .transactionaction import TransactionAction, TransactionActionTypedDict
5
+ from gr4vy.types import BaseModel
6
+ from typing import List
7
+ from typing_extensions import TypedDict
8
+
9
+
10
+ class TransactionActionsTypedDict(TypedDict):
11
+ items: List[TransactionActionTypedDict]
12
+ r"""The list of actions triggered for a transaction."""
13
+
14
+
15
+ class TransactionActions(BaseModel):
16
+ items: List[TransactionAction]
17
+ r"""The list of actions triggered for a transaction."""
@@ -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 .billingdetails_output import BillingDetailsOutput, BillingDetailsOutputTypedDict
4
+ from .billingdetails import BillingDetails, BillingDetailsTypedDict
5
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
6
  from gr4vy.utils import validate_const
7
7
  import pydantic
@@ -20,7 +20,7 @@ class TransactionBuyerTypedDict(TypedDict):
20
20
  r"""The display name for the buyer."""
21
21
  external_identifier: NotRequired[Nullable[str]]
22
22
  r"""The merchant identifier for this buyer."""
23
- billing_details: NotRequired[Nullable[BillingDetailsOutputTypedDict]]
23
+ billing_details: NotRequired[Nullable[BillingDetailsTypedDict]]
24
24
  r"""The billing name, address, email, and other fields for this buyer."""
25
25
  account_number: NotRequired[Nullable[str]]
26
26
  r"""The buyer account number."""
@@ -42,7 +42,7 @@ class TransactionBuyer(BaseModel):
42
42
  external_identifier: OptionalNullable[str] = UNSET
43
43
  r"""The merchant identifier for this buyer."""
44
44
 
45
- billing_details: OptionalNullable[BillingDetailsOutput] = UNSET
45
+ billing_details: OptionalNullable[BillingDetails] = UNSET
46
46
  r"""The billing name, address, email, and other fields for this buyer."""
47
47
 
48
48
  account_number: OptionalNullable[str] = UNSET
@@ -4,10 +4,10 @@ from __future__ import annotations
4
4
  from .cancelstatus import CancelStatus
5
5
  from .transaction import Transaction, TransactionTypedDict
6
6
  from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
- from gr4vy.utils import validate_const, validate_open_enum
7
+ from gr4vy.utils import validate_const
8
8
  import pydantic
9
9
  from pydantic import model_serializer
10
- from pydantic.functional_validators import AfterValidator, PlainValidator
10
+ from pydantic.functional_validators import AfterValidator
11
11
  from typing import Literal, Optional
12
12
  from typing_extensions import Annotated, TypedDict
13
13
 
@@ -27,7 +27,7 @@ class TransactionCancelTypedDict(TypedDict):
27
27
 
28
28
 
29
29
  class TransactionCancel(BaseModel):
30
- status: Annotated[CancelStatus, PlainValidator(validate_open_enum(False))]
30
+ status: CancelStatus
31
31
 
32
32
  code: Nullable[str]
33
33
  r"""The standardized error code set by Gr4vy."""
@@ -4,10 +4,10 @@ from __future__ import annotations
4
4
  from .capturestatus import CaptureStatus
5
5
  from .transaction import Transaction, TransactionTypedDict
6
6
  from gr4vy.types import BaseModel, Nullable, UNSET_SENTINEL
7
- from gr4vy.utils import validate_const, validate_open_enum
7
+ from gr4vy.utils import validate_const
8
8
  import pydantic
9
9
  from pydantic import model_serializer
10
- from pydantic.functional_validators import AfterValidator, PlainValidator
10
+ from pydantic.functional_validators import AfterValidator
11
11
  from typing import Literal, Optional
12
12
  from typing_extensions import Annotated, TypedDict
13
13
 
@@ -27,7 +27,7 @@ class TransactionCaptureTypedDict(TypedDict):
27
27
 
28
28
 
29
29
  class TransactionCapture(BaseModel):
30
- status: Annotated[CaptureStatus, PlainValidator(validate_open_enum(False))]
30
+ status: CaptureStatus
31
31
 
32
32
  code: Nullable[str]
33
33
  r"""The standardized error code set by Gr4vy."""
@@ -7,6 +7,7 @@ from .adyenoptions import AdyenOptions, AdyenOptionsTypedDict
7
7
  from .adyensepaoptions import AdyenSepaOptions, AdyenSepaOptionsTypedDict
8
8
  from .affirmoptions import AffirmOptions, AffirmOptionsTypedDict
9
9
  from .braintreeoptions import BraintreeOptions, BraintreeOptionsTypedDict
10
+ from .chaseoptions import ChaseOptions, ChaseOptionsTypedDict
10
11
  from .cybersourceantifraudoptions import (
11
12
  CybersourceAntiFraudOptions,
12
13
  CybersourceAntiFraudOptionsTypedDict,
@@ -23,6 +24,8 @@ from .givingblockoptions import GivingBlockOptions, GivingBlockOptionsTypedDict
23
24
  from .latitudeoptions import LatitudeOptions, LatitudeOptionsTypedDict
24
25
  from .mattildatapioptions import MattildaTapiOptions, MattildaTapiOptionsTypedDict
25
26
  from .mockcardoptions import MockCardOptions, MockCardOptionsTypedDict
27
+ from .monatospeioptions import MonatoSpeiOptions, MonatoSpeiOptionsTypedDict
28
+ from .nuveiidealoptions import NuveiIDealOptions, NuveiIDealOptionsTypedDict
26
29
  from .nuveioptions import NuveiOptions, NuveiOptionsTypedDict
27
30
  from .nuveipseoptions import NuveiPSEOptions, NuveiPSEOptionsTypedDict
28
31
  from .oxxooptions import OxxoOptions, OxxoOptionsTypedDict
@@ -64,6 +67,8 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
64
67
  r"""Custom options to be passed to the `affirm-affirm` connector."""
65
68
  braintree_card: NotRequired[Nullable[BraintreeOptionsTypedDict]]
66
69
  r"""Custom options to be passed to the `braintree-card` connector."""
70
+ chaseorbital_card: NotRequired[Nullable[ChaseOptionsTypedDict]]
71
+ r"""Custom options to be passed to the `chaseorbital-card` connector."""
67
72
  cybersource_anti_fraud: NotRequired[Nullable[CybersourceAntiFraudOptionsTypedDict]]
68
73
  r"""Custom options to be passed to the `cybersource-anti-fraud` connector."""
69
74
  cybersource_card: NotRequired[Nullable[CybersourceOptionsTypedDict]]
@@ -94,10 +99,14 @@ class TransactionConnectionOptionsTypedDict(TypedDict):
94
99
  r"""Custom options to be passed to the `mattilda-tapi` connector."""
95
100
  mattilda_tapifintechs: NotRequired[Nullable[MattildaTapiOptionsTypedDict]]
96
101
  r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
102
+ monato_spei: NotRequired[Nullable[MonatoSpeiOptionsTypedDict]]
103
+ r"""Custom options to be passed to the `monato-spei` connector."""
97
104
  mock_card: NotRequired[Nullable[MockCardOptionsTypedDict]]
98
105
  r"""Custom options to be passed to the `mock-card` connector."""
99
106
  nuvei_card: NotRequired[Nullable[NuveiOptionsTypedDict]]
100
107
  r"""Custom options to be passed to the `nuvei-card` connector."""
108
+ nuvei_ideal: NotRequired[Nullable[NuveiIDealOptionsTypedDict]]
109
+ r"""Custom options to be passed to the `nuvei-ideal` connector."""
101
110
  nuvei_pse: NotRequired[Nullable[NuveiPSEOptionsTypedDict]]
102
111
  r"""Custom options to be passed to the `nuvei-pse` connector."""
103
112
  oxxo_oxxo: NotRequired[Nullable[OxxoOptionsTypedDict]]
@@ -181,6 +190,11 @@ class TransactionConnectionOptions(BaseModel):
181
190
  ] = UNSET
182
191
  r"""Custom options to be passed to the `braintree-card` connector."""
183
192
 
193
+ chaseorbital_card: Annotated[
194
+ OptionalNullable[ChaseOptions], pydantic.Field(alias="chaseorbital-card")
195
+ ] = UNSET
196
+ r"""Custom options to be passed to the `chaseorbital-card` connector."""
197
+
184
198
  cybersource_anti_fraud: Annotated[
185
199
  OptionalNullable[CybersourceAntiFraudOptions],
186
200
  pydantic.Field(alias="cybersource-anti-fraud"),
@@ -260,6 +274,11 @@ class TransactionConnectionOptions(BaseModel):
260
274
  ] = UNSET
261
275
  r"""Custom options to be passed to the `mattilda-tapifintechs` connector."""
262
276
 
277
+ monato_spei: Annotated[
278
+ OptionalNullable[MonatoSpeiOptions], pydantic.Field(alias="monato-spei")
279
+ ] = UNSET
280
+ r"""Custom options to be passed to the `monato-spei` connector."""
281
+
263
282
  mock_card: Annotated[
264
283
  OptionalNullable[MockCardOptions], pydantic.Field(alias="mock-card")
265
284
  ] = UNSET
@@ -270,6 +289,11 @@ class TransactionConnectionOptions(BaseModel):
270
289
  ] = UNSET
271
290
  r"""Custom options to be passed to the `nuvei-card` connector."""
272
291
 
292
+ nuvei_ideal: Annotated[
293
+ OptionalNullable[NuveiIDealOptions], pydantic.Field(alias="nuvei-ideal")
294
+ ] = UNSET
295
+ r"""Custom options to be passed to the `nuvei-ideal` connector."""
296
+
273
297
  nuvei_pse: Annotated[
274
298
  OptionalNullable[NuveiPSEOptions], pydantic.Field(alias="nuvei-pse")
275
299
  ] = UNSET
@@ -336,6 +360,7 @@ class TransactionConnectionOptions(BaseModel):
336
360
  "adyen-vipps",
337
361
  "affirm-affirm",
338
362
  "braintree-card",
363
+ "chaseorbital-card",
339
364
  "cybersource-anti-fraud",
340
365
  "cybersource-card",
341
366
  "cybersource-ideal",
@@ -351,8 +376,10 @@ class TransactionConnectionOptions(BaseModel):
351
376
  "latitude-latitudeds",
352
377
  "mattilda-tapi",
353
378
  "mattilda-tapifintechs",
379
+ "monato-spei",
354
380
  "mock-card",
355
381
  "nuvei-card",
382
+ "nuvei-ideal",
356
383
  "nuvei-pse",
357
384
  "oxxo-oxxo",
358
385
  "paypal-paypal",
@@ -377,6 +404,7 @@ class TransactionConnectionOptions(BaseModel):
377
404
  "adyen-vipps",
378
405
  "affirm-affirm",
379
406
  "braintree-card",
407
+ "chaseorbital-card",
380
408
  "cybersource-anti-fraud",
381
409
  "cybersource-card",
382
410
  "cybersource-ideal",
@@ -392,8 +420,10 @@ class TransactionConnectionOptions(BaseModel):
392
420
  "latitude-latitudeds",
393
421
  "mattilda-tapi",
394
422
  "mattilda-tapifintechs",
423
+ "monato-spei",
395
424
  "mock-card",
396
425
  "nuvei-card",
426
+ "nuvei-ideal",
397
427
  "nuvei-pse",
398
428
  "oxxo-oxxo",
399
429
  "paypal-paypal",
@@ -40,11 +40,16 @@ from .googlepaypaymentmethodcreate import (
40
40
  GooglePayPaymentMethodCreate,
41
41
  GooglePayPaymentMethodCreateTypedDict,
42
42
  )
43
- from .guestbuyer_input import GuestBuyerInput, GuestBuyerInputTypedDict
43
+ from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
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,
@@ -64,11 +69,9 @@ from .transactionconnectionoptions import (
64
69
  from .transactionintent import TransactionIntent
65
70
  from .transactionpaymentsource import TransactionPaymentSource
66
71
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
67
- from gr4vy.utils import validate_open_enum
68
72
  from pydantic import model_serializer
69
- from pydantic.functional_validators import PlainValidator
70
73
  from typing import Dict, List, Optional, Union
71
- from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
74
+ from typing_extensions import NotRequired, TypeAliasType, TypedDict
72
75
 
73
76
 
74
77
  TransactionCreatePaymentMethodTypedDict = TypeAliasType(
@@ -77,6 +80,7 @@ TransactionCreatePaymentMethodTypedDict = TypeAliasType(
77
80
  TokenPaymentMethodCreateTypedDict,
78
81
  CheckoutSessionWithURLPaymentMethodCreateTypedDict,
79
82
  RedirectPaymentMethodCreateTypedDict,
83
+ PlaidPaymentMethodCreateTypedDict,
80
84
  ClickToPayPaymentMethodCreateTypedDict,
81
85
  CardWithURLPaymentMethodCreateTypedDict,
82
86
  ApplePayPaymentMethodCreateTypedDict,
@@ -95,6 +99,7 @@ TransactionCreatePaymentMethod = TypeAliasType(
95
99
  TokenPaymentMethodCreate,
96
100
  CheckoutSessionWithURLPaymentMethodCreate,
97
101
  RedirectPaymentMethodCreate,
102
+ PlaidPaymentMethodCreate,
98
103
  ClickToPayPaymentMethodCreate,
99
104
  CardWithURLPaymentMethodCreate,
100
105
  ApplePayPaymentMethodCreate,
@@ -140,7 +145,7 @@ class TransactionCreateTypedDict(TypedDict):
140
145
  r"""The 2-letter ISO code of the country where the transaction is processed. This is also used to filter the payment services that can process the transaction. If this value is provided for redirect requests and it's not `null`, it must match the one specified for `country` in `payment_method`. Otherwise, the value specified for `country` in `payment_method` will be assumed implicitly."""
141
146
  payment_method: NotRequired[Nullable[TransactionCreatePaymentMethodTypedDict]]
142
147
  r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
143
- buyer: NotRequired[Nullable[GuestBuyerInputTypedDict]]
148
+ buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
144
149
  r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
145
150
  buyer_id: NotRequired[Nullable[str]]
146
151
  r"""The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field."""
@@ -216,6 +221,8 @@ class TransactionCreateTypedDict(TypedDict):
216
221
  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`"""
217
222
  merchant_tax_id: NotRequired[Nullable[str]]
218
223
  r"""Merchant tax ID (for example, EIN or VAT number)."""
224
+ purchase_order_number: NotRequired[Nullable[str]]
225
+ r"""Invoice number or Purchase Order number."""
219
226
  customer_reference_number: NotRequired[Nullable[str]]
220
227
  r"""Customer code or reference."""
221
228
  amount_includes_tax: NotRequired[Nullable[bool]]
@@ -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):
@@ -241,7 +250,7 @@ class TransactionCreate(BaseModel):
241
250
  payment_method: OptionalNullable[TransactionCreatePaymentMethod] = UNSET
242
251
  r"""The optional payment method to use for this transaction. This field is required if no `gift_cards` have been added."""
243
252
 
244
- buyer: OptionalNullable[GuestBuyerInput] = UNSET
253
+ buyer: OptionalNullable[GuestBuyer] = UNSET
245
254
  r"""Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used."""
246
255
 
247
256
  buyer_id: OptionalNullable[str] = UNSET
@@ -256,9 +265,7 @@ class TransactionCreate(BaseModel):
256
265
  external_identifier: OptionalNullable[str] = UNSET
257
266
  r"""An external identifier that can be used to match the transaction against your own records."""
258
267
 
259
- intent: Annotated[
260
- Optional[TransactionIntent], PlainValidator(validate_open_enum(False))
261
- ] = None
268
+ intent: Optional[TransactionIntent] = None
262
269
 
263
270
  store: Optional[bool] = False
264
271
  r"""Whether or not to also try and store the payment method with us so that it can be used again for future use. This is only supported for payment methods that support this feature. There are also a few restrictions on how the flag may be set:
@@ -290,9 +297,7 @@ class TransactionCreate(BaseModel):
290
297
  merchant_initiated: Optional[bool] = False
291
298
  r"""Indicates whether the transaction was initiated by the merchant (true) or customer (false)."""
292
299
 
293
- payment_source: Annotated[
294
- Optional[TransactionPaymentSource], PlainValidator(validate_open_enum(False))
295
- ] = None
300
+ payment_source: Optional[TransactionPaymentSource] = None
296
301
  r"""The way payment method information made it to this transaction."""
297
302
 
298
303
  airline: OptionalNullable[Airline] = UNSET
@@ -349,6 +354,9 @@ class TransactionCreate(BaseModel):
349
354
  merchant_tax_id: OptionalNullable[str] = UNSET
350
355
  r"""Merchant tax ID (for example, EIN or VAT number)."""
351
356
 
357
+ purchase_order_number: OptionalNullable[str] = UNSET
358
+ r"""Invoice number or Purchase Order number."""
359
+
352
360
  customer_reference_number: OptionalNullable[str] = UNSET
353
361
  r"""Customer code or reference."""
354
362
 
@@ -364,6 +372,9 @@ class TransactionCreate(BaseModel):
364
372
  shipping_amount: OptionalNullable[int] = UNSET
365
373
  r"""Total shipping amount."""
366
374
 
375
+ integration_client: OptionalNullable[IntegrationClient] = UNSET
376
+ r"""Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance."""
377
+
367
378
  @model_serializer(mode="wrap")
368
379
  def serialize_model(self, handler):
369
380
  optional_fields = [
@@ -397,11 +408,13 @@ class TransactionCreate(BaseModel):
397
408
  "installment_count",
398
409
  "tax_amount",
399
410
  "merchant_tax_id",
411
+ "purchase_order_number",
400
412
  "customer_reference_number",
401
413
  "amount_includes_tax",
402
414
  "supplier_order_number",
403
415
  "duty_amount",
404
416
  "shipping_amount",
417
+ "integration_client",
405
418
  ]
406
419
  nullable_fields = [
407
420
  "country",
@@ -426,11 +439,13 @@ class TransactionCreate(BaseModel):
426
439
  "installment_count",
427
440
  "tax_amount",
428
441
  "merchant_tax_id",
442
+ "purchase_order_number",
429
443
  "customer_reference_number",
430
444
  "amount_includes_tax",
431
445
  "supplier_order_number",
432
446
  "duty_amount",
433
447
  "shipping_amount",
448
+ "integration_client",
434
449
  ]
435
450
  null_default_fields = []
436
451
 
@@ -3,9 +3,9 @@
3
3
  from __future__ import annotations
4
4
  from datetime import datetime
5
5
  from gr4vy.types import BaseModel, UnrecognizedStr
6
- from gr4vy.utils import validate_const, validate_open_enum
6
+ from gr4vy.utils import validate_const
7
7
  import pydantic
8
- from pydantic.functional_validators import AfterValidator, PlainValidator
8
+ from pydantic.functional_validators import AfterValidator
9
9
  from typing import Any, Dict, Literal, Optional, Union
10
10
  from typing_extensions import Annotated, TypedDict
11
11
 
@@ -53,6 +53,7 @@ Name = Union[
53
53
  "payment-connector-report-transaction-settled",
54
54
  "payment-connector-report-chargeback-posted",
55
55
  "payment-connector-report-chargeback-reversal-posted",
56
+ "payment-connector-transaction-webhook-processed",
56
57
  "digital-wallet-apple-pay-token-decrypted",
57
58
  "digital-wallet-google-pay-token-decrypted",
58
59
  "digital-wallet-click-to-pay-token-decrypted",
@@ -62,6 +63,7 @@ Name = Union[
62
63
  "network-token-cryptogram-provision-failed",
63
64
  "the-giving-block-transaction-conversion-succeeded",
64
65
  "real-time-account-update",
66
+ "plaid-request-event",
65
67
  ],
66
68
  UnrecognizedStr,
67
69
  ]
@@ -84,7 +86,7 @@ class TransactionEvent(BaseModel):
84
86
  id: str
85
87
  r"""The ID for the event."""
86
88
 
87
- name: Annotated[Name, PlainValidator(validate_open_enum(False))]
89
+ name: Name
88
90
  r"""The specific event name."""
89
91
 
90
92
  created_at: datetime
@@ -11,10 +11,10 @@ from .paymentmethoddetailscard import (
11
11
  )
12
12
  from datetime import datetime
13
13
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
14
- from gr4vy.utils import validate_const, validate_open_enum
14
+ from gr4vy.utils import validate_const
15
15
  import pydantic
16
16
  from pydantic import model_serializer
17
- from pydantic.functional_validators import AfterValidator, PlainValidator
17
+ from pydantic.functional_validators import AfterValidator
18
18
  from typing import Literal, Optional
19
19
  from typing_extensions import Annotated, NotRequired, TypedDict
20
20
 
@@ -54,7 +54,7 @@ class TransactionPaymentMethodTypedDict(TypedDict):
54
54
 
55
55
 
56
56
  class TransactionPaymentMethod(BaseModel):
57
- method: Annotated[Method, PlainValidator(validate_open_enum(False))]
57
+ method: Method
58
58
 
59
59
  TYPE: Annotated[
60
60
  Annotated[
@@ -89,22 +89,16 @@ class TransactionPaymentMethod(BaseModel):
89
89
  last_replaced_at: OptionalNullable[datetime] = UNSET
90
90
  r"""The date and time when this card was last replaced by the account updater."""
91
91
 
92
- mode: Annotated[
93
- OptionalNullable[Mode], PlainValidator(validate_open_enum(False))
94
- ] = UNSET
92
+ mode: OptionalNullable[Mode] = UNSET
95
93
  r"""The mode to use with this payment method."""
96
94
 
97
- scheme: Annotated[
98
- OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
99
- ] = UNSET
95
+ scheme: OptionalNullable[CardScheme] = UNSET
100
96
  r"""The scheme of the card. Only applies to card payments."""
101
97
 
102
98
  id: OptionalNullable[str] = UNSET
103
99
  r"""The ID of the payment method."""
104
100
 
105
- approval_target: Annotated[
106
- OptionalNullable[ApprovalTarget], PlainValidator(validate_open_enum(False))
107
- ] = UNSET
101
+ approval_target: OptionalNullable[ApprovalTarget] = UNSET
108
102
  r"""The browser target that an approval URL must be opened in. If any or null, then there is no specific requirement."""
109
103
 
110
104
  external_identifier: OptionalNullable[str] = UNSET