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
gr4vy/executions.py CHANGED
@@ -69,6 +69,7 @@ class Executions(BaseSDK):
69
69
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
70
70
  ),
71
71
  security=self.sdk_configuration.security,
72
+ allow_empty_value=None,
72
73
  timeout_ms=timeout_ms,
73
74
  )
74
75
 
@@ -89,7 +90,7 @@ class Executions(BaseSDK):
89
90
  config=self.sdk_configuration,
90
91
  base_url=base_url or "",
91
92
  operation_id="list_report_executions",
92
- oauth2_scopes=[],
93
+ oauth2_scopes=None,
93
94
  security_source=get_security_from_env(
94
95
  self.sdk_configuration.security, models.Security
95
96
  ),
@@ -122,7 +123,7 @@ class Executions(BaseSDK):
122
123
  return None
123
124
 
124
125
  next_cursor = next_cursor[0]
125
- if next_cursor is None:
126
+ if next_cursor is None or str(next_cursor).strip() == "":
126
127
  return None
127
128
 
128
129
  return self.list(
@@ -244,6 +245,7 @@ class Executions(BaseSDK):
244
245
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
245
246
  ),
246
247
  security=self.sdk_configuration.security,
248
+ allow_empty_value=None,
247
249
  timeout_ms=timeout_ms,
248
250
  )
249
251
 
@@ -264,7 +266,7 @@ class Executions(BaseSDK):
264
266
  config=self.sdk_configuration,
265
267
  base_url=base_url or "",
266
268
  operation_id="list_report_executions",
267
- oauth2_scopes=[],
269
+ oauth2_scopes=None,
268
270
  security_source=get_security_from_env(
269
271
  self.sdk_configuration.security, models.Security
270
272
  ),
@@ -297,7 +299,7 @@ class Executions(BaseSDK):
297
299
  return None
298
300
 
299
301
  next_cursor = next_cursor[0]
300
- if next_cursor is None:
302
+ if next_cursor is None or str(next_cursor).strip() == "":
301
303
  return None
302
304
 
303
305
  return self.list(
@@ -367,6 +369,7 @@ class Executions(BaseSDK):
367
369
  report_id: str,
368
370
  report_execution_id: str,
369
371
  merchant_account_id: Optional[str] = None,
372
+ expires_in: Optional[int] = 5,
370
373
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
371
374
  server_url: Optional[str] = None,
372
375
  timeout_ms: Optional[int] = None,
@@ -379,6 +382,7 @@ class Executions(BaseSDK):
379
382
  :param report_id: The ID of the report to retrieve a URL for.
380
383
  :param report_execution_id: The ID of the execution of a report to retrieve a URL for.
381
384
  :param merchant_account_id: The ID of the merchant account to use for this request.
385
+ :param expires_in: The URL expiration time, in minutes.
382
386
  :param retries: Override the default retry configuration for this method
383
387
  :param server_url: Override the default server URL for this method
384
388
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -398,6 +402,9 @@ class Executions(BaseSDK):
398
402
  report_id=report_id,
399
403
  report_execution_id=report_execution_id,
400
404
  merchant_account_id=merchant_account_id,
405
+ report_execution_url_generate=models.ReportExecutionURLGenerate(
406
+ expires_in=expires_in,
407
+ ),
401
408
  )
402
409
 
403
410
  req = self._build_request(
@@ -416,6 +423,14 @@ class Executions(BaseSDK):
416
423
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
417
424
  ),
418
425
  security=self.sdk_configuration.security,
426
+ get_serialized_body=lambda: utils.serialize_request_body(
427
+ request.report_execution_url_generate,
428
+ False,
429
+ True,
430
+ "json",
431
+ Optional[models.ReportExecutionURLGenerate],
432
+ ),
433
+ allow_empty_value=None,
419
434
  timeout_ms=timeout_ms,
420
435
  )
421
436
 
@@ -432,7 +447,7 @@ class Executions(BaseSDK):
432
447
  config=self.sdk_configuration,
433
448
  base_url=base_url or "",
434
449
  operation_id="create_report_execution_url",
435
- oauth2_scopes=[],
450
+ oauth2_scopes=None,
436
451
  security_source=get_security_from_env(
437
452
  self.sdk_configuration.security, models.Security
438
453
  ),
@@ -513,6 +528,7 @@ class Executions(BaseSDK):
513
528
  report_id: str,
514
529
  report_execution_id: str,
515
530
  merchant_account_id: Optional[str] = None,
531
+ expires_in: Optional[int] = 5,
516
532
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
517
533
  server_url: Optional[str] = None,
518
534
  timeout_ms: Optional[int] = None,
@@ -525,6 +541,7 @@ class Executions(BaseSDK):
525
541
  :param report_id: The ID of the report to retrieve a URL for.
526
542
  :param report_execution_id: The ID of the execution of a report to retrieve a URL for.
527
543
  :param merchant_account_id: The ID of the merchant account to use for this request.
544
+ :param expires_in: The URL expiration time, in minutes.
528
545
  :param retries: Override the default retry configuration for this method
529
546
  :param server_url: Override the default server URL for this method
530
547
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -544,6 +561,9 @@ class Executions(BaseSDK):
544
561
  report_id=report_id,
545
562
  report_execution_id=report_execution_id,
546
563
  merchant_account_id=merchant_account_id,
564
+ report_execution_url_generate=models.ReportExecutionURLGenerate(
565
+ expires_in=expires_in,
566
+ ),
547
567
  )
548
568
 
549
569
  req = self._build_request_async(
@@ -562,6 +582,14 @@ class Executions(BaseSDK):
562
582
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
563
583
  ),
564
584
  security=self.sdk_configuration.security,
585
+ get_serialized_body=lambda: utils.serialize_request_body(
586
+ request.report_execution_url_generate,
587
+ False,
588
+ True,
589
+ "json",
590
+ Optional[models.ReportExecutionURLGenerate],
591
+ ),
592
+ allow_empty_value=None,
565
593
  timeout_ms=timeout_ms,
566
594
  )
567
595
 
@@ -578,7 +606,7 @@ class Executions(BaseSDK):
578
606
  config=self.sdk_configuration,
579
607
  base_url=base_url or "",
580
608
  operation_id="create_report_execution_url",
581
- oauth2_scopes=[],
609
+ oauth2_scopes=None,
582
610
  security_source=get_security_from_env(
583
611
  self.sdk_configuration.security, models.Security
584
612
  ),
@@ -705,6 +733,7 @@ class Executions(BaseSDK):
705
733
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
706
734
  ),
707
735
  security=self.sdk_configuration.security,
736
+ allow_empty_value=None,
708
737
  timeout_ms=timeout_ms,
709
738
  )
710
739
 
@@ -725,7 +754,7 @@ class Executions(BaseSDK):
725
754
  config=self.sdk_configuration,
726
755
  base_url=base_url or "",
727
756
  operation_id="get_report_execution",
728
- oauth2_scopes=[],
757
+ oauth2_scopes=None,
729
758
  security_source=get_security_from_env(
730
759
  self.sdk_configuration.security, models.Security
731
760
  ),
@@ -852,6 +881,7 @@ class Executions(BaseSDK):
852
881
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
853
882
  ),
854
883
  security=self.sdk_configuration.security,
884
+ allow_empty_value=None,
855
885
  timeout_ms=timeout_ms,
856
886
  )
857
887
 
@@ -872,7 +902,7 @@ class Executions(BaseSDK):
872
902
  config=self.sdk_configuration,
873
903
  base_url=base_url or "",
874
904
  operation_id="get_report_execution",
875
- oauth2_scopes=[],
905
+ oauth2_scopes=None,
876
906
  security_source=get_security_from_env(
877
907
  self.sdk_configuration.security, models.Security
878
908
  ),
gr4vy/gift_cards_sdk.py CHANGED
@@ -15,13 +15,15 @@ from typing import Any, Dict, List, Mapping, Optional, Union
15
15
  class GiftCardsSDK(BaseSDK):
16
16
  balances: Balances
17
17
 
18
- def __init__(self, sdk_config: SDKConfiguration) -> None:
19
- BaseSDK.__init__(self, sdk_config)
18
+ def __init__(
19
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
20
+ ) -> None:
21
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
20
22
  self.sdk_configuration = sdk_config
21
23
  self._init_sdks()
22
24
 
23
25
  def _init_sdks(self):
24
- self.balances = Balances(self.sdk_configuration)
26
+ self.balances = Balances(self.sdk_configuration, parent_ref=self.parent_ref)
25
27
 
26
28
  def get(
27
29
  self,
@@ -75,6 +77,7 @@ class GiftCardsSDK(BaseSDK):
75
77
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
76
78
  ),
77
79
  security=self.sdk_configuration.security,
80
+ allow_empty_value=None,
78
81
  timeout_ms=timeout_ms,
79
82
  )
80
83
 
@@ -95,7 +98,7 @@ class GiftCardsSDK(BaseSDK):
95
98
  config=self.sdk_configuration,
96
99
  base_url=base_url or "",
97
100
  operation_id="get_gift_card",
98
- oauth2_scopes=[],
101
+ oauth2_scopes=None,
99
102
  security_source=get_security_from_env(
100
103
  self.sdk_configuration.security, models.Security
101
104
  ),
@@ -222,6 +225,7 @@ class GiftCardsSDK(BaseSDK):
222
225
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
223
226
  ),
224
227
  security=self.sdk_configuration.security,
228
+ allow_empty_value=None,
225
229
  timeout_ms=timeout_ms,
226
230
  )
227
231
 
@@ -242,7 +246,7 @@ class GiftCardsSDK(BaseSDK):
242
246
  config=self.sdk_configuration,
243
247
  base_url=base_url or "",
244
248
  operation_id="get_gift_card",
245
- oauth2_scopes=[],
249
+ oauth2_scopes=None,
246
250
  security_source=get_security_from_env(
247
251
  self.sdk_configuration.security, models.Security
248
252
  ),
@@ -326,7 +330,7 @@ class GiftCardsSDK(BaseSDK):
326
330
  server_url: Optional[str] = None,
327
331
  timeout_ms: Optional[int] = None,
328
332
  http_headers: Optional[Mapping[str, str]] = None,
329
- ) -> Any:
333
+ ):
330
334
  r"""Delete a gift card
331
335
 
332
336
  Removes a gift card from our system.
@@ -369,6 +373,7 @@ class GiftCardsSDK(BaseSDK):
369
373
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
370
374
  ),
371
375
  security=self.sdk_configuration.security,
376
+ allow_empty_value=None,
372
377
  timeout_ms=timeout_ms,
373
378
  )
374
379
 
@@ -385,7 +390,7 @@ class GiftCardsSDK(BaseSDK):
385
390
  config=self.sdk_configuration,
386
391
  base_url=base_url or "",
387
392
  operation_id="delete_gift_card",
388
- oauth2_scopes=[],
393
+ oauth2_scopes=None,
389
394
  security_source=get_security_from_env(
390
395
  self.sdk_configuration.security, models.Security
391
396
  ),
@@ -411,8 +416,8 @@ class GiftCardsSDK(BaseSDK):
411
416
  )
412
417
 
413
418
  response_data: Any = None
414
- if utils.match_response(http_res, "200", "application/json"):
415
- return unmarshal_json_response(Any, http_res)
419
+ if utils.match_response(http_res, "204", "*"):
420
+ return
416
421
  if utils.match_response(http_res, "400", "application/json"):
417
422
  response_data = unmarshal_json_response(errors.Error400Data, http_res)
418
423
  raise errors.Error400(response_data, http_res)
@@ -469,7 +474,7 @@ class GiftCardsSDK(BaseSDK):
469
474
  server_url: Optional[str] = None,
470
475
  timeout_ms: Optional[int] = None,
471
476
  http_headers: Optional[Mapping[str, str]] = None,
472
- ) -> Any:
477
+ ):
473
478
  r"""Delete a gift card
474
479
 
475
480
  Removes a gift card from our system.
@@ -512,6 +517,7 @@ class GiftCardsSDK(BaseSDK):
512
517
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
513
518
  ),
514
519
  security=self.sdk_configuration.security,
520
+ allow_empty_value=None,
515
521
  timeout_ms=timeout_ms,
516
522
  )
517
523
 
@@ -528,7 +534,7 @@ class GiftCardsSDK(BaseSDK):
528
534
  config=self.sdk_configuration,
529
535
  base_url=base_url or "",
530
536
  operation_id="delete_gift_card",
531
- oauth2_scopes=[],
537
+ oauth2_scopes=None,
532
538
  security_source=get_security_from_env(
533
539
  self.sdk_configuration.security, models.Security
534
540
  ),
@@ -554,8 +560,8 @@ class GiftCardsSDK(BaseSDK):
554
560
  )
555
561
 
556
562
  response_data: Any = None
557
- if utils.match_response(http_res, "200", "application/json"):
558
- return unmarshal_json_response(Any, http_res)
563
+ if utils.match_response(http_res, "204", "*"):
564
+ return
559
565
  if utils.match_response(http_res, "400", "application/json"):
560
566
  response_data = unmarshal_json_response(errors.Error400Data, http_res)
561
567
  raise errors.Error400(response_data, http_res)
@@ -669,6 +675,7 @@ class GiftCardsSDK(BaseSDK):
669
675
  get_serialized_body=lambda: utils.serialize_request_body(
670
676
  request.gift_card_create, False, False, "json", models.GiftCardCreate
671
677
  ),
678
+ allow_empty_value=None,
672
679
  timeout_ms=timeout_ms,
673
680
  )
674
681
 
@@ -685,7 +692,7 @@ class GiftCardsSDK(BaseSDK):
685
692
  config=self.sdk_configuration,
686
693
  base_url=base_url or "",
687
694
  operation_id="create_gift_card",
688
- oauth2_scopes=[],
695
+ oauth2_scopes=None,
689
696
  security_source=get_security_from_env(
690
697
  self.sdk_configuration.security, models.Security
691
698
  ),
@@ -826,6 +833,7 @@ class GiftCardsSDK(BaseSDK):
826
833
  get_serialized_body=lambda: utils.serialize_request_body(
827
834
  request.gift_card_create, False, False, "json", models.GiftCardCreate
828
835
  ),
836
+ allow_empty_value=None,
829
837
  timeout_ms=timeout_ms,
830
838
  )
831
839
 
@@ -842,7 +850,7 @@ class GiftCardsSDK(BaseSDK):
842
850
  config=self.sdk_configuration,
843
851
  base_url=base_url or "",
844
852
  operation_id="create_gift_card",
845
- oauth2_scopes=[],
853
+ oauth2_scopes=None,
846
854
  security_source=get_security_from_env(
847
855
  self.sdk_configuration.security, models.Security
848
856
  ),
@@ -978,6 +986,7 @@ class GiftCardsSDK(BaseSDK):
978
986
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
979
987
  ),
980
988
  security=self.sdk_configuration.security,
989
+ allow_empty_value=None,
981
990
  timeout_ms=timeout_ms,
982
991
  )
983
992
 
@@ -998,7 +1007,7 @@ class GiftCardsSDK(BaseSDK):
998
1007
  config=self.sdk_configuration,
999
1008
  base_url=base_url or "",
1000
1009
  operation_id="list_gift_cards",
1001
- oauth2_scopes=[],
1010
+ oauth2_scopes=None,
1002
1011
  security_source=get_security_from_env(
1003
1012
  self.sdk_configuration.security, models.Security
1004
1013
  ),
@@ -1031,7 +1040,7 @@ class GiftCardsSDK(BaseSDK):
1031
1040
  return None
1032
1041
 
1033
1042
  next_cursor = next_cursor[0]
1034
- if next_cursor is None:
1043
+ if next_cursor is None or str(next_cursor).strip() == "":
1035
1044
  return None
1036
1045
 
1037
1046
  return self.list(
@@ -1157,6 +1166,7 @@ class GiftCardsSDK(BaseSDK):
1157
1166
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1158
1167
  ),
1159
1168
  security=self.sdk_configuration.security,
1169
+ allow_empty_value=None,
1160
1170
  timeout_ms=timeout_ms,
1161
1171
  )
1162
1172
 
@@ -1177,7 +1187,7 @@ class GiftCardsSDK(BaseSDK):
1177
1187
  config=self.sdk_configuration,
1178
1188
  base_url=base_url or "",
1179
1189
  operation_id="list_gift_cards",
1180
- oauth2_scopes=[],
1190
+ oauth2_scopes=None,
1181
1191
  security_source=get_security_from_env(
1182
1192
  self.sdk_configuration.security, models.Security
1183
1193
  ),
@@ -1210,7 +1220,7 @@ class GiftCardsSDK(BaseSDK):
1210
1220
  return None
1211
1221
 
1212
1222
  next_cursor = next_cursor[0]
1213
- if next_cursor is None:
1223
+ if next_cursor is None or str(next_cursor).strip() == "":
1214
1224
  return None
1215
1225
 
1216
1226
  return self.list(
gr4vy/httpclient.py CHANGED
@@ -107,7 +107,6 @@ def close_clients(
107
107
  # to them from the owning SDK instance and they can be reaped.
108
108
  owner.client = None
109
109
  owner.async_client = None
110
-
111
110
  if sync_client is not None and not sync_client_supplied:
112
111
  try:
113
112
  sync_client.close()
gr4vy/jobs.py CHANGED
@@ -71,6 +71,7 @@ class Jobs(BaseSDK):
71
71
  "json",
72
72
  models.AccountUpdaterJobCreate,
73
73
  ),
74
+ allow_empty_value=None,
74
75
  timeout_ms=timeout_ms,
75
76
  )
76
77
 
@@ -87,7 +88,7 @@ class Jobs(BaseSDK):
87
88
  config=self.sdk_configuration,
88
89
  base_url=base_url or "",
89
90
  operation_id="create_account_updater_job",
90
- oauth2_scopes=[],
91
+ oauth2_scopes=None,
91
92
  security_source=get_security_from_env(
92
93
  self.sdk_configuration.security, models.Security
93
94
  ),
@@ -225,6 +226,7 @@ class Jobs(BaseSDK):
225
226
  "json",
226
227
  models.AccountUpdaterJobCreate,
227
228
  ),
229
+ allow_empty_value=None,
228
230
  timeout_ms=timeout_ms,
229
231
  )
230
232
 
@@ -241,7 +243,7 @@ class Jobs(BaseSDK):
241
243
  config=self.sdk_configuration,
242
244
  base_url=base_url or "",
243
245
  operation_id="create_account_updater_job",
244
- oauth2_scopes=[],
246
+ oauth2_scopes=None,
245
247
  security_source=get_security_from_env(
246
248
  self.sdk_configuration.security, models.Security
247
249
  ),
@@ -63,6 +63,7 @@ class MerchantAccountsSDK(BaseSDK):
63
63
  accept_header_value="application/json",
64
64
  http_headers=http_headers,
65
65
  security=self.sdk_configuration.security,
66
+ allow_empty_value=None,
66
67
  timeout_ms=timeout_ms,
67
68
  )
68
69
 
@@ -83,7 +84,7 @@ class MerchantAccountsSDK(BaseSDK):
83
84
  config=self.sdk_configuration,
84
85
  base_url=base_url or "",
85
86
  operation_id="list_merchant_accounts",
86
- oauth2_scopes=[],
87
+ oauth2_scopes=None,
87
88
  security_source=get_security_from_env(
88
89
  self.sdk_configuration.security, models.Security
89
90
  ),
@@ -116,7 +117,7 @@ class MerchantAccountsSDK(BaseSDK):
116
117
  return None
117
118
 
118
119
  next_cursor = next_cursor[0]
119
- if next_cursor is None:
120
+ if next_cursor is None or str(next_cursor).strip() == "":
120
121
  return None
121
122
 
122
123
  return self.list(
@@ -231,6 +232,7 @@ class MerchantAccountsSDK(BaseSDK):
231
232
  accept_header_value="application/json",
232
233
  http_headers=http_headers,
233
234
  security=self.sdk_configuration.security,
235
+ allow_empty_value=None,
234
236
  timeout_ms=timeout_ms,
235
237
  )
236
238
 
@@ -251,7 +253,7 @@ class MerchantAccountsSDK(BaseSDK):
251
253
  config=self.sdk_configuration,
252
254
  base_url=base_url or "",
253
255
  operation_id="list_merchant_accounts",
254
- oauth2_scopes=[],
256
+ oauth2_scopes=None,
255
257
  security_source=get_security_from_env(
256
258
  self.sdk_configuration.security, models.Security
257
259
  ),
@@ -284,7 +286,7 @@ class MerchantAccountsSDK(BaseSDK):
284
286
  return None
285
287
 
286
288
  next_cursor = next_cursor[0]
287
- if next_cursor is None:
289
+ if next_cursor is None or str(next_cursor).strip() == "":
288
290
  return None
289
291
 
290
292
  return self.list(
@@ -368,6 +370,7 @@ class MerchantAccountsSDK(BaseSDK):
368
370
  amex_network_tokens_app_id: OptionalNullable[str] = UNSET,
369
371
  mastercard_network_tokens_requestor_id: OptionalNullable[str] = UNSET,
370
372
  mastercard_network_tokens_app_id: OptionalNullable[str] = UNSET,
373
+ async_network_tokens_enabled: Optional[bool] = False,
371
374
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
372
375
  server_url: Optional[str] = None,
373
376
  timeout_ms: Optional[int] = None,
@@ -395,6 +398,7 @@ class MerchantAccountsSDK(BaseSDK):
395
398
  :param amex_network_tokens_app_id: Application ID provided for American Express after onboarding to use Network Tokens.
396
399
  :param mastercard_network_tokens_requestor_id: Requestor ID provided for Mastercard after onboarding to use Network Tokens.
397
400
  :param mastercard_network_tokens_app_id: Application ID provided for Mastercard after onboarding to use Network Tokens.
401
+ :param async_network_tokens_enabled: When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
398
402
  :param retries: Override the default retry configuration for this method
399
403
  :param server_url: Override the default server URL for this method
400
404
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -427,6 +431,7 @@ class MerchantAccountsSDK(BaseSDK):
427
431
  amex_network_tokens_app_id=amex_network_tokens_app_id,
428
432
  mastercard_network_tokens_requestor_id=mastercard_network_tokens_requestor_id,
429
433
  mastercard_network_tokens_app_id=mastercard_network_tokens_app_id,
434
+ async_network_tokens_enabled=async_network_tokens_enabled,
430
435
  id=id,
431
436
  display_name=display_name,
432
437
  )
@@ -447,6 +452,7 @@ class MerchantAccountsSDK(BaseSDK):
447
452
  get_serialized_body=lambda: utils.serialize_request_body(
448
453
  request, False, False, "json", models.MerchantAccountCreate
449
454
  ),
455
+ allow_empty_value=None,
450
456
  timeout_ms=timeout_ms,
451
457
  )
452
458
 
@@ -463,7 +469,7 @@ class MerchantAccountsSDK(BaseSDK):
463
469
  config=self.sdk_configuration,
464
470
  base_url=base_url or "",
465
471
  operation_id="create_merchant_account",
466
- oauth2_scopes=[],
472
+ oauth2_scopes=None,
467
473
  security_source=get_security_from_env(
468
474
  self.sdk_configuration.security, models.Security
469
475
  ),
@@ -559,6 +565,7 @@ class MerchantAccountsSDK(BaseSDK):
559
565
  amex_network_tokens_app_id: OptionalNullable[str] = UNSET,
560
566
  mastercard_network_tokens_requestor_id: OptionalNullable[str] = UNSET,
561
567
  mastercard_network_tokens_app_id: OptionalNullable[str] = UNSET,
568
+ async_network_tokens_enabled: Optional[bool] = False,
562
569
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
563
570
  server_url: Optional[str] = None,
564
571
  timeout_ms: Optional[int] = None,
@@ -586,6 +593,7 @@ class MerchantAccountsSDK(BaseSDK):
586
593
  :param amex_network_tokens_app_id: Application ID provided for American Express after onboarding to use Network Tokens.
587
594
  :param mastercard_network_tokens_requestor_id: Requestor ID provided for Mastercard after onboarding to use Network Tokens.
588
595
  :param mastercard_network_tokens_app_id: Application ID provided for Mastercard after onboarding to use Network Tokens.
596
+ :param async_network_tokens_enabled: When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
589
597
  :param retries: Override the default retry configuration for this method
590
598
  :param server_url: Override the default server URL for this method
591
599
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -618,6 +626,7 @@ class MerchantAccountsSDK(BaseSDK):
618
626
  amex_network_tokens_app_id=amex_network_tokens_app_id,
619
627
  mastercard_network_tokens_requestor_id=mastercard_network_tokens_requestor_id,
620
628
  mastercard_network_tokens_app_id=mastercard_network_tokens_app_id,
629
+ async_network_tokens_enabled=async_network_tokens_enabled,
621
630
  id=id,
622
631
  display_name=display_name,
623
632
  )
@@ -638,6 +647,7 @@ class MerchantAccountsSDK(BaseSDK):
638
647
  get_serialized_body=lambda: utils.serialize_request_body(
639
648
  request, False, False, "json", models.MerchantAccountCreate
640
649
  ),
650
+ allow_empty_value=None,
641
651
  timeout_ms=timeout_ms,
642
652
  )
643
653
 
@@ -654,7 +664,7 @@ class MerchantAccountsSDK(BaseSDK):
654
664
  config=self.sdk_configuration,
655
665
  base_url=base_url or "",
656
666
  operation_id="create_merchant_account",
657
- oauth2_scopes=[],
667
+ oauth2_scopes=None,
658
668
  security_source=get_security_from_env(
659
669
  self.sdk_configuration.security, models.Security
660
670
  ),
@@ -775,6 +785,7 @@ class MerchantAccountsSDK(BaseSDK):
775
785
  accept_header_value="application/json",
776
786
  http_headers=http_headers,
777
787
  security=self.sdk_configuration.security,
788
+ allow_empty_value=None,
778
789
  timeout_ms=timeout_ms,
779
790
  )
780
791
 
@@ -795,7 +806,7 @@ class MerchantAccountsSDK(BaseSDK):
795
806
  config=self.sdk_configuration,
796
807
  base_url=base_url or "",
797
808
  operation_id="get_merchant_account",
798
- oauth2_scopes=[],
809
+ oauth2_scopes=None,
799
810
  security_source=get_security_from_env(
800
811
  self.sdk_configuration.security, models.Security
801
812
  ),
@@ -916,6 +927,7 @@ class MerchantAccountsSDK(BaseSDK):
916
927
  accept_header_value="application/json",
917
928
  http_headers=http_headers,
918
929
  security=self.sdk_configuration.security,
930
+ allow_empty_value=None,
919
931
  timeout_ms=timeout_ms,
920
932
  )
921
933
 
@@ -936,7 +948,7 @@ class MerchantAccountsSDK(BaseSDK):
936
948
  config=self.sdk_configuration,
937
949
  base_url=base_url or "",
938
950
  operation_id="get_merchant_account",
939
- oauth2_scopes=[],
951
+ oauth2_scopes=None,
940
952
  security_source=get_security_from_env(
941
953
  self.sdk_configuration.security, models.Security
942
954
  ),
@@ -1031,6 +1043,7 @@ class MerchantAccountsSDK(BaseSDK):
1031
1043
  amex_network_tokens_app_id: OptionalNullable[str] = UNSET,
1032
1044
  mastercard_network_tokens_requestor_id: OptionalNullable[str] = UNSET,
1033
1045
  mastercard_network_tokens_app_id: OptionalNullable[str] = UNSET,
1046
+ async_network_tokens_enabled: Optional[bool] = False,
1034
1047
  display_name: OptionalNullable[str] = UNSET,
1035
1048
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1036
1049
  server_url: Optional[str] = None,
@@ -1058,6 +1071,7 @@ class MerchantAccountsSDK(BaseSDK):
1058
1071
  :param amex_network_tokens_app_id: Application ID provided for American Express after onboarding to use Network Tokens.
1059
1072
  :param mastercard_network_tokens_requestor_id: Requestor ID provided for Mastercard after onboarding to use Network Tokens.
1060
1073
  :param mastercard_network_tokens_app_id: Application ID provided for Mastercard after onboarding to use Network Tokens.
1074
+ :param async_network_tokens_enabled: When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
1061
1075
  :param display_name: The display name for the merchant account.
1062
1076
  :param retries: Override the default retry configuration for this method
1063
1077
  :param server_url: Override the default server URL for this method
@@ -1093,6 +1107,7 @@ class MerchantAccountsSDK(BaseSDK):
1093
1107
  amex_network_tokens_app_id=amex_network_tokens_app_id,
1094
1108
  mastercard_network_tokens_requestor_id=mastercard_network_tokens_requestor_id,
1095
1109
  mastercard_network_tokens_app_id=mastercard_network_tokens_app_id,
1110
+ async_network_tokens_enabled=async_network_tokens_enabled,
1096
1111
  display_name=display_name,
1097
1112
  ),
1098
1113
  )
@@ -1117,6 +1132,7 @@ class MerchantAccountsSDK(BaseSDK):
1117
1132
  "json",
1118
1133
  models.MerchantAccountUpdate,
1119
1134
  ),
1135
+ allow_empty_value=None,
1120
1136
  timeout_ms=timeout_ms,
1121
1137
  )
1122
1138
 
@@ -1133,7 +1149,7 @@ class MerchantAccountsSDK(BaseSDK):
1133
1149
  config=self.sdk_configuration,
1134
1150
  base_url=base_url or "",
1135
1151
  operation_id="update_merchant_account",
1136
- oauth2_scopes=[],
1152
+ oauth2_scopes=None,
1137
1153
  security_source=get_security_from_env(
1138
1154
  self.sdk_configuration.security, models.Security
1139
1155
  ),
@@ -1228,6 +1244,7 @@ class MerchantAccountsSDK(BaseSDK):
1228
1244
  amex_network_tokens_app_id: OptionalNullable[str] = UNSET,
1229
1245
  mastercard_network_tokens_requestor_id: OptionalNullable[str] = UNSET,
1230
1246
  mastercard_network_tokens_app_id: OptionalNullable[str] = UNSET,
1247
+ async_network_tokens_enabled: Optional[bool] = False,
1231
1248
  display_name: OptionalNullable[str] = UNSET,
1232
1249
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
1233
1250
  server_url: Optional[str] = None,
@@ -1255,6 +1272,7 @@ class MerchantAccountsSDK(BaseSDK):
1255
1272
  :param amex_network_tokens_app_id: Application ID provided for American Express after onboarding to use Network Tokens.
1256
1273
  :param mastercard_network_tokens_requestor_id: Requestor ID provided for Mastercard after onboarding to use Network Tokens.
1257
1274
  :param mastercard_network_tokens_app_id: Application ID provided for Mastercard after onboarding to use Network Tokens.
1275
+ :param async_network_tokens_enabled: When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
1258
1276
  :param display_name: The display name for the merchant account.
1259
1277
  :param retries: Override the default retry configuration for this method
1260
1278
  :param server_url: Override the default server URL for this method
@@ -1290,6 +1308,7 @@ class MerchantAccountsSDK(BaseSDK):
1290
1308
  amex_network_tokens_app_id=amex_network_tokens_app_id,
1291
1309
  mastercard_network_tokens_requestor_id=mastercard_network_tokens_requestor_id,
1292
1310
  mastercard_network_tokens_app_id=mastercard_network_tokens_app_id,
1311
+ async_network_tokens_enabled=async_network_tokens_enabled,
1293
1312
  display_name=display_name,
1294
1313
  ),
1295
1314
  )
@@ -1314,6 +1333,7 @@ class MerchantAccountsSDK(BaseSDK):
1314
1333
  "json",
1315
1334
  models.MerchantAccountUpdate,
1316
1335
  ),
1336
+ allow_empty_value=None,
1317
1337
  timeout_ms=timeout_ms,
1318
1338
  )
1319
1339
 
@@ -1330,7 +1350,7 @@ class MerchantAccountsSDK(BaseSDK):
1330
1350
  config=self.sdk_configuration,
1331
1351
  base_url=base_url or "",
1332
1352
  operation_id="update_merchant_account",
1333
- oauth2_scopes=[],
1353
+ oauth2_scopes=None,
1334
1354
  security_source=get_security_from_env(
1335
1355
  self.sdk_configuration.security, models.Security
1336
1356
  ),