gr4vy 1.1.29__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.

Potentially problematic release.


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

Files changed (219) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/account_updater.py +6 -3
  3. gr4vy/actions.py +307 -0
  4. gr4vy/all.py +4 -2
  5. gr4vy/audit_logs.py +6 -4
  6. gr4vy/balances.py +4 -2
  7. gr4vy/basesdk.py +17 -1
  8. gr4vy/buyers_gift_cards.py +4 -2
  9. gr4vy/buyers_payment_methods.py +4 -2
  10. gr4vy/buyers_sdk.py +43 -25
  11. gr4vy/buyers_shipping_details.py +26 -16
  12. gr4vy/card_scheme_definitions_sdk.py +4 -2
  13. gr4vy/checkout_sessions.py +40 -14
  14. gr4vy/digital_wallets_sdk.py +32 -20
  15. gr4vy/domains.py +14 -10
  16. gr4vy/errors/__init__.py +15 -3
  17. gr4vy/errors/apierror.py +2 -0
  18. gr4vy/errors/error400.py +4 -6
  19. gr4vy/errors/error401.py +4 -6
  20. gr4vy/errors/error403.py +4 -6
  21. gr4vy/errors/error404.py +4 -6
  22. gr4vy/errors/error405.py +4 -6
  23. gr4vy/errors/error409.py +4 -6
  24. gr4vy/errors/error425.py +4 -6
  25. gr4vy/errors/error429.py +4 -6
  26. gr4vy/errors/error500.py +4 -6
  27. gr4vy/errors/error502.py +4 -6
  28. gr4vy/errors/error504.py +4 -6
  29. gr4vy/errors/gr4vyerror.py +11 -7
  30. gr4vy/errors/httpvalidationerror.py +4 -2
  31. gr4vy/errors/no_response_error.py +5 -1
  32. gr4vy/errors/responsevalidationerror.py +2 -0
  33. gr4vy/events.py +54 -7
  34. gr4vy/executions.py +38 -8
  35. gr4vy/gift_cards_sdk.py +29 -19
  36. gr4vy/httpclient.py +0 -1
  37. gr4vy/jobs.py +4 -2
  38. gr4vy/merchant_accounts_sdk.py +30 -10
  39. gr4vy/models/__init__.py +184 -30
  40. gr4vy/models/adyenautorescuesepascenariosenum.py +3 -1
  41. gr4vy/models/adyencardoptions.py +9 -6
  42. gr4vy/models/adyensepaoptions.py +1 -6
  43. gr4vy/models/adyensplitsoptions.py +57 -0
  44. gr4vy/models/airline.py +9 -8
  45. gr4vy/models/airlineleg.py +9 -7
  46. gr4vy/models/airlinepassenger.py +9 -7
  47. gr4vy/models/antifrauddecision.py +9 -1
  48. gr4vy/models/approvaltarget.py +7 -1
  49. gr4vy/models/auditlogaction.py +9 -1
  50. gr4vy/models/auditlogentry.py +3 -3
  51. gr4vy/models/auditlogentryuser.py +3 -3
  52. gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
  53. gr4vy/models/braintreedynamicdatafieldsoptions.py +33 -3
  54. gr4vy/models/browserinfo.py +9 -5
  55. gr4vy/models/buyer.py +3 -3
  56. gr4vy/models/buyercreate.py +3 -3
  57. gr4vy/models/buyerupdate.py +3 -3
  58. gr4vy/models/cancel_transactionop.py +43 -0
  59. gr4vy/models/cancelstatus.py +15 -0
  60. gr4vy/models/capturestatus.py +7 -1
  61. gr4vy/models/cardtype.py +8 -1
  62. gr4vy/models/cartitem.py +53 -8
  63. gr4vy/models/chaseoptions.py +46 -0
  64. gr4vy/models/checkoutsession.py +24 -3
  65. gr4vy/models/checkoutsessioncreate.py +39 -5
  66. gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
  67. gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
  68. gr4vy/models/create_payment_methodop.py +6 -0
  69. gr4vy/models/create_report_execution_urlop.py +16 -1
  70. gr4vy/models/createsession.py +3 -3
  71. gr4vy/models/createsessionstatus.py +7 -1
  72. gr4vy/models/cvvresponsecode.py +7 -1
  73. gr4vy/models/cybersourceoptions.py +7 -0
  74. gr4vy/models/definitionfield.py +1 -6
  75. gr4vy/models/definitionfieldformat.py +8 -1
  76. gr4vy/models/digitalwallet.py +3 -5
  77. gr4vy/models/digitalwalletcreate.py +2 -6
  78. gr4vy/models/digitalwalletprovider.py +6 -1
  79. gr4vy/models/dlocalupioptions.py +50 -0
  80. gr4vy/models/dlocalupirecurringinfooptions.py +47 -0
  81. gr4vy/models/dlocalupiwalletoptions.py +89 -0
  82. gr4vy/models/errordetail.py +2 -4
  83. gr4vy/models/errorlocation.py +8 -1
  84. gr4vy/models/flow.py +16 -0
  85. gr4vy/models/flowaction.py +16 -0
  86. gr4vy/models/forterantifraudoptions.py +8 -8
  87. gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +10 -8
  88. gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +9 -7
  89. gr4vy/models/giftcardredemption.py +4 -8
  90. gr4vy/models/giftcardredemptionstatus.py +7 -1
  91. gr4vy/models/giftcardservice.py +3 -5
  92. gr4vy/models/giftcardserviceprovider.py +5 -1
  93. gr4vy/models/giftcardsummary.py +3 -5
  94. gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
  95. gr4vy/models/instrumenttype.py +1 -0
  96. gr4vy/models/integrationclient.py +16 -0
  97. gr4vy/models/internal/__init__.py +14 -1
  98. gr4vy/models/list_all_report_executionsop.py +2 -14
  99. gr4vy/models/list_audit_logsop.py +2 -10
  100. gr4vy/models/list_buyer_payment_methodsop.py +9 -4
  101. gr4vy/models/list_payment_methodsop.py +2 -14
  102. gr4vy/models/list_payment_servicesop.py +2 -8
  103. gr4vy/models/list_reportsop.py +2 -10
  104. gr4vy/models/list_transaction_actionsop.py +43 -0
  105. gr4vy/models/list_transaction_eventsop.py +12 -1
  106. gr4vy/models/list_transactionsop.py +14 -22
  107. gr4vy/models/merchantaccount.py +9 -5
  108. gr4vy/models/merchantaccountcreate.py +8 -6
  109. gr4vy/models/merchantaccountupdate.py +8 -6
  110. gr4vy/models/merchantprofilescheme.py +7 -7
  111. gr4vy/models/merchantprofileschemesummary.py +7 -7
  112. gr4vy/models/method.py +4 -0
  113. gr4vy/models/mockcardoptions.py +7 -2
  114. gr4vy/models/mode.py +1 -0
  115. gr4vy/models/monatospeioptions.py +15 -0
  116. gr4vy/models/networktoken.py +3 -3
  117. gr4vy/models/networktokenpaymentmethodcreate.py +11 -9
  118. gr4vy/models/networktokenstatus.py +7 -1
  119. gr4vy/models/nuveiidealoptions.py +49 -0
  120. gr4vy/models/nuveipseoptions.py +70 -0
  121. gr4vy/models/paymentlink.py +25 -7
  122. gr4vy/models/paymentlinkcreate.py +23 -28
  123. gr4vy/models/paymentlinkstatus.py +7 -1
  124. gr4vy/models/paymentmethod.py +7 -13
  125. gr4vy/models/paymentmethodcard.py +3 -5
  126. gr4vy/models/paymentmethoddetailscard.py +2 -6
  127. gr4vy/models/paymentmethodstatus.py +7 -1
  128. gr4vy/models/paymentmethodsummary.py +6 -12
  129. gr4vy/models/paymentoption.py +3 -3
  130. gr4vy/models/paymentservice.py +4 -6
  131. gr4vy/models/paymentserviceconfiguration.py +2 -6
  132. gr4vy/models/paymentservicedefinition.py +11 -5
  133. gr4vy/models/paymentservicestatus.py +8 -1
  134. gr4vy/models/paymentservicetoken.py +3 -3
  135. gr4vy/models/payoutcategory.py +1 -1
  136. gr4vy/models/payoutcreate.py +5 -9
  137. gr4vy/models/payoutstatus.py +7 -1
  138. gr4vy/models/payoutsummary.py +4 -6
  139. gr4vy/models/paypaloptions.py +8 -2
  140. gr4vy/models/paypalshippingoptions.py +51 -0
  141. gr4vy/models/paypalshippingoptionsitem.py +89 -0
  142. gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
  143. gr4vy/models/plaidpaymentmethodcreate.py +106 -0
  144. gr4vy/models/redirectpaymentmethodcreate.py +4 -6
  145. gr4vy/models/refund.py +4 -4
  146. gr4vy/models/refundstatus.py +8 -1
  147. gr4vy/models/refundtargettype.py +5 -1
  148. gr4vy/models/report.py +4 -6
  149. gr4vy/models/reportcreate.py +2 -3
  150. gr4vy/models/reportcreatortype.py +7 -1
  151. gr4vy/models/reportexecution.py +3 -3
  152. gr4vy/models/reportexecutionstatus.py +7 -1
  153. gr4vy/models/reportexecutionsummary.py +3 -3
  154. gr4vy/models/reportexecutionurlgenerate.py +16 -0
  155. gr4vy/models/reportschedule.py +9 -1
  156. gr4vy/models/reportspec.py +2 -4
  157. gr4vy/models/reportsummary.py +3 -5
  158. gr4vy/models/settlement.py +32 -32
  159. gr4vy/models/statementdescriptor.py +7 -0
  160. gr4vy/models/stripeconnectoptions.py +7 -0
  161. gr4vy/models/taxid.py +2 -4
  162. gr4vy/models/taxidkind.py +7 -0
  163. gr4vy/models/threedsecuredatav1.py +2 -6
  164. gr4vy/models/threedsecuredatav2.py +2 -6
  165. gr4vy/models/threedsecuremethod.py +7 -1
  166. gr4vy/models/threedsecurestatus.py +7 -1
  167. gr4vy/models/transaction.py +86 -25
  168. gr4vy/models/transactionaction.py +48 -0
  169. gr4vy/models/transactionactions.py +17 -0
  170. gr4vy/models/transactionbuyer.py +3 -3
  171. gr4vy/models/transactioncancel.py +81 -0
  172. gr4vy/models/transactioncapture.py +3 -3
  173. gr4vy/models/transactionconnectionoptions.py +50 -0
  174. gr4vy/models/transactioncreate.py +76 -12
  175. gr4vy/models/transactionevent.py +10 -3
  176. gr4vy/models/transactionintent.py +7 -1
  177. gr4vy/models/transactionintentoutcome.py +6 -1
  178. gr4vy/models/transactionpaymentmethod.py +6 -12
  179. gr4vy/models/transactionpaymentservice.py +3 -3
  180. gr4vy/models/transactionpaymentsource.py +7 -1
  181. gr4vy/models/transactionrefundcreate.py +2 -6
  182. gr4vy/models/transactionsummary.py +11 -10
  183. gr4vy/models/transactionthreedsecuresummary.py +3 -9
  184. gr4vy/models/transactionvoid.py +3 -3
  185. gr4vy/models/userstatus.py +8 -1
  186. gr4vy/models/voidstatus.py +7 -1
  187. gr4vy/network_tokens_cryptogram.py +4 -2
  188. gr4vy/payment_links_sdk.py +36 -16
  189. gr4vy/payment_methods_network_tokens.py +27 -13
  190. gr4vy/payment_methods_payment_service_tokens.py +12 -6
  191. gr4vy/payment_methods_sdk.py +26 -14
  192. gr4vy/payment_options_sdk.py +4 -2
  193. gr4vy/payment_service_definitions_sdk.py +14 -8
  194. gr4vy/payment_services_sdk.py +36 -22
  195. gr4vy/payouts.py +18 -12
  196. gr4vy/refunds_sdk.py +4 -2
  197. gr4vy/report_executions_sdk.py +6 -4
  198. gr4vy/reports_sdk.py +23 -13
  199. gr4vy/sdk.py +17 -4
  200. gr4vy/sessions.py +12 -6
  201. gr4vy/transactions.py +446 -33
  202. gr4vy/transactions_refunds.py +17 -9
  203. gr4vy/transactions_settlements.py +8 -4
  204. gr4vy/types/basemodel.py +41 -3
  205. gr4vy/utils/__init__.py +15 -6
  206. gr4vy/utils/annotations.py +32 -8
  207. gr4vy/utils/enums.py +60 -0
  208. gr4vy/utils/eventstreaming.py +10 -0
  209. gr4vy/utils/forms.py +21 -10
  210. gr4vy/utils/queryparams.py +14 -2
  211. gr4vy/utils/requestbodies.py +1 -1
  212. gr4vy/utils/retries.py +69 -5
  213. gr4vy/utils/serializers.py +0 -20
  214. gr4vy/utils/unmarshal_json_response.py +15 -1
  215. {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/METADATA +43 -41
  216. {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/RECORD +217 -196
  217. {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +1 -1
  218. gr4vy/models/billingdetails_output.py +0 -87
  219. gr4vy/models/guestbuyer_output.py +0 -80
@@ -0,0 +1,46 @@
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 pydantic import model_serializer
6
+ from typing_extensions import NotRequired, TypedDict
7
+
8
+
9
+ class ChaseOptionsTypedDict(TypedDict):
10
+ comments: NotRequired[Nullable[str]]
11
+ r"""Custom order comment"""
12
+
13
+
14
+ class ChaseOptions(BaseModel):
15
+ comments: OptionalNullable[str] = UNSET
16
+ r"""Custom order comment"""
17
+
18
+ @model_serializer(mode="wrap")
19
+ def serialize_model(self, handler):
20
+ optional_fields = ["comments"]
21
+ nullable_fields = ["comments"]
22
+ null_default_fields = []
23
+
24
+ serialized = handler(self)
25
+
26
+ m = {}
27
+
28
+ for n, f in type(self).model_fields.items():
29
+ k = f.alias or n
30
+ val = serialized.get(k)
31
+ serialized.pop(k, None)
32
+
33
+ optional_nullable = k in optional_fields and k in nullable_fields
34
+ is_set = (
35
+ self.__pydantic_fields_set__.intersection({n})
36
+ or k in null_default_fields
37
+ ) # pylint: disable=no-member
38
+
39
+ if val is not None and val != UNSET_SENTINEL:
40
+ m[k] = val
41
+ elif val != UNSET_SENTINEL and (
42
+ not k in optional_fields or (optional_nullable and is_set)
43
+ ):
44
+ m[k] = val
45
+
46
+ return m
@@ -7,7 +7,7 @@ from .checkoutsessionpaymentmethod import (
7
7
  CheckoutSessionPaymentMethod,
8
8
  CheckoutSessionPaymentMethodTypedDict,
9
9
  )
10
- from .guestbuyer_output import GuestBuyerOutput, GuestBuyerOutputTypedDict
10
+ from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
11
11
  from datetime import datetime
12
12
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
13
13
  from gr4vy.utils import validate_const
@@ -27,10 +27,16 @@ class CheckoutSessionTypedDict(TypedDict):
27
27
  r"""An array of cart items that represents the line items of a transaction."""
28
28
  metadata: NotRequired[Nullable[Dict[str, str]]]
29
29
  r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
30
- buyer: NotRequired[Nullable[GuestBuyerOutputTypedDict]]
30
+ buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
31
31
  r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
32
32
  airline: NotRequired[Nullable[AirlineTypedDict]]
33
33
  r"""The airline addendum data which describes the airline booking associated with this transaction."""
34
+ amount: NotRequired[Nullable[int]]
35
+ r"""The total amount for this transaction."""
36
+ currency: NotRequired[Nullable[str]]
37
+ r"""The currency code for this transaction."""
38
+ payment_service_id: NotRequired[Nullable[str]]
39
+ r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
34
40
  type: Literal["checkout-session"]
35
41
  r"""Always `checkout-session`"""
36
42
  payment_method: NotRequired[Nullable[CheckoutSessionPaymentMethodTypedDict]]
@@ -50,12 +56,21 @@ class CheckoutSession(BaseModel):
50
56
  metadata: OptionalNullable[Dict[str, str]] = UNSET
51
57
  r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
52
58
 
53
- buyer: OptionalNullable[GuestBuyerOutput] = UNSET
59
+ buyer: OptionalNullable[GuestBuyer] = UNSET
54
60
  r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
55
61
 
56
62
  airline: OptionalNullable[Airline] = UNSET
57
63
  r"""The airline addendum data which describes the airline booking associated with this transaction."""
58
64
 
65
+ amount: OptionalNullable[int] = UNSET
66
+ r"""The total amount for this transaction."""
67
+
68
+ currency: OptionalNullable[str] = UNSET
69
+ r"""The currency code for this transaction."""
70
+
71
+ payment_service_id: OptionalNullable[str] = UNSET
72
+ r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
73
+
59
74
  TYPE: Annotated[
60
75
  Annotated[
61
76
  Optional[Literal["checkout-session"]],
@@ -75,6 +90,9 @@ class CheckoutSession(BaseModel):
75
90
  "metadata",
76
91
  "buyer",
77
92
  "airline",
93
+ "amount",
94
+ "currency",
95
+ "payment_service_id",
78
96
  "type",
79
97
  "payment_method",
80
98
  ]
@@ -83,6 +101,9 @@ class CheckoutSession(BaseModel):
83
101
  "metadata",
84
102
  "buyer",
85
103
  "airline",
104
+ "amount",
105
+ "currency",
106
+ "payment_service_id",
86
107
  "payment_method",
87
108
  ]
88
109
  null_default_fields = []
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
  from .airline import Airline, AirlineTypedDict
5
5
  from .cartitem import CartItem, CartItemTypedDict
6
- from .guestbuyer_input import GuestBuyerInput, GuestBuyerInputTypedDict
6
+ from .guestbuyer import GuestBuyer, GuestBuyerTypedDict
7
7
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
8
8
  from pydantic import model_serializer
9
9
  from typing import Dict, List, Optional
@@ -15,11 +15,18 @@ class CheckoutSessionCreateTypedDict(TypedDict):
15
15
  r"""An array of cart items that represents the line items of a transaction."""
16
16
  metadata: NotRequired[Nullable[Dict[str, str]]]
17
17
  r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
18
- buyer: NotRequired[Nullable[GuestBuyerInputTypedDict]]
18
+ buyer: NotRequired[Nullable[GuestBuyerTypedDict]]
19
19
  r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
20
20
  airline: NotRequired[Nullable[AirlineTypedDict]]
21
21
  r"""The airline addendum data which describes the airline booking associated with this transaction."""
22
+ amount: NotRequired[Nullable[int]]
23
+ r"""The total amount for this transaction."""
24
+ currency: NotRequired[Nullable[str]]
25
+ r"""The currency code for this transaction."""
26
+ payment_service_id: NotRequired[Nullable[str]]
27
+ r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
22
28
  expires_in: NotRequired[float]
29
+ r"""The time in seconds when this checkout session expires."""
23
30
 
24
31
 
25
32
  class CheckoutSessionCreate(BaseModel):
@@ -29,18 +36,45 @@ class CheckoutSessionCreate(BaseModel):
29
36
  metadata: OptionalNullable[Dict[str, str]] = UNSET
30
37
  r"""Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it."""
31
38
 
32
- buyer: OptionalNullable[GuestBuyerInput] = UNSET
39
+ buyer: OptionalNullable[GuestBuyer] = UNSET
33
40
  r"""Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used."""
34
41
 
35
42
  airline: OptionalNullable[Airline] = UNSET
36
43
  r"""The airline addendum data which describes the airline booking associated with this transaction."""
37
44
 
45
+ amount: OptionalNullable[int] = UNSET
46
+ r"""The total amount for this transaction."""
47
+
48
+ currency: OptionalNullable[str] = UNSET
49
+ r"""The currency code for this transaction."""
50
+
51
+ payment_service_id: OptionalNullable[str] = UNSET
52
+ r"""The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped."""
53
+
38
54
  expires_in: Optional[float] = 3600
55
+ r"""The time in seconds when this checkout session expires."""
39
56
 
40
57
  @model_serializer(mode="wrap")
41
58
  def serialize_model(self, handler):
42
- optional_fields = ["cart_items", "metadata", "buyer", "airline", "expires_in"]
43
- nullable_fields = ["cart_items", "metadata", "buyer", "airline"]
59
+ optional_fields = [
60
+ "cart_items",
61
+ "metadata",
62
+ "buyer",
63
+ "airline",
64
+ "amount",
65
+ "currency",
66
+ "payment_service_id",
67
+ "expires_in",
68
+ ]
69
+ nullable_fields = [
70
+ "cart_items",
71
+ "metadata",
72
+ "buyer",
73
+ "airline",
74
+ "amount",
75
+ "currency",
76
+ "payment_service_id",
77
+ ]
44
78
  null_default_fields = []
45
79
 
46
80
  serialized = handler(self)
@@ -7,10 +7,10 @@ from .checkoutsessionpaymentmethoddetails import (
7
7
  CheckoutSessionPaymentMethodDetailsTypedDict,
8
8
  )
9
9
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
10
- from gr4vy.utils import validate_const, validate_open_enum
10
+ from gr4vy.utils import validate_const
11
11
  import pydantic
12
12
  from pydantic import model_serializer
13
- from pydantic.functional_validators import AfterValidator, PlainValidator
13
+ from pydantic.functional_validators import AfterValidator
14
14
  from typing import Literal, Optional
15
15
  from typing_extensions import Annotated, NotRequired, TypedDict
16
16
 
@@ -57,9 +57,7 @@ class CheckoutSessionPaymentMethod(BaseModel):
57
57
  ] = "card"
58
58
  r"""Always `card`"""
59
59
 
60
- scheme: Annotated[
61
- OptionalNullable[CardScheme], PlainValidator(validate_open_enum(False))
62
- ] = UNSET
60
+ scheme: OptionalNullable[CardScheme] = UNSET
63
61
  r"""The scheme of the card."""
64
62
 
65
63
  fingerprint: OptionalNullable[str] = UNSET
@@ -3,10 +3,8 @@
3
3
  from __future__ import annotations
4
4
  from .cardtype import CardType
5
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
- from gr4vy.utils import validate_open_enum
7
6
  from pydantic import model_serializer
8
- from pydantic.functional_validators import PlainValidator
9
- from typing_extensions import Annotated, NotRequired, TypedDict
7
+ from typing_extensions import NotRequired, TypedDict
10
8
 
11
9
 
12
10
  class CheckoutSessionPaymentMethodDetailsTypedDict(TypedDict):
@@ -27,9 +25,7 @@ class CheckoutSessionPaymentMethodDetails(BaseModel):
27
25
  card_country: OptionalNullable[str] = UNSET
28
26
  r"""The country of the card issuer."""
29
27
 
30
- card_type: Annotated[
31
- OptionalNullable[CardType], PlainValidator(validate_open_enum(False))
32
- ] = UNSET
28
+ card_type: OptionalNullable[CardType] = UNSET
33
29
  r"""The payment scheme of the card."""
34
30
 
35
31
  card_issuer_name: OptionalNullable[str] = UNSET
@@ -9,6 +9,10 @@ from .checkoutsessionpaymentmethodcreate import (
9
9
  CheckoutSessionPaymentMethodCreate,
10
10
  CheckoutSessionPaymentMethodCreateTypedDict,
11
11
  )
12
+ from .plaidpaymentmethodcreate import (
13
+ PlaidPaymentMethodCreate,
14
+ PlaidPaymentMethodCreateTypedDict,
15
+ )
12
16
  from .redirectpaymentmethodcreate import (
13
17
  RedirectPaymentMethodCreate,
14
18
  RedirectPaymentMethodCreateTypedDict,
@@ -39,6 +43,7 @@ BodyTypedDict = TypeAliasType(
39
43
  Union[
40
44
  CheckoutSessionPaymentMethodCreateTypedDict,
41
45
  RedirectPaymentMethodCreateTypedDict,
46
+ PlaidPaymentMethodCreateTypedDict,
42
47
  CardPaymentMethodCreateTypedDict,
43
48
  ],
44
49
  )
@@ -49,6 +54,7 @@ Body = TypeAliasType(
49
54
  Union[
50
55
  CheckoutSessionPaymentMethodCreate,
51
56
  RedirectPaymentMethodCreate,
57
+ PlaidPaymentMethodCreate,
52
58
  CardPaymentMethodCreate,
53
59
  ],
54
60
  )
@@ -1,8 +1,17 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
+ from .reportexecutionurlgenerate import (
5
+ ReportExecutionURLGenerate,
6
+ ReportExecutionURLGenerateTypedDict,
7
+ )
4
8
  from gr4vy.types import BaseModel
5
- from gr4vy.utils import FieldMetadata, HeaderMetadata, PathParamMetadata
9
+ from gr4vy.utils import (
10
+ FieldMetadata,
11
+ HeaderMetadata,
12
+ PathParamMetadata,
13
+ RequestMetadata,
14
+ )
6
15
  import pydantic
7
16
  from typing import Optional
8
17
  from typing_extensions import Annotated, NotRequired, TypedDict
@@ -29,6 +38,7 @@ class CreateReportExecutionURLRequestTypedDict(TypedDict):
29
38
  r"""The ID of the execution of a report to retrieve a URL for."""
30
39
  merchant_account_id: NotRequired[str]
31
40
  r"""The ID of the merchant account to use for this request."""
41
+ report_execution_url_generate: NotRequired[ReportExecutionURLGenerateTypedDict]
32
42
 
33
43
 
34
44
  class CreateReportExecutionURLRequest(BaseModel):
@@ -48,3 +58,8 @@ class CreateReportExecutionURLRequest(BaseModel):
48
58
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
49
59
  ] = None
50
60
  r"""The ID of the merchant account to use for this request."""
61
+
62
+ report_execution_url_generate: Annotated[
63
+ Optional[ReportExecutionURLGenerate],
64
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
65
+ ] = None
@@ -3,10 +3,10 @@
3
3
  from __future__ import annotations
4
4
  from .createsessionstatus import CreateSessionStatus
5
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
- from gr4vy.utils import validate_const, validate_open_enum
6
+ from gr4vy.utils import validate_const
7
7
  import pydantic
8
8
  from pydantic import model_serializer
9
- from pydantic.functional_validators import AfterValidator, PlainValidator
9
+ from pydantic.functional_validators import AfterValidator
10
10
  from typing import Any, Dict, Literal, Optional
11
11
  from typing_extensions import Annotated, NotRequired, TypedDict
12
12
 
@@ -28,7 +28,7 @@ class CreateSessionTypedDict(TypedDict):
28
28
  class CreateSession(BaseModel):
29
29
  r"""The session data received from the payment service."""
30
30
 
31
- status: Annotated[CreateSessionStatus, PlainValidator(validate_open_enum(False))]
31
+ status: CreateSessionStatus
32
32
 
33
33
  TYPE: Annotated[
34
34
  Annotated[
@@ -5,4 +5,10 @@ from gr4vy.types import UnrecognizedStr
5
5
  from typing import Literal, Union
6
6
 
7
7
 
8
- CreateSessionStatus = Union[Literal["succeeded", "failed"], UnrecognizedStr]
8
+ CreateSessionStatus = Union[
9
+ Literal[
10
+ "succeeded",
11
+ "failed",
12
+ ],
13
+ UnrecognizedStr,
14
+ ]
@@ -6,5 +6,11 @@ from typing import Literal, Union
6
6
 
7
7
 
8
8
  CVVResponseCode = Union[
9
- Literal["match", "no_match", "unavailable", "not_provided"], UnrecognizedStr
9
+ Literal[
10
+ "match",
11
+ "no_match",
12
+ "unavailable",
13
+ "not_provided",
14
+ ],
15
+ UnrecognizedStr,
10
16
  ]
@@ -14,6 +14,8 @@ class CybersourceOptionsTypedDict(TypedDict):
14
14
  r"""A list of merchant defined data to be passed to the Cybersource. Each key needs to be a numeric string."""
15
15
  ship_to_method: NotRequired[Nullable[str]]
16
16
  r"""The shipping method for this transaction."""
17
+ comments: NotRequired[Nullable[str]]
18
+ r"""Brief description of the order or any comment you wish to add to the order."""
17
19
 
18
20
 
19
21
  class CybersourceOptions(BaseModel):
@@ -26,17 +28,22 @@ class CybersourceOptions(BaseModel):
26
28
  ship_to_method: OptionalNullable[str] = UNSET
27
29
  r"""The shipping method for this transaction."""
28
30
 
31
+ comments: OptionalNullable[str] = UNSET
32
+ r"""Brief description of the order or any comment you wish to add to the order."""
33
+
29
34
  @model_serializer(mode="wrap")
30
35
  def serialize_model(self, handler):
31
36
  optional_fields = [
32
37
  "meta_key_merchant_id",
33
38
  "merchant_defined_information",
34
39
  "ship_to_method",
40
+ "comments",
35
41
  ]
36
42
  nullable_fields = [
37
43
  "meta_key_merchant_id",
38
44
  "merchant_defined_information",
39
45
  "ship_to_method",
46
+ "comments",
40
47
  ]
41
48
  null_default_fields = []
42
49
 
@@ -3,9 +3,7 @@
3
3
  from __future__ import annotations
4
4
  from .definitionfieldformat import DefinitionFieldFormat
5
5
  from gr4vy.types import BaseModel
6
- from gr4vy.utils import validate_open_enum
7
6
  import pydantic
8
- from pydantic.functional_validators import PlainValidator
9
7
  from typing_extensions import Annotated, TypedDict
10
8
 
11
9
 
@@ -35,10 +33,7 @@ class DefinitionField(BaseModel):
35
33
  required: bool
36
34
  r"""Defines if this field is required when the service is created."""
37
35
 
38
- format_: Annotated[
39
- Annotated[DefinitionFieldFormat, PlainValidator(validate_open_enum(False))],
40
- pydantic.Field(alias="format"),
41
- ]
36
+ format_: Annotated[DefinitionFieldFormat, pydantic.Field(alias="format")]
42
37
 
43
38
  secret: bool
44
39
  r"""Defines if this field is secret. When `true` the field's value is not returned when querying the payment service information."""
@@ -6,5 +6,12 @@ from typing import Literal, Union
6
6
 
7
7
 
8
8
  DefinitionFieldFormat = Union[
9
- Literal["text", "multiline", "number", "timezone", "boolean"], UnrecognizedStr
9
+ Literal[
10
+ "text",
11
+ "multiline",
12
+ "number",
13
+ "timezone",
14
+ "boolean",
15
+ ],
16
+ UnrecognizedStr,
10
17
  ]
@@ -4,10 +4,10 @@ from __future__ import annotations
4
4
  from .digitalwalletprovider import DigitalWalletProvider
5
5
  from datetime import datetime
6
6
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, 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 Any, Dict, List, Literal, Optional
12
12
  from typing_extensions import Annotated, NotRequired, TypedDict
13
13
 
@@ -51,9 +51,7 @@ class DigitalWallet(BaseModel):
51
51
  merchant_account_id: str
52
52
  r"""The ID of the merchant account this digital wallet belongs to."""
53
53
 
54
- provider: Annotated[
55
- DigitalWalletProvider, PlainValidator(validate_open_enum(False))
56
- ]
54
+ provider: DigitalWalletProvider
57
55
 
58
56
  merchant_name: str
59
57
  r"""The name of the merchant the digital wallet is registered to."""
@@ -3,11 +3,9 @@
3
3
  from __future__ import annotations
4
4
  from .digitalwalletprovider import DigitalWalletProvider
5
5
  from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
- from gr4vy.utils import validate_open_enum
7
6
  from pydantic import model_serializer
8
- from pydantic.functional_validators import PlainValidator
9
7
  from typing import List, Optional
10
- from typing_extensions import Annotated, NotRequired, TypedDict
8
+ from typing_extensions import NotRequired, TypedDict
11
9
 
12
10
 
13
11
  class DigitalWalletCreateTypedDict(TypedDict):
@@ -25,9 +23,7 @@ class DigitalWalletCreateTypedDict(TypedDict):
25
23
  class DigitalWalletCreate(BaseModel):
26
24
  r"""Request body for registering a new digital wallet"""
27
25
 
28
- provider: Annotated[
29
- DigitalWalletProvider, PlainValidator(validate_open_enum(False))
30
- ]
26
+ provider: DigitalWalletProvider
31
27
 
32
28
  merchant_name: str
33
29
 
@@ -6,5 +6,10 @@ from typing import Literal, Union
6
6
 
7
7
 
8
8
  DigitalWalletProvider = Union[
9
- Literal["apple", "google", "click-to-pay"], UnrecognizedStr
9
+ Literal[
10
+ "apple",
11
+ "google",
12
+ "click-to-pay",
13
+ ],
14
+ UnrecognizedStr,
10
15
  ]
@@ -0,0 +1,50 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .dlocalupiwalletoptions import (
5
+ DlocalUPIWalletOptions,
6
+ DlocalUPIWalletOptionsTypedDict,
7
+ )
8
+ from gr4vy.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
9
+ from pydantic import model_serializer
10
+ from typing_extensions import NotRequired, TypedDict
11
+
12
+
13
+ class DlocalUPIOptionsTypedDict(TypedDict):
14
+ wallet: NotRequired[Nullable[DlocalUPIWalletOptionsTypedDict]]
15
+ r"""Passes `wallet` data to the dLocal API for those connectors that need it."""
16
+
17
+
18
+ class DlocalUPIOptions(BaseModel):
19
+ wallet: OptionalNullable[DlocalUPIWalletOptions] = UNSET
20
+ r"""Passes `wallet` data to the dLocal API for those connectors that need it."""
21
+
22
+ @model_serializer(mode="wrap")
23
+ def serialize_model(self, handler):
24
+ optional_fields = ["wallet"]
25
+ nullable_fields = ["wallet"]
26
+ null_default_fields = []
27
+
28
+ serialized = handler(self)
29
+
30
+ m = {}
31
+
32
+ for n, f in type(self).model_fields.items():
33
+ k = f.alias or n
34
+ val = serialized.get(k)
35
+ serialized.pop(k, None)
36
+
37
+ optional_nullable = k in optional_fields and k in nullable_fields
38
+ is_set = (
39
+ self.__pydantic_fields_set__.intersection({n})
40
+ or k in null_default_fields
41
+ ) # pylint: disable=no-member
42
+
43
+ if val is not None and val != UNSET_SENTINEL:
44
+ m[k] = val
45
+ elif val != UNSET_SENTINEL and (
46
+ not k in optional_fields or (optional_nullable and is_set)
47
+ ):
48
+ m[k] = val
49
+
50
+ return m
@@ -0,0 +1,47 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from gr4vy.types import BaseModel, UnrecognizedStr
5
+ from typing import Literal, Union
6
+ from typing_extensions import TypedDict
7
+
8
+
9
+ SubscriptionFrequencyUnit = Union[
10
+ Literal[
11
+ "MONTH",
12
+ "WEEK",
13
+ "BI_MONTHLY",
14
+ "ONDEMAND",
15
+ "QUARTER",
16
+ "YEAR",
17
+ "SEMI_ANNUALLY",
18
+ "DAY",
19
+ ],
20
+ UnrecognizedStr,
21
+ ]
22
+ r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
23
+
24
+
25
+ class DlocalUPIRecurringInfoOptionsTypedDict(TypedDict):
26
+ subscription_frequency_unit: SubscriptionFrequencyUnit
27
+ r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
28
+ subscription_frequency: int
29
+ r"""Indicates the frequency for the subscription."""
30
+ subscription_start_at: str
31
+ r"""Indicates the start date for the subscription in format `YYYYMMDD`."""
32
+ subscription_end_at: str
33
+ r"""Indicates the end date for the subscription in format `YYYYMMDD`."""
34
+
35
+
36
+ class DlocalUPIRecurringInfoOptions(BaseModel):
37
+ subscription_frequency_unit: SubscriptionFrequencyUnit
38
+ r"""Indicates the frequency unit for the subscription. Allowed values are: `DAY`, `WEEK`, `MONTH`, `BI_MONTHLY`, `QUARTER`, `SEMI_ANNUALLY`, `YEAR`, `ONDEMAND`."""
39
+
40
+ subscription_frequency: int
41
+ r"""Indicates the frequency for the subscription."""
42
+
43
+ subscription_start_at: str
44
+ r"""Indicates the start date for the subscription in format `YYYYMMDD`."""
45
+
46
+ subscription_end_at: str
47
+ r"""Indicates the end date for the subscription in format `YYYYMMDD`."""