gr4vy 1.9.0__py3-none-any.whl → 1.10.0__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 (43) hide show
  1. gr4vy/_version.py +3 -3
  2. gr4vy/all.py +2 -0
  3. gr4vy/audit_logs.py +2 -0
  4. gr4vy/balances.py +2 -0
  5. gr4vy/basesdk.py +6 -0
  6. gr4vy/buyers_gift_cards.py +2 -0
  7. gr4vy/buyers_payment_methods.py +2 -0
  8. gr4vy/buyers_sdk.py +10 -0
  9. gr4vy/buyers_shipping_details.py +10 -0
  10. gr4vy/card_scheme_definitions_sdk.py +2 -0
  11. gr4vy/checkout_sessions.py +8 -0
  12. gr4vy/digital_wallets_sdk.py +10 -0
  13. gr4vy/domains.py +4 -0
  14. gr4vy/events.py +52 -5
  15. gr4vy/executions.py +6 -0
  16. gr4vy/gift_cards_sdk.py +8 -0
  17. gr4vy/jobs.py +2 -0
  18. gr4vy/merchant_accounts_sdk.py +8 -0
  19. gr4vy/models/__init__.py +6 -0
  20. gr4vy/models/list_transaction_eventsop.py +12 -1
  21. gr4vy/models/paymentlink.py +13 -0
  22. gr4vy/models/paymentlinkcreate.py +13 -0
  23. gr4vy/network_tokens_cryptogram.py +2 -0
  24. gr4vy/payment_links_sdk.py +20 -0
  25. gr4vy/payment_methods_network_tokens.py +10 -0
  26. gr4vy/payment_methods_payment_service_tokens.py +6 -0
  27. gr4vy/payment_methods_sdk.py +8 -0
  28. gr4vy/payment_options_sdk.py +2 -0
  29. gr4vy/payment_service_definitions_sdk.py +6 -0
  30. gr4vy/payment_services_sdk.py +14 -0
  31. gr4vy/payouts.py +6 -0
  32. gr4vy/refunds_sdk.py +2 -0
  33. gr4vy/report_executions_sdk.py +2 -0
  34. gr4vy/reports_sdk.py +8 -0
  35. gr4vy/sessions.py +6 -0
  36. gr4vy/transactions.py +16 -0
  37. gr4vy/transactions_refunds.py +6 -0
  38. gr4vy/transactions_settlements.py +4 -0
  39. gr4vy/utils/forms.py +21 -10
  40. gr4vy/utils/queryparams.py +14 -2
  41. {gr4vy-1.9.0.dist-info → gr4vy-1.10.0.dist-info}/METADATA +1 -1
  42. {gr4vy-1.9.0.dist-info → gr4vy-1.10.0.dist-info}/RECORD +43 -43
  43. {gr4vy-1.9.0.dist-info → gr4vy-1.10.0.dist-info}/WHEEL +0 -0
@@ -72,6 +72,7 @@ class PaymentServicesSDK(BaseSDK):
72
72
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
73
73
  ),
74
74
  security=self.sdk_configuration.security,
75
+ allow_empty_value=None,
75
76
  timeout_ms=timeout_ms,
76
77
  )
77
78
 
@@ -251,6 +252,7 @@ class PaymentServicesSDK(BaseSDK):
251
252
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
252
253
  ),
253
254
  security=self.sdk_configuration.security,
255
+ allow_empty_value=None,
254
256
  timeout_ms=timeout_ms,
255
257
  )
256
258
 
@@ -481,6 +483,7 @@ class PaymentServicesSDK(BaseSDK):
481
483
  "json",
482
484
  models.PaymentServiceCreate,
483
485
  ),
486
+ allow_empty_value=None,
484
487
  timeout_ms=timeout_ms,
485
488
  )
486
489
 
@@ -684,6 +687,7 @@ class PaymentServicesSDK(BaseSDK):
684
687
  "json",
685
688
  models.PaymentServiceCreate,
686
689
  ),
690
+ allow_empty_value=None,
687
691
  timeout_ms=timeout_ms,
688
692
  )
689
693
 
@@ -827,6 +831,7 @@ class PaymentServicesSDK(BaseSDK):
827
831
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
828
832
  ),
829
833
  security=self.sdk_configuration.security,
834
+ allow_empty_value=None,
830
835
  timeout_ms=timeout_ms,
831
836
  )
832
837
 
@@ -974,6 +979,7 @@ class PaymentServicesSDK(BaseSDK):
974
979
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
975
980
  ),
976
981
  security=self.sdk_configuration.security,
982
+ allow_empty_value=None,
977
983
  timeout_ms=timeout_ms,
978
984
  )
979
985
 
@@ -1185,6 +1191,7 @@ class PaymentServicesSDK(BaseSDK):
1185
1191
  "json",
1186
1192
  models.PaymentServiceUpdate,
1187
1193
  ),
1194
+ allow_empty_value=None,
1188
1195
  timeout_ms=timeout_ms,
1189
1196
  )
1190
1197
 
@@ -1392,6 +1399,7 @@ class PaymentServicesSDK(BaseSDK):
1392
1399
  "json",
1393
1400
  models.PaymentServiceUpdate,
1394
1401
  ),
1402
+ allow_empty_value=None,
1395
1403
  timeout_ms=timeout_ms,
1396
1404
  )
1397
1405
 
@@ -1535,6 +1543,7 @@ class PaymentServicesSDK(BaseSDK):
1535
1543
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1536
1544
  ),
1537
1545
  security=self.sdk_configuration.security,
1546
+ allow_empty_value=None,
1538
1547
  timeout_ms=timeout_ms,
1539
1548
  )
1540
1549
 
@@ -1678,6 +1687,7 @@ class PaymentServicesSDK(BaseSDK):
1678
1687
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1679
1688
  ),
1680
1689
  security=self.sdk_configuration.security,
1690
+ allow_empty_value=None,
1681
1691
  timeout_ms=timeout_ms,
1682
1692
  )
1683
1693
 
@@ -1836,6 +1846,7 @@ class PaymentServicesSDK(BaseSDK):
1836
1846
  "json",
1837
1847
  models.VerifyCredentials,
1838
1848
  ),
1849
+ allow_empty_value=None,
1839
1850
  timeout_ms=timeout_ms,
1840
1851
  )
1841
1852
 
@@ -1994,6 +2005,7 @@ class PaymentServicesSDK(BaseSDK):
1994
2005
  "json",
1995
2006
  models.VerifyCredentials,
1996
2007
  ),
2008
+ allow_empty_value=None,
1997
2009
  timeout_ms=timeout_ms,
1998
2010
  )
1999
2011
 
@@ -2143,6 +2155,7 @@ class PaymentServicesSDK(BaseSDK):
2143
2155
  get_serialized_body=lambda: utils.serialize_request_body(
2144
2156
  request.request_body, False, False, "json", Dict[str, Any]
2145
2157
  ),
2158
+ allow_empty_value=None,
2146
2159
  timeout_ms=timeout_ms,
2147
2160
  )
2148
2161
 
@@ -2292,6 +2305,7 @@ class PaymentServicesSDK(BaseSDK):
2292
2305
  get_serialized_body=lambda: utils.serialize_request_body(
2293
2306
  request.request_body, False, False, "json", Dict[str, Any]
2294
2307
  ),
2308
+ allow_empty_value=None,
2295
2309
  timeout_ms=timeout_ms,
2296
2310
  )
2297
2311
 
gr4vy/payouts.py CHANGED
@@ -66,6 +66,7 @@ class Payouts(BaseSDK):
66
66
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
67
67
  ),
68
68
  security=self.sdk_configuration.security,
69
+ allow_empty_value=None,
69
70
  timeout_ms=timeout_ms,
70
71
  )
71
72
 
@@ -237,6 +238,7 @@ class Payouts(BaseSDK):
237
238
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
238
239
  ),
239
240
  security=self.sdk_configuration.security,
241
+ allow_empty_value=None,
240
242
  timeout_ms=timeout_ms,
241
243
  )
242
244
 
@@ -458,6 +460,7 @@ class Payouts(BaseSDK):
458
460
  get_serialized_body=lambda: utils.serialize_request_body(
459
461
  request.payout_create, False, False, "json", models.PayoutCreate
460
462
  ),
463
+ allow_empty_value=None,
461
464
  timeout_ms=timeout_ms,
462
465
  )
463
466
 
@@ -654,6 +657,7 @@ class Payouts(BaseSDK):
654
657
  get_serialized_body=lambda: utils.serialize_request_body(
655
658
  request.payout_create, False, False, "json", models.PayoutCreate
656
659
  ),
660
+ allow_empty_value=None,
657
661
  timeout_ms=timeout_ms,
658
662
  )
659
663
 
@@ -797,6 +801,7 @@ class Payouts(BaseSDK):
797
801
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
798
802
  ),
799
803
  security=self.sdk_configuration.security,
804
+ allow_empty_value=None,
800
805
  timeout_ms=timeout_ms,
801
806
  )
802
807
 
@@ -944,6 +949,7 @@ class Payouts(BaseSDK):
944
949
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
945
950
  ),
946
951
  security=self.sdk_configuration.security,
952
+ allow_empty_value=None,
947
953
  timeout_ms=timeout_ms,
948
954
  )
949
955
 
gr4vy/refunds_sdk.py CHANGED
@@ -62,6 +62,7 @@ class RefundsSDK(BaseSDK):
62
62
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
63
63
  ),
64
64
  security=self.sdk_configuration.security,
65
+ allow_empty_value=None,
65
66
  timeout_ms=timeout_ms,
66
67
  )
67
68
 
@@ -209,6 +210,7 @@ class RefundsSDK(BaseSDK):
209
210
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
210
211
  ),
211
212
  security=self.sdk_configuration.security,
213
+ allow_empty_value=None,
212
214
  timeout_ms=timeout_ms,
213
215
  )
214
216
 
@@ -82,6 +82,7 @@ class ReportExecutionsSDK(BaseSDK):
82
82
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
83
83
  ),
84
84
  security=self.sdk_configuration.security,
85
+ allow_empty_value=None,
85
86
  timeout_ms=timeout_ms,
86
87
  )
87
88
 
@@ -273,6 +274,7 @@ class ReportExecutionsSDK(BaseSDK):
273
274
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
274
275
  ),
275
276
  security=self.sdk_configuration.security,
277
+ allow_empty_value=None,
276
278
  timeout_ms=timeout_ms,
277
279
  )
278
280
 
gr4vy/reports_sdk.py CHANGED
@@ -89,6 +89,7 @@ class ReportsSDK(BaseSDK):
89
89
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
90
90
  ),
91
91
  security=self.sdk_configuration.security,
92
+ allow_empty_value=None,
92
93
  timeout_ms=timeout_ms,
93
94
  )
94
95
 
@@ -271,6 +272,7 @@ class ReportsSDK(BaseSDK):
271
272
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
272
273
  ),
273
274
  security=self.sdk_configuration.security,
275
+ allow_empty_value=None,
274
276
  timeout_ms=timeout_ms,
275
277
  )
276
278
 
@@ -461,6 +463,7 @@ class ReportsSDK(BaseSDK):
461
463
  get_serialized_body=lambda: utils.serialize_request_body(
462
464
  request.report_create, False, False, "json", models.ReportCreate
463
465
  ),
466
+ allow_empty_value=None,
464
467
  timeout_ms=timeout_ms,
465
468
  )
466
469
 
@@ -624,6 +627,7 @@ class ReportsSDK(BaseSDK):
624
627
  get_serialized_body=lambda: utils.serialize_request_body(
625
628
  request.report_create, False, False, "json", models.ReportCreate
626
629
  ),
630
+ allow_empty_value=None,
627
631
  timeout_ms=timeout_ms,
628
632
  )
629
633
 
@@ -767,6 +771,7 @@ class ReportsSDK(BaseSDK):
767
771
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
768
772
  ),
769
773
  security=self.sdk_configuration.security,
774
+ allow_empty_value=None,
770
775
  timeout_ms=timeout_ms,
771
776
  )
772
777
 
@@ -914,6 +919,7 @@ class ReportsSDK(BaseSDK):
914
919
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
915
920
  ),
916
921
  security=self.sdk_configuration.security,
922
+ allow_empty_value=None,
917
923
  timeout_ms=timeout_ms,
918
924
  )
919
925
 
@@ -1075,6 +1081,7 @@ class ReportsSDK(BaseSDK):
1075
1081
  get_serialized_body=lambda: utils.serialize_request_body(
1076
1082
  request.report_update, False, False, "json", models.ReportUpdate
1077
1083
  ),
1084
+ allow_empty_value=None,
1078
1085
  timeout_ms=timeout_ms,
1079
1086
  )
1080
1087
 
@@ -1232,6 +1239,7 @@ class ReportsSDK(BaseSDK):
1232
1239
  get_serialized_body=lambda: utils.serialize_request_body(
1233
1240
  request.report_update, False, False, "json", models.ReportUpdate
1234
1241
  ),
1242
+ allow_empty_value=None,
1235
1243
  timeout_ms=timeout_ms,
1236
1244
  )
1237
1245
 
gr4vy/sessions.py CHANGED
@@ -71,6 +71,7 @@ class Sessions(BaseSDK):
71
71
  "json",
72
72
  models.GooglePaySessionRequest,
73
73
  ),
74
+ allow_empty_value=None,
74
75
  timeout_ms=timeout_ms,
75
76
  )
76
77
 
@@ -223,6 +224,7 @@ class Sessions(BaseSDK):
223
224
  "json",
224
225
  models.GooglePaySessionRequest,
225
226
  ),
227
+ allow_empty_value=None,
226
228
  timeout_ms=timeout_ms,
227
229
  )
228
230
 
@@ -378,6 +380,7 @@ class Sessions(BaseSDK):
378
380
  "json",
379
381
  models.ApplePaySessionRequest,
380
382
  ),
383
+ allow_empty_value=None,
381
384
  timeout_ms=timeout_ms,
382
385
  )
383
386
 
@@ -533,6 +536,7 @@ class Sessions(BaseSDK):
533
536
  "json",
534
537
  models.ApplePaySessionRequest,
535
538
  ),
539
+ allow_empty_value=None,
536
540
  timeout_ms=timeout_ms,
537
541
  )
538
542
 
@@ -673,6 +677,7 @@ class Sessions(BaseSDK):
673
677
  get_serialized_body=lambda: utils.serialize_request_body(
674
678
  request, False, False, "json", models.ClickToPaySessionRequest
675
679
  ),
680
+ allow_empty_value=None,
676
681
  timeout_ms=timeout_ms,
677
682
  )
678
683
 
@@ -813,6 +818,7 @@ class Sessions(BaseSDK):
813
818
  get_serialized_body=lambda: utils.serialize_request_body(
814
819
  request, False, False, "json", models.ClickToPaySessionRequest
815
820
  ),
821
+ allow_empty_value=None,
816
822
  timeout_ms=timeout_ms,
817
823
  )
818
824
 
gr4vy/transactions.py CHANGED
@@ -217,6 +217,7 @@ class Transactions(BaseSDK):
217
217
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
218
218
  ),
219
219
  security=self.sdk_configuration.security,
220
+ allow_empty_value=None,
220
221
  timeout_ms=timeout_ms,
221
222
  )
222
223
 
@@ -556,6 +557,7 @@ class Transactions(BaseSDK):
556
557
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
557
558
  ),
558
559
  security=self.sdk_configuration.security,
560
+ allow_empty_value=None,
559
561
  timeout_ms=timeout_ms,
560
562
  )
561
563
 
@@ -963,6 +965,7 @@ class Transactions(BaseSDK):
963
965
  "json",
964
966
  models.TransactionCreate,
965
967
  ),
968
+ allow_empty_value=None,
966
969
  timeout_ms=timeout_ms,
967
970
  )
968
971
 
@@ -1303,6 +1306,7 @@ class Transactions(BaseSDK):
1303
1306
  "json",
1304
1307
  models.TransactionCreate,
1305
1308
  ),
1309
+ allow_empty_value=None,
1306
1310
  timeout_ms=timeout_ms,
1307
1311
  )
1308
1312
 
@@ -1446,6 +1450,7 @@ class Transactions(BaseSDK):
1446
1450
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1447
1451
  ),
1448
1452
  security=self.sdk_configuration.security,
1453
+ allow_empty_value=None,
1449
1454
  timeout_ms=timeout_ms,
1450
1455
  )
1451
1456
 
@@ -1593,6 +1598,7 @@ class Transactions(BaseSDK):
1593
1598
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
1594
1599
  ),
1595
1600
  security=self.sdk_configuration.security,
1601
+ allow_empty_value=None,
1596
1602
  timeout_ms=timeout_ms,
1597
1603
  )
1598
1604
 
@@ -1766,6 +1772,7 @@ class Transactions(BaseSDK):
1766
1772
  "json",
1767
1773
  models.TransactionUpdate,
1768
1774
  ),
1775
+ allow_empty_value=None,
1769
1776
  timeout_ms=timeout_ms,
1770
1777
  )
1771
1778
 
@@ -1935,6 +1942,7 @@ class Transactions(BaseSDK):
1935
1942
  "json",
1936
1943
  models.TransactionUpdate,
1937
1944
  ),
1945
+ allow_empty_value=None,
1938
1946
  timeout_ms=timeout_ms,
1939
1947
  )
1940
1948
 
@@ -2100,6 +2108,7 @@ class Transactions(BaseSDK):
2100
2108
  "json",
2101
2109
  models.TransactionCaptureCreate,
2102
2110
  ),
2111
+ allow_empty_value=None,
2103
2112
  timeout_ms=timeout_ms,
2104
2113
  )
2105
2114
 
@@ -2265,6 +2274,7 @@ class Transactions(BaseSDK):
2265
2274
  "json",
2266
2275
  models.TransactionCaptureCreate,
2267
2276
  ),
2277
+ allow_empty_value=None,
2268
2278
  timeout_ms=timeout_ms,
2269
2279
  )
2270
2280
 
@@ -2411,6 +2421,7 @@ class Transactions(BaseSDK):
2411
2421
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2412
2422
  ),
2413
2423
  security=self.sdk_configuration.security,
2424
+ allow_empty_value=None,
2414
2425
  timeout_ms=timeout_ms,
2415
2426
  )
2416
2427
 
@@ -2557,6 +2568,7 @@ class Transactions(BaseSDK):
2557
2568
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2558
2569
  ),
2559
2570
  security=self.sdk_configuration.security,
2571
+ allow_empty_value=None,
2560
2572
  timeout_ms=timeout_ms,
2561
2573
  )
2562
2574
 
@@ -2700,6 +2712,7 @@ class Transactions(BaseSDK):
2700
2712
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2701
2713
  ),
2702
2714
  security=self.sdk_configuration.security,
2715
+ allow_empty_value=None,
2703
2716
  timeout_ms=timeout_ms,
2704
2717
  )
2705
2718
 
@@ -2843,6 +2856,7 @@ class Transactions(BaseSDK):
2843
2856
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2844
2857
  ),
2845
2858
  security=self.sdk_configuration.security,
2859
+ allow_empty_value=None,
2846
2860
  timeout_ms=timeout_ms,
2847
2861
  )
2848
2862
 
@@ -2986,6 +3000,7 @@ class Transactions(BaseSDK):
2986
3000
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
2987
3001
  ),
2988
3002
  security=self.sdk_configuration.security,
3003
+ allow_empty_value=None,
2989
3004
  timeout_ms=timeout_ms,
2990
3005
  )
2991
3006
 
@@ -3129,6 +3144,7 @@ class Transactions(BaseSDK):
3129
3144
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
3130
3145
  ),
3131
3146
  security=self.sdk_configuration.security,
3147
+ allow_empty_value=None,
3132
3148
  timeout_ms=timeout_ms,
3133
3149
  )
3134
3150
 
@@ -76,6 +76,7 @@ class TransactionsRefunds(BaseSDK):
76
76
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
77
77
  ),
78
78
  security=self.sdk_configuration.security,
79
+ allow_empty_value=None,
79
80
  timeout_ms=timeout_ms,
80
81
  )
81
82
 
@@ -223,6 +224,7 @@ class TransactionsRefunds(BaseSDK):
223
224
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
224
225
  ),
225
226
  security=self.sdk_configuration.security,
227
+ allow_empty_value=None,
226
228
  timeout_ms=timeout_ms,
227
229
  )
228
230
 
@@ -394,6 +396,7 @@ class TransactionsRefunds(BaseSDK):
394
396
  "json",
395
397
  models.TransactionRefundCreate,
396
398
  ),
399
+ allow_empty_value=None,
397
400
  timeout_ms=timeout_ms,
398
401
  )
399
402
 
@@ -561,6 +564,7 @@ class TransactionsRefunds(BaseSDK):
561
564
  "json",
562
565
  models.TransactionRefundCreate,
563
566
  ),
567
+ allow_empty_value=None,
564
568
  timeout_ms=timeout_ms,
565
569
  )
566
570
 
@@ -707,6 +711,7 @@ class TransactionsRefunds(BaseSDK):
707
711
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
708
712
  ),
709
713
  security=self.sdk_configuration.security,
714
+ allow_empty_value=None,
710
715
  timeout_ms=timeout_ms,
711
716
  )
712
717
 
@@ -857,6 +862,7 @@ class TransactionsRefunds(BaseSDK):
857
862
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
858
863
  ),
859
864
  security=self.sdk_configuration.security,
865
+ allow_empty_value=None,
860
866
  timeout_ms=timeout_ms,
861
867
  )
862
868
 
@@ -65,6 +65,7 @@ class TransactionsSettlements(BaseSDK):
65
65
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
66
66
  ),
67
67
  security=self.sdk_configuration.security,
68
+ allow_empty_value=None,
68
69
  timeout_ms=timeout_ms,
69
70
  )
70
71
 
@@ -215,6 +216,7 @@ class TransactionsSettlements(BaseSDK):
215
216
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
216
217
  ),
217
218
  security=self.sdk_configuration.security,
219
+ allow_empty_value=None,
218
220
  timeout_ms=timeout_ms,
219
221
  )
220
222
 
@@ -362,6 +364,7 @@ class TransactionsSettlements(BaseSDK):
362
364
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
363
365
  ),
364
366
  security=self.sdk_configuration.security,
367
+ allow_empty_value=None,
365
368
  timeout_ms=timeout_ms,
366
369
  )
367
370
 
@@ -509,6 +512,7 @@ class TransactionsSettlements(BaseSDK):
509
512
  merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
510
513
  ),
511
514
  security=self.sdk_configuration.security,
515
+ allow_empty_value=None,
512
516
  timeout_ms=timeout_ms,
513
517
  )
514
518
 
gr4vy/utils/forms.py CHANGED
@@ -142,16 +142,21 @@ def serialize_multipart_form(
142
142
  if field_metadata.file:
143
143
  if isinstance(val, List):
144
144
  # Handle array of files
145
+ array_field_name = f_name + "[]"
145
146
  for file_obj in val:
146
147
  if not _is_set(file_obj):
147
148
  continue
148
-
149
- file_name, content, content_type = _extract_file_properties(file_obj)
149
+
150
+ file_name, content, content_type = _extract_file_properties(
151
+ file_obj
152
+ )
150
153
 
151
154
  if content_type is not None:
152
- files.append((f_name + "[]", (file_name, content, content_type)))
155
+ files.append(
156
+ (array_field_name, (file_name, content, content_type))
157
+ )
153
158
  else:
154
- files.append((f_name + "[]", (file_name, content)))
159
+ files.append((array_field_name, (file_name, content)))
155
160
  else:
156
161
  # Handle single file
157
162
  file_name, content, content_type = _extract_file_properties(val)
@@ -161,11 +166,16 @@ def serialize_multipart_form(
161
166
  else:
162
167
  files.append((f_name, (file_name, content)))
163
168
  elif field_metadata.json:
164
- files.append((f_name, (
165
- None,
166
- marshal_json(val, request_field_types[name]),
167
- "application/json",
168
- )))
169
+ files.append(
170
+ (
171
+ f_name,
172
+ (
173
+ None,
174
+ marshal_json(val, request_field_types[name]),
175
+ "application/json",
176
+ ),
177
+ )
178
+ )
169
179
  else:
170
180
  if isinstance(val, List):
171
181
  values = []
@@ -175,7 +185,8 @@ def serialize_multipart_form(
175
185
  continue
176
186
  values.append(_val_to_string(value))
177
187
 
178
- form[f_name + "[]"] = values
188
+ array_field_name = f_name + "[]"
189
+ form[array_field_name] = values
179
190
  else:
180
191
  form[f_name] = _val_to_string(val)
181
192
  return media_type, form, files
@@ -27,12 +27,13 @@ from .forms import _populate_form
27
27
  def get_query_params(
28
28
  query_params: Any,
29
29
  gbls: Optional[Any] = None,
30
+ allow_empty_value: Optional[List[str]] = None,
30
31
  ) -> Dict[str, List[str]]:
31
32
  params: Dict[str, List[str]] = {}
32
33
 
33
- globals_already_populated = _populate_query_params(query_params, gbls, params, [])
34
+ globals_already_populated = _populate_query_params(query_params, gbls, params, [], allow_empty_value)
34
35
  if _is_set(gbls):
35
- _populate_query_params(gbls, None, params, globals_already_populated)
36
+ _populate_query_params(gbls, None, params, globals_already_populated, allow_empty_value)
36
37
 
37
38
  return params
38
39
 
@@ -42,6 +43,7 @@ def _populate_query_params(
42
43
  gbls: Any,
43
44
  query_param_values: Dict[str, List[str]],
44
45
  skip_fields: List[str],
46
+ allow_empty_value: Optional[List[str]] = None,
45
47
  ) -> List[str]:
46
48
  globals_already_populated: List[str] = []
47
49
 
@@ -69,6 +71,16 @@ def _populate_query_params(
69
71
  globals_already_populated.append(name)
70
72
 
71
73
  f_name = field.alias if field.alias is not None else name
74
+
75
+ allow_empty_set = set(allow_empty_value or [])
76
+ should_include_empty = f_name in allow_empty_set and (
77
+ value is None or value == [] or value == ""
78
+ )
79
+
80
+ if should_include_empty:
81
+ query_param_values[f_name] = [""]
82
+ continue
83
+
72
84
  serialization = metadata.serialization
73
85
  if serialization is not None:
74
86
  serialized_parms = _get_serialized_params(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gr4vy
3
- Version: 1.9.0
3
+ Version: 1.10.0
4
4
  Summary: Python Client SDK Generated by Speakeasy.
5
5
  Author: Gr4vy
6
6
  Requires-Python: >=3.9.2