gr4vy 1.10.12__py3-none-any.whl → 1.10.15__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 (293) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/basesdk.py +20 -6
  3. gr4vy/models/__init__.py +132 -0
  4. gr4vy/models/accountsreceivablesreportspec.py +18 -1
  5. gr4vy/models/accountupdaterinquirysummary.py +18 -1
  6. gr4vy/models/accountupdaterjob.py +18 -1
  7. gr4vy/models/accountupdateroptions.py +30 -31
  8. gr4vy/models/add_buyer_shipping_detailsop.py +34 -1
  9. gr4vy/models/add_buyerop.py +34 -1
  10. gr4vy/models/add_payment_linkop.py +34 -1
  11. gr4vy/models/add_reportop.py +34 -1
  12. gr4vy/models/address.py +38 -39
  13. gr4vy/models/adyencardoptions.py +32 -33
  14. gr4vy/models/adyenoptions.py +14 -19
  15. gr4vy/models/adyensepaoptions.py +30 -31
  16. gr4vy/models/adyensplitsoptions.py +14 -19
  17. gr4vy/models/affirmitineraryoptions.py +34 -35
  18. gr4vy/models/affirmoptions.py +14 -19
  19. gr4vy/models/airline.py +58 -59
  20. gr4vy/models/airlineleg.py +66 -67
  21. gr4vy/models/airlinepassenger.py +42 -43
  22. gr4vy/models/applepaypaymentmethodcreate.py +34 -35
  23. gr4vy/models/auditlogentries.py +14 -19
  24. gr4vy/models/auditlogentry.py +14 -19
  25. gr4vy/models/auditlogentryuser.py +14 -19
  26. gr4vy/models/billingdetails.py +32 -33
  27. gr4vy/models/braintreedynamicdatafieldsoptions.py +26 -27
  28. gr4vy/models/braintreeoptions.py +18 -19
  29. gr4vy/models/browserinfo.py +14 -19
  30. gr4vy/models/buyer.py +31 -32
  31. gr4vy/models/buyercreate.py +18 -29
  32. gr4vy/models/buyers.py +14 -19
  33. gr4vy/models/buyerupdate.py +18 -29
  34. gr4vy/models/cancel_transactionop.py +34 -1
  35. gr4vy/models/capture_transactionop.py +30 -19
  36. gr4vy/models/cardpaymentmethodcreate.py +31 -32
  37. gr4vy/models/cardschemedefinition.py +18 -1
  38. gr4vy/models/cardwithurlpaymentmethodcreate.py +33 -34
  39. gr4vy/models/cartitem.py +52 -53
  40. gr4vy/models/chaseoptions.py +14 -19
  41. gr4vy/models/checkoutsession.py +37 -38
  42. gr4vy/models/checkoutsessioncreate.py +35 -36
  43. gr4vy/models/checkoutsessionpaymentmethod.py +16 -27
  44. gr4vy/models/checkoutsessionpaymentmethodcreate.py +18 -28
  45. gr4vy/models/checkoutsessionpaymentmethoddetails.py +14 -19
  46. gr4vy/models/checkoutsessionwithurlpaymentmethodcreate.py +29 -30
  47. gr4vy/models/clicktopayfpanpaymentmethodcreate.py +32 -33
  48. gr4vy/models/clicktopaypaymentmethodcreate.py +28 -29
  49. gr4vy/models/configure_digital_walletop.py +34 -1
  50. gr4vy/models/create_account_updater_jobop.py +34 -1
  51. gr4vy/models/create_apple_pay_digital_wallet_sessionop.py +34 -1
  52. gr4vy/models/create_checkout_sessionop.py +34 -1
  53. gr4vy/models/create_full_transaction_refundop.py +30 -19
  54. gr4vy/models/create_gift_cardop.py +34 -1
  55. gr4vy/models/create_google_pay_digital_wallet_sessionop.py +34 -1
  56. gr4vy/models/create_payment_method_network_token_cryptogramop.py +34 -1
  57. gr4vy/models/create_payment_method_network_tokenop.py +34 -1
  58. gr4vy/models/create_payment_method_payment_service_tokenop.py +34 -1
  59. gr4vy/models/create_payment_methodop.py +34 -1
  60. gr4vy/models/create_payment_service_sessionop.py +34 -1
  61. gr4vy/models/create_payment_serviceop.py +34 -1
  62. gr4vy/models/create_payoutop.py +34 -1
  63. gr4vy/models/create_report_execution_urlop.py +34 -1
  64. gr4vy/models/create_three_ds_scenarioop.py +79 -0
  65. gr4vy/models/create_transaction_refundop.py +34 -1
  66. gr4vy/models/create_transactionop.py +32 -19
  67. gr4vy/models/createsession.py +14 -19
  68. gr4vy/models/cryptogram.py +18 -1
  69. gr4vy/models/cybersourceantifraudoptions.py +18 -27
  70. gr4vy/models/cybersourceoptions.py +27 -28
  71. gr4vy/models/delete_buyer_shipping_detailsop.py +34 -1
  72. gr4vy/models/delete_buyerop.py +34 -1
  73. gr4vy/models/delete_checkout_sessionop.py +34 -1
  74. gr4vy/models/delete_digital_walletop.py +34 -1
  75. gr4vy/models/delete_gift_cardop.py +34 -1
  76. gr4vy/models/delete_payment_method_network_tokenop.py +34 -1
  77. gr4vy/models/delete_payment_method_payment_service_tokenop.py +34 -1
  78. gr4vy/models/delete_payment_methodop.py +34 -1
  79. gr4vy/models/delete_payment_serviceop.py +34 -1
  80. gr4vy/models/delete_three_ds_scenarioop.py +76 -0
  81. gr4vy/models/detailedsettlementreportspec.py +18 -1
  82. gr4vy/models/digitalwallet.py +27 -33
  83. gr4vy/models/digitalwalletcreate.py +23 -28
  84. gr4vy/models/digitalwalletupdate.py +30 -31
  85. gr4vy/models/dlocaloptions.py +14 -19
  86. gr4vy/models/dlocalupioptions.py +14 -19
  87. gr4vy/models/dlocalupiwalletoptions.py +18 -33
  88. gr4vy/models/dlocalwalletoptions.py +14 -19
  89. gr4vy/models/expire_payment_linkop.py +34 -1
  90. gr4vy/models/fiservinstallmentoptions.py +27 -28
  91. gr4vy/models/fiservoptions.py +14 -19
  92. gr4vy/models/forterantifraudoptions.py +30 -31
  93. gr4vy/models/forterantifraudoptionscartitem.py +13 -18
  94. gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +14 -19
  95. gr4vy/models/forterantifraudoptionscartitembeneficiary.py +13 -18
  96. gr4vy/models/forterantifraudoptionscartitembeneficiaryaddress.py +18 -19
  97. gr4vy/models/forterantifraudoptionscartitembeneficiarycomments.py +18 -27
  98. gr4vy/models/forterantifraudoptionscartitembeneficiarypersonaldetails.py +14 -19
  99. gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +13 -18
  100. gr4vy/models/forterantifraudoptionsdiscount.py +13 -18
  101. gr4vy/models/forterantifraudoptionsdiscountcoupondiscountamount.py +14 -19
  102. gr4vy/models/get_buyer_shipping_detailsop.py +34 -1
  103. gr4vy/models/get_buyerop.py +34 -1
  104. gr4vy/models/get_checkout_sessionop.py +34 -1
  105. gr4vy/models/get_digital_walletop.py +34 -1
  106. gr4vy/models/get_gift_cardop.py +34 -1
  107. gr4vy/models/get_payment_linkop.py +34 -1
  108. gr4vy/models/get_payment_methodop.py +34 -1
  109. gr4vy/models/get_payment_serviceop.py +34 -1
  110. gr4vy/models/get_payoutop.py +34 -1
  111. gr4vy/models/get_refundop.py +34 -1
  112. gr4vy/models/get_report_executionop.py +34 -1
  113. gr4vy/models/get_reportop.py +34 -1
  114. gr4vy/models/get_three_ds_scenarioop.py +105 -0
  115. gr4vy/models/get_transaction_refundop.py +34 -1
  116. gr4vy/models/get_transaction_settlementop.py +34 -1
  117. gr4vy/models/get_transactionop.py +34 -1
  118. gr4vy/models/giftcard.py +14 -19
  119. gr4vy/models/giftcardcreate.py +14 -19
  120. gr4vy/models/giftcardredemption.py +29 -30
  121. gr4vy/models/giftcards.py +14 -19
  122. gr4vy/models/giftcardservice.py +18 -1
  123. gr4vy/models/giftcardsummary.py +35 -36
  124. gr4vy/models/givingblockoptions.py +14 -19
  125. gr4vy/models/googlepayassurancedetails.py +14 -19
  126. gr4vy/models/googlepayfpanpaymentmethodcreate.py +32 -33
  127. gr4vy/models/googlepaypaymentmethodcreate.py +36 -37
  128. gr4vy/models/guestbuyer.py +30 -31
  129. gr4vy/models/internal/globals.py +18 -1
  130. gr4vy/models/latitudeoptions.py +14 -19
  131. gr4vy/models/list_all_report_executionsop.py +50 -35
  132. gr4vy/models/list_audit_logsop.py +39 -26
  133. gr4vy/models/list_buyer_gift_cardsop.py +32 -23
  134. gr4vy/models/list_buyer_payment_methodsop.py +42 -33
  135. gr4vy/models/list_buyer_shipping_detailsop.py +34 -1
  136. gr4vy/models/list_buyersop.py +32 -25
  137. gr4vy/models/list_card_scheme_definitionsop.py +34 -1
  138. gr4vy/models/list_digital_walletsop.py +34 -1
  139. gr4vy/models/list_gift_card_balancesop.py +34 -1
  140. gr4vy/models/list_gift_cardsop.py +38 -25
  141. gr4vy/models/list_merchant_accountsop.py +14 -19
  142. gr4vy/models/list_payment_linksop.py +32 -19
  143. gr4vy/models/list_payment_method_network_tokensop.py +34 -1
  144. gr4vy/models/list_payment_method_payment_service_tokensop.py +30 -19
  145. gr4vy/models/list_payment_methodsop.py +48 -33
  146. gr4vy/models/list_payment_optionsop.py +34 -1
  147. gr4vy/models/list_payment_service_definitionsop.py +14 -19
  148. gr4vy/models/list_payment_servicesop.py +32 -25
  149. gr4vy/models/list_payoutsop.py +30 -19
  150. gr4vy/models/list_report_executionsop.py +30 -19
  151. gr4vy/models/list_reportsop.py +39 -26
  152. gr4vy/models/list_transaction_actionsop.py +34 -1
  153. gr4vy/models/list_transaction_eventsop.py +30 -19
  154. gr4vy/models/list_transaction_refundsop.py +34 -1
  155. gr4vy/models/list_transaction_settlementsop.py +34 -1
  156. gr4vy/models/list_transactionsop.py +124 -109
  157. gr4vy/models/mattildatapioptions.py +14 -19
  158. gr4vy/models/merchantaccount.py +52 -53
  159. gr4vy/models/merchantaccountcreate.py +52 -53
  160. gr4vy/models/merchantaccounts.py +14 -19
  161. gr4vy/models/merchantaccountupdate.py +54 -55
  162. gr4vy/models/method.py +1 -0
  163. gr4vy/models/mockcardmerchantadvicecodeoptions.py +14 -19
  164. gr4vy/models/mockcardoptions.py +14 -19
  165. gr4vy/models/networktoken.py +18 -1
  166. gr4vy/models/networktokencreate.py +14 -19
  167. gr4vy/models/networktokenpaymentmethodcreate.py +34 -35
  168. gr4vy/models/nuveiairlinedataoptions.py +14 -19
  169. gr4vy/models/nuveiidealoptions.py +14 -19
  170. gr4vy/models/nuveioptions.py +14 -19
  171. gr4vy/models/nuveipseoptions.py +13 -18
  172. gr4vy/models/oxxooptions.py +14 -19
  173. gr4vy/models/paymentlink.py +59 -60
  174. gr4vy/models/paymentlinkcreate.py +59 -60
  175. gr4vy/models/paymentlinks.py +14 -19
  176. gr4vy/models/paymentmethod.py +51 -52
  177. gr4vy/models/paymentmethodcard.py +14 -19
  178. gr4vy/models/paymentmethoddetailscard.py +14 -19
  179. gr4vy/models/paymentmethods.py +14 -19
  180. gr4vy/models/paymentmethodstoredcard.py +18 -1
  181. gr4vy/models/paymentmethodsummary.py +47 -48
  182. gr4vy/models/paymentoption.py +14 -19
  183. gr4vy/models/paymentoptioncontext.py +14 -19
  184. gr4vy/models/paymentoptioncontextapprovalui.py +14 -19
  185. gr4vy/models/paymentoptionrequest.py +18 -26
  186. gr4vy/models/paymentservice.py +35 -36
  187. gr4vy/models/paymentservicecreate.py +36 -37
  188. gr4vy/models/paymentservicedefinition.py +14 -19
  189. gr4vy/models/paymentservicedefinitions.py +14 -19
  190. gr4vy/models/paymentservices.py +14 -19
  191. gr4vy/models/paymentservicetoken.py +14 -19
  192. gr4vy/models/paymentservicetokencreate.py +14 -19
  193. gr4vy/models/paymentserviceupdate.py +45 -46
  194. gr4vy/models/payoutconnectionoptions.py +14 -19
  195. gr4vy/models/payoutcreate.py +34 -35
  196. gr4vy/models/payoutmerchant.py +14 -19
  197. gr4vy/models/payoutmerchantsummary.py +14 -19
  198. gr4vy/models/payoutpaymentservice.py +14 -19
  199. gr4vy/models/payoutsummaries.py +14 -19
  200. gr4vy/models/payoutsummary.py +35 -36
  201. gr4vy/models/paypaloptions.py +14 -19
  202. gr4vy/models/paypalshippingoptions.py +14 -19
  203. gr4vy/models/paypalshippingoptionsitem.py +14 -19
  204. gr4vy/models/plaidpaymentmethodcreate.py +31 -32
  205. gr4vy/models/powertranzoptions.py +14 -19
  206. gr4vy/models/recipient.py +14 -19
  207. gr4vy/models/redirectpaymentmethodcreate.py +19 -27
  208. gr4vy/models/refund.py +39 -40
  209. gr4vy/models/refunds.py +14 -19
  210. gr4vy/models/register_digital_wallet_domainop.py +34 -1
  211. gr4vy/models/report.py +33 -34
  212. gr4vy/models/reportcreate.py +14 -19
  213. gr4vy/models/reportexecution.py +18 -1
  214. gr4vy/models/reportexecutions.py +14 -19
  215. gr4vy/models/reportexecutionsummary.py +18 -1
  216. gr4vy/models/reportexecutionurlgenerate.py +18 -1
  217. gr4vy/models/reports.py +14 -19
  218. gr4vy/models/reportsummary.py +16 -19
  219. gr4vy/models/reportupdate.py +14 -19
  220. gr4vy/models/requiredcheckoutfields.py +14 -19
  221. gr4vy/models/resume_payment_method_network_tokenop.py +34 -1
  222. gr4vy/models/security.py +18 -1
  223. gr4vy/models/settlement.py +16 -25
  224. gr4vy/models/shippingdetails.py +35 -36
  225. gr4vy/models/shippingdetailscreate.py +18 -31
  226. gr4vy/models/shippingdetailsupdate.py +18 -31
  227. gr4vy/models/statementdescriptor.py +34 -35
  228. gr4vy/models/stripeconnectoptions.py +30 -31
  229. gr4vy/models/stripeoptions.py +14 -19
  230. gr4vy/models/suspend_payment_method_network_tokenop.py +34 -1
  231. gr4vy/models/sync_transactionop.py +34 -1
  232. gr4vy/models/threedsecure.py +14 -19
  233. gr4vy/models/threedsecuredatav1.py +14 -19
  234. gr4vy/models/threedsecuredatav2.py +14 -19
  235. gr4vy/models/threedsecureerror.py +14 -19
  236. gr4vy/models/threedsecurescenario.py +77 -0
  237. gr4vy/models/threedsecurescenarioconditions.py +84 -0
  238. gr4vy/models/threedsecurescenariocreate.py +24 -0
  239. gr4vy/models/threedsecurescenariooutcome.py +57 -0
  240. gr4vy/models/threedsecurescenariooutcomeauthentication.py +31 -0
  241. gr4vy/models/threedsecurescenariooutcomeresult.py +27 -0
  242. gr4vy/models/threedsecurescenarios.py +58 -0
  243. gr4vy/models/threedsecurescenarioupdate.py +54 -0
  244. gr4vy/models/threedsecurev2.py +34 -35
  245. gr4vy/models/tokenpaymentmethodcreate.py +14 -19
  246. gr4vy/models/transaction.py +111 -112
  247. gr4vy/models/transactionaction.py +18 -1
  248. gr4vy/models/transactionbuyer.py +31 -32
  249. gr4vy/models/transactioncancel.py +14 -19
  250. gr4vy/models/transactioncapture.py +14 -19
  251. gr4vy/models/transactioncapturecreate.py +14 -19
  252. gr4vy/models/transactionconnectionoptions.py +104 -105
  253. gr4vy/models/transactioncreate.py +88 -89
  254. gr4vy/models/transactionevent.py +18 -1
  255. gr4vy/models/transactionevents.py +14 -19
  256. gr4vy/models/transactiongiftcard.py +14 -19
  257. gr4vy/models/transactionpaymentmethod.py +49 -50
  258. gr4vy/models/transactionpaymentservice.py +18 -1
  259. gr4vy/models/transactionrefundallcreate.py +14 -19
  260. gr4vy/models/transactionrefundcreate.py +16 -25
  261. gr4vy/models/transactionretriesreportspec.py +18 -1
  262. gr4vy/models/transactionsreportspec.py +18 -1
  263. gr4vy/models/transactionsummaries.py +14 -19
  264. gr4vy/models/transactionsummary.py +50 -51
  265. gr4vy/models/transactionthreedsecuresummary.py +18 -33
  266. gr4vy/models/transactionupdate.py +14 -19
  267. gr4vy/models/transactionvoid.py +14 -19
  268. gr4vy/models/travelhubcustomdata.py +14 -19
  269. gr4vy/models/travelhuboptions.py +14 -19
  270. gr4vy/models/trustlyoptions.py +14 -19
  271. gr4vy/models/unregister_digital_wallet_domainop.py +34 -1
  272. gr4vy/models/update_buyer_shipping_detailsop.py +34 -1
  273. gr4vy/models/update_buyerop.py +34 -1
  274. gr4vy/models/update_checkout_sessionop.py +34 -1
  275. gr4vy/models/update_digital_walletop.py +34 -1
  276. gr4vy/models/update_payment_serviceop.py +34 -1
  277. gr4vy/models/update_reportop.py +34 -1
  278. gr4vy/models/update_three_ds_scenarioop.py +91 -0
  279. gr4vy/models/update_transactionop.py +34 -1
  280. gr4vy/models/verify_payment_service_credentialsop.py +34 -1
  281. gr4vy/models/verifycredentials.py +14 -19
  282. gr4vy/models/void_transactionop.py +30 -19
  283. gr4vy/models/wpayeverdaypayoptions.py +30 -31
  284. gr4vy/models/wpaypaytooptions.py +14 -19
  285. gr4vy/models/wpaypaytoresourceoptions.py +14 -19
  286. gr4vy/models/wpaypaytosimulationoptions.py +14 -19
  287. gr4vy/sdk.py +3 -0
  288. gr4vy/three_ds_scenarios.py +1322 -0
  289. gr4vy/utils/__init__.py +13 -1
  290. {gr4vy-1.10.12.dist-info → gr4vy-1.10.15.dist-info}/METADATA +8 -1
  291. gr4vy-1.10.15.dist-info/RECORD +464 -0
  292. gr4vy-1.10.12.dist-info/RECORD +0 -451
  293. {gr4vy-1.10.12.dist-info → gr4vy-1.10.15.dist-info}/WHEEL +0 -0
@@ -27,30 +27,25 @@ class TravelHubCustomData(BaseModel):
27
27
 
28
28
  @model_serializer(mode="wrap")
29
29
  def serialize_model(self, handler):
30
- optional_fields = ["type"]
31
- nullable_fields = ["type"]
32
- null_default_fields = []
33
-
30
+ optional_fields = set(["type"])
31
+ nullable_fields = set(["type"])
34
32
  serialized = handler(self)
35
-
36
33
  m = {}
37
34
 
38
35
  for n, f in type(self).model_fields.items():
39
36
  k = f.alias or n
40
37
  val = serialized.get(k)
41
- serialized.pop(k, None)
42
-
43
- optional_nullable = k in optional_fields and k in nullable_fields
44
- is_set = (
45
- self.__pydantic_fields_set__.intersection({n})
46
- or k in null_default_fields
47
- ) # pylint: disable=no-member
48
-
49
- if val is not None and val != UNSET_SENTINEL:
50
- m[k] = val
51
- elif val != UNSET_SENTINEL and (
52
- not k in optional_fields or (optional_nullable and is_set)
53
- ):
54
- m[k] = val
38
+ is_nullable_and_explicitly_set = (
39
+ k in nullable_fields
40
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
41
+ )
42
+
43
+ if val != UNSET_SENTINEL:
44
+ if (
45
+ val is not None
46
+ or k not in optional_fields
47
+ or is_nullable_and_explicitly_set
48
+ ):
49
+ m[k] = val
55
50
 
56
51
  return m
@@ -29,30 +29,25 @@ class TravelhubOptions(BaseModel):
29
29
 
30
30
  @model_serializer(mode="wrap")
31
31
  def serialize_model(self, handler):
32
- optional_fields = ["customData", "companyName"]
33
- nullable_fields = ["customData", "companyName"]
34
- null_default_fields = []
35
-
32
+ optional_fields = set(["customData", "companyName"])
33
+ nullable_fields = set(["customData", "companyName"])
36
34
  serialized = handler(self)
37
-
38
35
  m = {}
39
36
 
40
37
  for n, f in type(self).model_fields.items():
41
38
  k = f.alias or n
42
39
  val = serialized.get(k)
43
- serialized.pop(k, None)
44
-
45
- optional_nullable = k in optional_fields and k in nullable_fields
46
- is_set = (
47
- self.__pydantic_fields_set__.intersection({n})
48
- or k in null_default_fields
49
- ) # pylint: disable=no-member
50
-
51
- if val is not None and val != UNSET_SENTINEL:
52
- m[k] = val
53
- elif val != UNSET_SENTINEL and (
54
- not k in optional_fields or (optional_nullable and is_set)
55
- ):
56
- m[k] = val
40
+ is_nullable_and_explicitly_set = (
41
+ k in nullable_fields
42
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
43
+ )
44
+
45
+ if val != UNSET_SENTINEL:
46
+ if (
47
+ val is not None
48
+ or k not in optional_fields
49
+ or is_nullable_and_explicitly_set
50
+ ):
51
+ m[k] = val
57
52
 
58
53
  return m
@@ -20,30 +20,25 @@ class TrustlyOptions(BaseModel):
20
20
 
21
21
  @model_serializer(mode="wrap")
22
22
  def serialize_model(self, handler):
23
- optional_fields = ["refreshSplitToken"]
24
- nullable_fields = ["refreshSplitToken"]
25
- null_default_fields = []
26
-
23
+ optional_fields = set(["refreshSplitToken"])
24
+ nullable_fields = set(["refreshSplitToken"])
27
25
  serialized = handler(self)
28
-
29
26
  m = {}
30
27
 
31
28
  for n, f in type(self).model_fields.items():
32
29
  k = f.alias or n
33
30
  val = serialized.get(k)
34
- serialized.pop(k, None)
35
-
36
- optional_nullable = k in optional_fields and k in nullable_fields
37
- is_set = (
38
- self.__pydantic_fields_set__.intersection({n})
39
- or k in null_default_fields
40
- ) # pylint: disable=no-member
41
-
42
- if val is not None and val != UNSET_SENTINEL:
43
- m[k] = val
44
- elif val != UNSET_SENTINEL and (
45
- not k in optional_fields or (optional_nullable and is_set)
46
- ):
47
- m[k] = val
31
+ is_nullable_and_explicitly_set = (
32
+ k in nullable_fields
33
+ and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
34
+ )
35
+
36
+ if val != UNSET_SENTINEL:
37
+ if (
38
+ val is not None
39
+ or k not in optional_fields
40
+ or is_nullable_and_explicitly_set
41
+ ):
42
+ m[k] = val
48
43
 
49
44
  return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .digitalwalletdomain import DigitalWalletDomain, DigitalWalletDomainTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UnregisterDigitalWalletDomainGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UnregisterDigitalWalletDomainRequestTypedDict(TypedDict):
32
49
  digital_wallet_id: str
@@ -51,3 +68,19 @@ class UnregisterDigitalWalletDomainRequest(BaseModel):
51
68
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
52
69
  ] = None
53
70
  r"""The ID of the merchant account to use for this request."""
71
+
72
+ @model_serializer(mode="wrap")
73
+ def serialize_model(self, handler):
74
+ optional_fields = set(["merchant_account_id"])
75
+ serialized = handler(self)
76
+ m = {}
77
+
78
+ for n, f in type(self).model_fields.items():
79
+ k = f.alias or n
80
+ val = serialized.get(k)
81
+
82
+ if val != UNSET_SENTINEL:
83
+ if val is not None or k not in optional_fields:
84
+ m[k] = val
85
+
86
+ return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .shippingdetailsupdate import ShippingDetailsUpdate, ShippingDetailsUpdateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UpdateBuyerShippingDetailsGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UpdateBuyerShippingDetailsRequestTypedDict(TypedDict):
32
49
  buyer_id: str
@@ -60,3 +77,19 @@ class UpdateBuyerShippingDetailsRequest(BaseModel):
60
77
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
61
78
  ] = None
62
79
  r"""The ID of the merchant account to use for this request."""
80
+
81
+ @model_serializer(mode="wrap")
82
+ def serialize_model(self, handler):
83
+ optional_fields = set(["merchant_account_id"])
84
+ serialized = handler(self)
85
+ m = {}
86
+
87
+ for n, f in type(self).model_fields.items():
88
+ k = f.alias or n
89
+ val = serialized.get(k)
90
+
91
+ if val != UNSET_SENTINEL:
92
+ if val is not None or k not in optional_fields:
93
+ m[k] = val
94
+
95
+ return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .buyerupdate import BuyerUpdate, BuyerUpdateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UpdateBuyerGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UpdateBuyerRequestTypedDict(TypedDict):
32
49
  buyer_id: str
@@ -53,3 +70,19 @@ class UpdateBuyerRequest(BaseModel):
53
70
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
54
71
  ] = None
55
72
  r"""The ID of the merchant account to use for this request."""
73
+
74
+ @model_serializer(mode="wrap")
75
+ def serialize_model(self, handler):
76
+ optional_fields = set(["merchant_account_id"])
77
+ serialized = handler(self)
78
+ m = {}
79
+
80
+ for n, f in type(self).model_fields.items():
81
+ k = f.alias or n
82
+ val = serialized.get(k)
83
+
84
+ if val != UNSET_SENTINEL:
85
+ if val is not None or k not in optional_fields:
86
+ m[k] = val
87
+
88
+ return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .checkoutsessioncreate import CheckoutSessionCreate, CheckoutSessionCreateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UpdateCheckoutSessionGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UpdateCheckoutSessionRequestTypedDict(TypedDict):
32
49
  session_id: str
@@ -53,3 +70,19 @@ class UpdateCheckoutSessionRequest(BaseModel):
53
70
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
54
71
  ] = None
55
72
  r"""The ID of the merchant account to use for this request."""
73
+
74
+ @model_serializer(mode="wrap")
75
+ def serialize_model(self, handler):
76
+ optional_fields = set(["merchant_account_id"])
77
+ serialized = handler(self)
78
+ m = {}
79
+
80
+ for n, f in type(self).model_fields.items():
81
+ k = f.alias or n
82
+ val = serialized.get(k)
83
+
84
+ if val != UNSET_SENTINEL:
85
+ if val is not None or k not in optional_fields:
86
+ m[k] = val
87
+
88
+ return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .digitalwalletupdate import DigitalWalletUpdate, DigitalWalletUpdateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UpdateDigitalWalletGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UpdateDigitalWalletRequestTypedDict(TypedDict):
32
49
  digital_wallet_id: str
@@ -53,3 +70,19 @@ class UpdateDigitalWalletRequest(BaseModel):
53
70
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
54
71
  ] = None
55
72
  r"""The ID of the merchant account to use for this request."""
73
+
74
+ @model_serializer(mode="wrap")
75
+ def serialize_model(self, handler):
76
+ optional_fields = set(["merchant_account_id"])
77
+ serialized = handler(self)
78
+ m = {}
79
+
80
+ for n, f in type(self).model_fields.items():
81
+ k = f.alias or n
82
+ val = serialized.get(k)
83
+
84
+ if val != UNSET_SENTINEL:
85
+ if val is not None or k not in optional_fields:
86
+ m[k] = val
87
+
88
+ return m
@@ -2,9 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .paymentservicecreate import PaymentServiceCreate, PaymentServiceCreateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import FieldMetadata, HeaderMetadata, RequestMetadata
7
7
  import pydantic
8
+ from pydantic import model_serializer
8
9
  from typing import Optional
9
10
  from typing_extensions import Annotated, NotRequired, TypedDict
10
11
 
@@ -22,6 +23,22 @@ class UpdatePaymentServiceGlobals(BaseModel):
22
23
  ] = None
23
24
  r"""The ID of the merchant account to use for this request."""
24
25
 
26
+ @model_serializer(mode="wrap")
27
+ def serialize_model(self, handler):
28
+ optional_fields = set(["merchant_account_id"])
29
+ serialized = handler(self)
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
+
36
+ if val != UNSET_SENTINEL:
37
+ if val is not None or k not in optional_fields:
38
+ m[k] = val
39
+
40
+ return m
41
+
25
42
 
26
43
  class UpdatePaymentServiceRequestTypedDict(TypedDict):
27
44
  payment_service_create: PaymentServiceCreateTypedDict
@@ -41,3 +58,19 @@ class UpdatePaymentServiceRequest(BaseModel):
41
58
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
42
59
  ] = None
43
60
  r"""The ID of the merchant account to use for this request."""
61
+
62
+ @model_serializer(mode="wrap")
63
+ def serialize_model(self, handler):
64
+ optional_fields = set(["merchant_account_id"])
65
+ serialized = handler(self)
66
+ m = {}
67
+
68
+ for n, f in type(self).model_fields.items():
69
+ k = f.alias or n
70
+ val = serialized.get(k)
71
+
72
+ if val != UNSET_SENTINEL:
73
+ if val is not None or k not in optional_fields:
74
+ m[k] = val
75
+
76
+ return m
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from .reportupdate import ReportUpdate, ReportUpdateTypedDict
5
- from gr4vy.types import BaseModel
5
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
6
6
  from gr4vy.utils import (
7
7
  FieldMetadata,
8
8
  HeaderMetadata,
@@ -10,6 +10,7 @@ from gr4vy.utils import (
10
10
  RequestMetadata,
11
11
  )
12
12
  import pydantic
13
+ from pydantic import model_serializer
13
14
  from typing import Optional
14
15
  from typing_extensions import Annotated, NotRequired, TypedDict
15
16
 
@@ -27,6 +28,22 @@ class UpdateReportGlobals(BaseModel):
27
28
  ] = None
28
29
  r"""The ID of the merchant account to use for this request."""
29
30
 
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = set(["merchant_account_id"])
34
+ serialized = handler(self)
35
+ m = {}
36
+
37
+ for n, f in type(self).model_fields.items():
38
+ k = f.alias or n
39
+ val = serialized.get(k)
40
+
41
+ if val != UNSET_SENTINEL:
42
+ if val is not None or k not in optional_fields:
43
+ m[k] = val
44
+
45
+ return m
46
+
30
47
 
31
48
  class UpdateReportRequestTypedDict(TypedDict):
32
49
  report_id: str
@@ -53,3 +70,19 @@ class UpdateReportRequest(BaseModel):
53
70
  FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
54
71
  ] = None
55
72
  r"""The ID of the merchant account to use for this request."""
73
+
74
+ @model_serializer(mode="wrap")
75
+ def serialize_model(self, handler):
76
+ optional_fields = set(["merchant_account_id"])
77
+ serialized = handler(self)
78
+ m = {}
79
+
80
+ for n, f in type(self).model_fields.items():
81
+ k = f.alias or n
82
+ val = serialized.get(k)
83
+
84
+ if val != UNSET_SENTINEL:
85
+ if val is not None or k not in optional_fields:
86
+ m[k] = val
87
+
88
+ return m
@@ -0,0 +1,91 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .threedsecurescenarioupdate import (
5
+ ThreeDSecureScenarioUpdate,
6
+ ThreeDSecureScenarioUpdateTypedDict,
7
+ )
8
+ from gr4vy.types import BaseModel, UNSET_SENTINEL
9
+ from gr4vy.utils import (
10
+ FieldMetadata,
11
+ HeaderMetadata,
12
+ PathParamMetadata,
13
+ RequestMetadata,
14
+ )
15
+ import pydantic
16
+ from pydantic import model_serializer
17
+ from typing import Optional
18
+ from typing_extensions import Annotated, NotRequired, TypedDict
19
+
20
+
21
+ class UpdateThreeDsScenarioGlobalsTypedDict(TypedDict):
22
+ merchant_account_id: NotRequired[str]
23
+ r"""The ID of the merchant account to use for this request."""
24
+
25
+
26
+ class UpdateThreeDsScenarioGlobals(BaseModel):
27
+ merchant_account_id: Annotated[
28
+ Optional[str],
29
+ pydantic.Field(alias="x-gr4vy-merchant-account-id"),
30
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
31
+ ] = None
32
+ r"""The ID of the merchant account to use for this request."""
33
+
34
+ @model_serializer(mode="wrap")
35
+ def serialize_model(self, handler):
36
+ optional_fields = set(["merchant_account_id"])
37
+ serialized = handler(self)
38
+ m = {}
39
+
40
+ for n, f in type(self).model_fields.items():
41
+ k = f.alias or n
42
+ val = serialized.get(k)
43
+
44
+ if val != UNSET_SENTINEL:
45
+ if val is not None or k not in optional_fields:
46
+ m[k] = val
47
+
48
+ return m
49
+
50
+
51
+ class UpdateThreeDsScenarioRequestTypedDict(TypedDict):
52
+ three_ds_scenario_id: str
53
+ r"""The ID of the 3DS scenario"""
54
+ three_d_secure_scenario_update: ThreeDSecureScenarioUpdateTypedDict
55
+ merchant_account_id: NotRequired[str]
56
+ r"""The ID of the merchant account to use for this request."""
57
+
58
+
59
+ class UpdateThreeDsScenarioRequest(BaseModel):
60
+ three_ds_scenario_id: Annotated[
61
+ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
62
+ ]
63
+ r"""The ID of the 3DS scenario"""
64
+
65
+ three_d_secure_scenario_update: Annotated[
66
+ ThreeDSecureScenarioUpdate,
67
+ FieldMetadata(request=RequestMetadata(media_type="application/json")),
68
+ ]
69
+
70
+ merchant_account_id: Annotated[
71
+ Optional[str],
72
+ pydantic.Field(alias="x-gr4vy-merchant-account-id"),
73
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
74
+ ] = None
75
+ r"""The ID of the merchant account to use for this request."""
76
+
77
+ @model_serializer(mode="wrap")
78
+ def serialize_model(self, handler):
79
+ optional_fields = set(["merchant_account_id"])
80
+ serialized = handler(self)
81
+ m = {}
82
+
83
+ for n, f in type(self).model_fields.items():
84
+ k = f.alias or n
85
+ val = serialized.get(k)
86
+
87
+ if val != UNSET_SENTINEL:
88
+ if val is not None or k not in optional_fields:
89
+ m[k] = val
90
+
91
+ return m