gr4vy 1.5.2__py3-none-any.whl → 1.10.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gr4vy/_version.py +3 -3
- gr4vy/actions.py +307 -0
- gr4vy/all.py +4 -2
- gr4vy/audit_logs.py +4 -2
- gr4vy/balances.py +4 -2
- gr4vy/basesdk.py +6 -0
- gr4vy/buyers_gift_cards.py +4 -2
- gr4vy/buyers_payment_methods.py +4 -2
- gr4vy/buyers_sdk.py +28 -18
- gr4vy/buyers_shipping_details.py +20 -10
- gr4vy/card_scheme_definitions_sdk.py +4 -2
- gr4vy/checkout_sessions.py +40 -14
- gr4vy/digital_wallets_sdk.py +20 -10
- gr4vy/domains.py +8 -4
- gr4vy/errors/apierror.py +1 -1
- gr4vy/errors/error400.py +1 -5
- gr4vy/errors/error401.py +1 -5
- gr4vy/errors/error403.py +1 -5
- gr4vy/errors/error404.py +1 -5
- gr4vy/errors/error405.py +1 -5
- gr4vy/errors/error409.py +1 -5
- gr4vy/errors/error425.py +1 -5
- gr4vy/errors/error429.py +1 -5
- gr4vy/errors/error500.py +1 -5
- gr4vy/errors/error502.py +1 -5
- gr4vy/errors/error504.py +1 -5
- gr4vy/errors/gr4vyerror.py +1 -1
- gr4vy/errors/httpvalidationerror.py +1 -1
- gr4vy/errors/no_response_error.py +1 -1
- gr4vy/errors/responsevalidationerror.py +1 -1
- gr4vy/events.py +54 -7
- gr4vy/executions.py +12 -6
- gr4vy/gift_cards_sdk.py +16 -8
- gr4vy/jobs.py +4 -2
- gr4vy/merchant_accounts_sdk.py +16 -8
- gr4vy/models/__init__.py +103 -29
- gr4vy/models/adyencardoptions.py +1 -6
- gr4vy/models/adyensepaoptions.py +1 -6
- gr4vy/models/airline.py +2 -7
- gr4vy/models/airlineleg.py +2 -6
- gr4vy/models/airlinepassenger.py +2 -6
- gr4vy/models/auditlogentry.py +3 -3
- gr4vy/models/auditlogentryuser.py +3 -3
- gr4vy/models/{billingdetails_input.py → billingdetails.py} +2 -2
- gr4vy/models/braintreedynamicdatafieldsoptions.py +2 -7
- gr4vy/models/browserinfo.py +2 -4
- gr4vy/models/buyer.py +3 -3
- gr4vy/models/buyercreate.py +3 -3
- gr4vy/models/buyerupdate.py +3 -3
- gr4vy/models/cartitem.py +9 -6
- gr4vy/models/chaseoptions.py +46 -0
- gr4vy/models/checkoutsession.py +24 -3
- gr4vy/models/checkoutsessioncreate.py +39 -5
- gr4vy/models/checkoutsessionpaymentmethod.py +3 -5
- gr4vy/models/checkoutsessionpaymentmethoddetails.py +2 -6
- gr4vy/models/create_payment_methodop.py +6 -0
- gr4vy/models/createsession.py +3 -3
- gr4vy/models/cybersourceoptions.py +7 -0
- gr4vy/models/definitionfield.py +1 -6
- gr4vy/models/digitalwallet.py +3 -5
- gr4vy/models/digitalwalletcreate.py +2 -6
- gr4vy/models/dlocalupirecurringinfooptions.py +13 -15
- gr4vy/models/errordetail.py +2 -4
- gr4vy/models/flow.py +16 -0
- gr4vy/models/flowaction.py +16 -0
- gr4vy/models/forterantifraudoptions.py +2 -7
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +4 -8
- gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +3 -6
- gr4vy/models/giftcardredemption.py +4 -8
- gr4vy/models/giftcardservice.py +3 -5
- gr4vy/models/giftcardsummary.py +3 -5
- gr4vy/models/{guestbuyer_input.py → guestbuyer.py} +5 -5
- gr4vy/models/instrumenttype.py +1 -0
- gr4vy/models/integrationclient.py +16 -0
- gr4vy/models/list_all_report_executionsop.py +2 -14
- gr4vy/models/list_audit_logsop.py +2 -10
- gr4vy/models/list_buyer_payment_methodsop.py +2 -3
- gr4vy/models/list_payment_methodsop.py +2 -14
- gr4vy/models/list_payment_servicesop.py +2 -8
- gr4vy/models/list_reportsop.py +2 -10
- gr4vy/models/list_transaction_actionsop.py +43 -0
- gr4vy/models/list_transaction_eventsop.py +12 -1
- gr4vy/models/list_transactionsop.py +4 -22
- gr4vy/models/merchantaccount.py +3 -5
- gr4vy/models/merchantaccountcreate.py +2 -6
- gr4vy/models/merchantaccountupdate.py +2 -6
- gr4vy/models/method.py +3 -0
- gr4vy/models/mockcardoptions.py +7 -2
- gr4vy/models/mode.py +1 -0
- gr4vy/models/monatospeioptions.py +15 -0
- gr4vy/models/networktoken.py +3 -3
- gr4vy/models/networktokenpaymentmethodcreate.py +4 -8
- gr4vy/models/nuveiidealoptions.py +49 -0
- gr4vy/models/paymentlink.py +18 -7
- gr4vy/models/paymentlinkcreate.py +23 -37
- gr4vy/models/paymentmethod.py +7 -13
- gr4vy/models/paymentmethodcard.py +3 -5
- gr4vy/models/paymentmethoddetailscard.py +2 -6
- gr4vy/models/paymentmethodsummary.py +6 -12
- gr4vy/models/paymentoption.py +3 -3
- gr4vy/models/paymentservice.py +4 -6
- gr4vy/models/paymentserviceconfiguration.py +2 -6
- gr4vy/models/paymentservicedefinition.py +11 -5
- gr4vy/models/paymentservicetoken.py +3 -3
- gr4vy/models/payoutcreate.py +5 -9
- gr4vy/models/payoutsummary.py +4 -6
- gr4vy/models/paypaloptions.py +8 -2
- gr4vy/models/paypalshippingoptions.py +51 -0
- gr4vy/models/paypalshippingoptionsitem.py +89 -0
- gr4vy/models/paypalshippingoptionsitemamount.py +20 -0
- gr4vy/models/plaidpaymentmethodcreate.py +106 -0
- gr4vy/models/redirectpaymentmethodcreate.py +3 -6
- gr4vy/models/refund.py +4 -4
- gr4vy/models/report.py +4 -6
- gr4vy/models/reportcreate.py +2 -3
- gr4vy/models/reportexecution.py +3 -3
- gr4vy/models/reportexecutionsummary.py +3 -3
- gr4vy/models/reportspec.py +2 -4
- gr4vy/models/reportsummary.py +3 -5
- gr4vy/models/taxid.py +2 -4
- gr4vy/models/taxidkind.py +6 -0
- gr4vy/models/threedsecuredatav1.py +2 -6
- gr4vy/models/threedsecuredatav2.py +2 -6
- gr4vy/models/transaction.py +74 -25
- gr4vy/models/transactionaction.py +48 -0
- gr4vy/models/transactionactions.py +17 -0
- gr4vy/models/transactionbuyer.py +3 -3
- gr4vy/models/transactioncancel.py +3 -3
- gr4vy/models/transactioncapture.py +3 -3
- gr4vy/models/transactionconnectionoptions.py +30 -0
- gr4vy/models/transactioncreate.py +27 -12
- gr4vy/models/transactionevent.py +5 -3
- gr4vy/models/transactionpaymentmethod.py +6 -12
- gr4vy/models/transactionpaymentservice.py +3 -3
- gr4vy/models/transactionrefundcreate.py +2 -6
- gr4vy/models/transactionsummary.py +6 -10
- gr4vy/models/transactionthreedsecuresummary.py +3 -9
- gr4vy/models/transactionvoid.py +3 -3
- gr4vy/models/trustlyoptions.py +2 -9
- gr4vy/network_tokens_cryptogram.py +4 -2
- gr4vy/payment_links_sdk.py +34 -14
- gr4vy/payment_methods_network_tokens.py +20 -10
- gr4vy/payment_methods_payment_service_tokens.py +12 -6
- gr4vy/payment_methods_sdk.py +16 -8
- gr4vy/payment_options_sdk.py +4 -2
- gr4vy/payment_service_definitions_sdk.py +12 -6
- gr4vy/payment_services_sdk.py +28 -14
- gr4vy/payouts.py +16 -10
- gr4vy/refunds_sdk.py +4 -2
- gr4vy/report_executions_sdk.py +4 -2
- gr4vy/reports_sdk.py +16 -8
- gr4vy/sessions.py +12 -6
- gr4vy/transactions.py +99 -28
- gr4vy/transactions_refunds.py +12 -6
- gr4vy/transactions_settlements.py +8 -4
- gr4vy/types/basemodel.py +41 -3
- gr4vy/utils/__init__.py +0 -3
- gr4vy/utils/enums.py +60 -0
- gr4vy/utils/forms.py +21 -10
- gr4vy/utils/queryparams.py +14 -2
- gr4vy/utils/requestbodies.py +1 -1
- gr4vy/utils/retries.py +69 -5
- gr4vy/utils/serializers.py +0 -20
- gr4vy/utils/unmarshal_json_response.py +15 -1
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/METADATA +39 -39
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/RECORD +167 -155
- gr4vy/models/billingdetails_output.py +0 -87
- gr4vy/models/guestbuyer_output.py +0 -80
- {gr4vy-1.5.2.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +0 -0
gr4vy/digital_wallets_sdk.py
CHANGED
|
@@ -106,6 +106,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
106
106
|
"json",
|
|
107
107
|
models.DigitalWalletCreate,
|
|
108
108
|
),
|
|
109
|
+
allow_empty_value=None,
|
|
109
110
|
timeout_ms=timeout_ms,
|
|
110
111
|
)
|
|
111
112
|
|
|
@@ -122,7 +123,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
122
123
|
config=self.sdk_configuration,
|
|
123
124
|
base_url=base_url or "",
|
|
124
125
|
operation_id="configure_digital_wallet",
|
|
125
|
-
oauth2_scopes=
|
|
126
|
+
oauth2_scopes=None,
|
|
126
127
|
security_source=get_security_from_env(
|
|
127
128
|
self.sdk_configuration.security, models.Security
|
|
128
129
|
),
|
|
@@ -276,6 +277,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
276
277
|
"json",
|
|
277
278
|
models.DigitalWalletCreate,
|
|
278
279
|
),
|
|
280
|
+
allow_empty_value=None,
|
|
279
281
|
timeout_ms=timeout_ms,
|
|
280
282
|
)
|
|
281
283
|
|
|
@@ -292,7 +294,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
292
294
|
config=self.sdk_configuration,
|
|
293
295
|
base_url=base_url or "",
|
|
294
296
|
operation_id="configure_digital_wallet",
|
|
295
|
-
oauth2_scopes=
|
|
297
|
+
oauth2_scopes=None,
|
|
296
298
|
security_source=get_security_from_env(
|
|
297
299
|
self.sdk_configuration.security, models.Security
|
|
298
300
|
),
|
|
@@ -416,6 +418,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
416
418
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
417
419
|
),
|
|
418
420
|
security=self.sdk_configuration.security,
|
|
421
|
+
allow_empty_value=None,
|
|
419
422
|
timeout_ms=timeout_ms,
|
|
420
423
|
)
|
|
421
424
|
|
|
@@ -436,7 +439,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
436
439
|
config=self.sdk_configuration,
|
|
437
440
|
base_url=base_url or "",
|
|
438
441
|
operation_id="list_digital_wallets",
|
|
439
|
-
oauth2_scopes=
|
|
442
|
+
oauth2_scopes=None,
|
|
440
443
|
security_source=get_security_from_env(
|
|
441
444
|
self.sdk_configuration.security, models.Security
|
|
442
445
|
),
|
|
@@ -560,6 +563,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
560
563
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
561
564
|
),
|
|
562
565
|
security=self.sdk_configuration.security,
|
|
566
|
+
allow_empty_value=None,
|
|
563
567
|
timeout_ms=timeout_ms,
|
|
564
568
|
)
|
|
565
569
|
|
|
@@ -580,7 +584,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
580
584
|
config=self.sdk_configuration,
|
|
581
585
|
base_url=base_url or "",
|
|
582
586
|
operation_id="list_digital_wallets",
|
|
583
|
-
oauth2_scopes=
|
|
587
|
+
oauth2_scopes=None,
|
|
584
588
|
security_source=get_security_from_env(
|
|
585
589
|
self.sdk_configuration.security, models.Security
|
|
586
590
|
),
|
|
@@ -707,6 +711,7 @@ class DigitalWalletsSDK(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
|
|
|
@@ -727,7 +732,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
727
732
|
config=self.sdk_configuration,
|
|
728
733
|
base_url=base_url or "",
|
|
729
734
|
operation_id="get_digital_wallet",
|
|
730
|
-
oauth2_scopes=
|
|
735
|
+
oauth2_scopes=None,
|
|
731
736
|
security_source=get_security_from_env(
|
|
732
737
|
self.sdk_configuration.security, models.Security
|
|
733
738
|
),
|
|
@@ -854,6 +859,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
854
859
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
855
860
|
),
|
|
856
861
|
security=self.sdk_configuration.security,
|
|
862
|
+
allow_empty_value=None,
|
|
857
863
|
timeout_ms=timeout_ms,
|
|
858
864
|
)
|
|
859
865
|
|
|
@@ -874,7 +880,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
874
880
|
config=self.sdk_configuration,
|
|
875
881
|
base_url=base_url or "",
|
|
876
882
|
operation_id="get_digital_wallet",
|
|
877
|
-
oauth2_scopes=
|
|
883
|
+
oauth2_scopes=None,
|
|
878
884
|
security_source=get_security_from_env(
|
|
879
885
|
self.sdk_configuration.security, models.Security
|
|
880
886
|
),
|
|
@@ -1001,6 +1007,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1001
1007
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1002
1008
|
),
|
|
1003
1009
|
security=self.sdk_configuration.security,
|
|
1010
|
+
allow_empty_value=None,
|
|
1004
1011
|
timeout_ms=timeout_ms,
|
|
1005
1012
|
)
|
|
1006
1013
|
|
|
@@ -1017,7 +1024,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1017
1024
|
config=self.sdk_configuration,
|
|
1018
1025
|
base_url=base_url or "",
|
|
1019
1026
|
operation_id="delete_digital_wallet",
|
|
1020
|
-
oauth2_scopes=
|
|
1027
|
+
oauth2_scopes=None,
|
|
1021
1028
|
security_source=get_security_from_env(
|
|
1022
1029
|
self.sdk_configuration.security, models.Security
|
|
1023
1030
|
),
|
|
@@ -1144,6 +1151,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1144
1151
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1145
1152
|
),
|
|
1146
1153
|
security=self.sdk_configuration.security,
|
|
1154
|
+
allow_empty_value=None,
|
|
1147
1155
|
timeout_ms=timeout_ms,
|
|
1148
1156
|
)
|
|
1149
1157
|
|
|
@@ -1160,7 +1168,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1160
1168
|
config=self.sdk_configuration,
|
|
1161
1169
|
base_url=base_url or "",
|
|
1162
1170
|
operation_id="delete_digital_wallet",
|
|
1163
|
-
oauth2_scopes=
|
|
1171
|
+
oauth2_scopes=None,
|
|
1164
1172
|
security_source=get_security_from_env(
|
|
1165
1173
|
self.sdk_configuration.security, models.Security
|
|
1166
1174
|
),
|
|
@@ -1311,6 +1319,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1311
1319
|
"json",
|
|
1312
1320
|
models.DigitalWalletUpdate,
|
|
1313
1321
|
),
|
|
1322
|
+
allow_empty_value=None,
|
|
1314
1323
|
timeout_ms=timeout_ms,
|
|
1315
1324
|
)
|
|
1316
1325
|
|
|
@@ -1327,7 +1336,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1327
1336
|
config=self.sdk_configuration,
|
|
1328
1337
|
base_url=base_url or "",
|
|
1329
1338
|
operation_id="update_digital_wallet",
|
|
1330
|
-
oauth2_scopes=
|
|
1339
|
+
oauth2_scopes=None,
|
|
1331
1340
|
security_source=get_security_from_env(
|
|
1332
1341
|
self.sdk_configuration.security, models.Security
|
|
1333
1342
|
),
|
|
@@ -1478,6 +1487,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1478
1487
|
"json",
|
|
1479
1488
|
models.DigitalWalletUpdate,
|
|
1480
1489
|
),
|
|
1490
|
+
allow_empty_value=None,
|
|
1481
1491
|
timeout_ms=timeout_ms,
|
|
1482
1492
|
)
|
|
1483
1493
|
|
|
@@ -1494,7 +1504,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1494
1504
|
config=self.sdk_configuration,
|
|
1495
1505
|
base_url=base_url or "",
|
|
1496
1506
|
operation_id="update_digital_wallet",
|
|
1497
|
-
oauth2_scopes=
|
|
1507
|
+
oauth2_scopes=None,
|
|
1498
1508
|
security_source=get_security_from_env(
|
|
1499
1509
|
self.sdk_configuration.security, models.Security
|
|
1500
1510
|
),
|
gr4vy/domains.py
CHANGED
|
@@ -74,6 +74,7 @@ class Domains(BaseSDK):
|
|
|
74
74
|
"json",
|
|
75
75
|
models.DigitalWalletDomain,
|
|
76
76
|
),
|
|
77
|
+
allow_empty_value=None,
|
|
77
78
|
timeout_ms=timeout_ms,
|
|
78
79
|
)
|
|
79
80
|
|
|
@@ -90,7 +91,7 @@ class Domains(BaseSDK):
|
|
|
90
91
|
config=self.sdk_configuration,
|
|
91
92
|
base_url=base_url or "",
|
|
92
93
|
operation_id="register_digital_wallet_domain",
|
|
93
|
-
oauth2_scopes=
|
|
94
|
+
oauth2_scopes=None,
|
|
94
95
|
security_source=get_security_from_env(
|
|
95
96
|
self.sdk_configuration.security, models.Security
|
|
96
97
|
),
|
|
@@ -229,6 +230,7 @@ class Domains(BaseSDK):
|
|
|
229
230
|
"json",
|
|
230
231
|
models.DigitalWalletDomain,
|
|
231
232
|
),
|
|
233
|
+
allow_empty_value=None,
|
|
232
234
|
timeout_ms=timeout_ms,
|
|
233
235
|
)
|
|
234
236
|
|
|
@@ -245,7 +247,7 @@ class Domains(BaseSDK):
|
|
|
245
247
|
config=self.sdk_configuration,
|
|
246
248
|
base_url=base_url or "",
|
|
247
249
|
operation_id="register_digital_wallet_domain",
|
|
248
|
-
oauth2_scopes=
|
|
250
|
+
oauth2_scopes=None,
|
|
249
251
|
security_source=get_security_from_env(
|
|
250
252
|
self.sdk_configuration.security, models.Security
|
|
251
253
|
),
|
|
@@ -384,6 +386,7 @@ class Domains(BaseSDK):
|
|
|
384
386
|
"json",
|
|
385
387
|
models.DigitalWalletDomain,
|
|
386
388
|
),
|
|
389
|
+
allow_empty_value=None,
|
|
387
390
|
timeout_ms=timeout_ms,
|
|
388
391
|
)
|
|
389
392
|
|
|
@@ -400,7 +403,7 @@ class Domains(BaseSDK):
|
|
|
400
403
|
config=self.sdk_configuration,
|
|
401
404
|
base_url=base_url or "",
|
|
402
405
|
operation_id="unregister_digital_wallet_domain",
|
|
403
|
-
oauth2_scopes=
|
|
406
|
+
oauth2_scopes=None,
|
|
404
407
|
security_source=get_security_from_env(
|
|
405
408
|
self.sdk_configuration.security, models.Security
|
|
406
409
|
),
|
|
@@ -539,6 +542,7 @@ class Domains(BaseSDK):
|
|
|
539
542
|
"json",
|
|
540
543
|
models.DigitalWalletDomain,
|
|
541
544
|
),
|
|
545
|
+
allow_empty_value=None,
|
|
542
546
|
timeout_ms=timeout_ms,
|
|
543
547
|
)
|
|
544
548
|
|
|
@@ -555,7 +559,7 @@ class Domains(BaseSDK):
|
|
|
555
559
|
config=self.sdk_configuration,
|
|
556
560
|
base_url=base_url or "",
|
|
557
561
|
operation_id="unregister_digital_wallet_domain",
|
|
558
|
-
oauth2_scopes=
|
|
562
|
+
oauth2_scopes=None,
|
|
559
563
|
security_source=get_security_from_env(
|
|
560
564
|
self.sdk_configuration.security, models.Security
|
|
561
565
|
),
|
gr4vy/errors/apierror.py
CHANGED
gr4vy/errors/error400.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error400Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "bad_request"
|
|
24
23
|
r"""Always `bad_request`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 400
|
|
27
25
|
r"""Always `400`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Generic error"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error400(Gr4vyError):
|
|
38
34
|
data: Error400Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error401.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error401Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "unauthorized"
|
|
24
23
|
r"""Always `unauthorized`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 401
|
|
27
25
|
r"""Always `401`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "No valid API authentication found"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error401(Gr4vyError):
|
|
38
34
|
data: Error401Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error403.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error403Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "forbidden"
|
|
24
23
|
r"""Always `forbidden`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 403
|
|
27
25
|
r"""Always `403`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Generic error"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error403(Gr4vyError):
|
|
38
34
|
data: Error403Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error404.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error404Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "not_found"
|
|
24
23
|
r"""Always `not_found`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 404
|
|
27
25
|
r"""Always `404`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "The resource could not be found"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error404(Gr4vyError):
|
|
38
34
|
data: Error404Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error405.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error405Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "method_not_allowed"
|
|
24
23
|
r"""Always `method_not_allowed`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 405
|
|
27
25
|
r"""Always `405`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Method Not Allowed"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error405(Gr4vyError):
|
|
38
34
|
data: Error405Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error409.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error409Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "duplicate_record"
|
|
24
23
|
r"""Always `duplicate_record`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 409
|
|
27
25
|
r"""Always `409`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Generic error"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error409(Gr4vyError):
|
|
38
34
|
data: Error409Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error425.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error425Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "too_early"
|
|
24
23
|
r"""Always `too_early`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 425
|
|
27
25
|
r"""Always `425`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Generic error"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error425(Gr4vyError):
|
|
38
34
|
data: Error425Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error429.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error429Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "too_many_requests"
|
|
24
23
|
r"""Always `too_many_requests`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 429
|
|
27
25
|
r"""Always `429`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Generic error"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error429(Gr4vyError):
|
|
38
34
|
data: Error429Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error500.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error500Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "server_error"
|
|
24
23
|
r"""Always `server_error`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 500
|
|
27
25
|
r"""Always `500`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Request could not be processed"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error500(Gr4vyError):
|
|
38
34
|
data: Error500Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error502.py
CHANGED
|
@@ -19,21 +19,17 @@ class Error502Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "bad_gateway"
|
|
24
23
|
r"""Always `bad_gateway`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 502
|
|
27
25
|
r"""Always `502`."""
|
|
28
|
-
|
|
29
26
|
message: Optional[str] = "Request could not be processed"
|
|
30
27
|
r"""A human readable message that provides more context to the error."""
|
|
31
|
-
|
|
32
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
33
29
|
r"""A list of details that further ellaborate on the error."""
|
|
34
30
|
|
|
35
31
|
|
|
36
|
-
@dataclass(
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
37
33
|
class Error502(Gr4vyError):
|
|
38
34
|
data: Error502Data = field(hash=False)
|
|
39
35
|
|
gr4vy/errors/error504.py
CHANGED
|
@@ -19,20 +19,16 @@ class Error504Data(BaseModel):
|
|
|
19
19
|
pydantic.Field(alias="type"),
|
|
20
20
|
] = "error"
|
|
21
21
|
r"""Always `error`."""
|
|
22
|
-
|
|
23
22
|
code: Optional[str] = "gateway_timeout"
|
|
24
23
|
r"""Always `gateway_timeout`"""
|
|
25
|
-
|
|
26
24
|
status: Optional[int] = 504
|
|
27
|
-
|
|
28
25
|
message: Optional[str] = "Request could not be processed"
|
|
29
26
|
r"""A human readable message that provides more context to the error."""
|
|
30
|
-
|
|
31
27
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
32
28
|
r"""A list of details that further ellaborate on the error."""
|
|
33
29
|
|
|
34
30
|
|
|
35
|
-
@dataclass(
|
|
31
|
+
@dataclass(unsafe_hash=True)
|
|
36
32
|
class Error504(Gr4vyError):
|
|
37
33
|
data: Error504Data = field(hash=False)
|
|
38
34
|
|
gr4vy/errors/gr4vyerror.py
CHANGED
|
@@ -13,7 +13,7 @@ class HTTPValidationErrorData(BaseModel):
|
|
|
13
13
|
detail: Optional[List[models_validationerror.ValidationError]] = None
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
@dataclass(
|
|
16
|
+
@dataclass(unsafe_hash=True)
|
|
17
17
|
class HTTPValidationError(Gr4vyError):
|
|
18
18
|
data: HTTPValidationErrorData = field(hash=False)
|
|
19
19
|
|
|
@@ -7,7 +7,7 @@ from dataclasses import dataclass
|
|
|
7
7
|
from gr4vy.errors import Gr4vyError
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@dataclass(
|
|
10
|
+
@dataclass(unsafe_hash=True)
|
|
11
11
|
class ResponseValidationError(Gr4vyError):
|
|
12
12
|
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
|
13
13
|
|
gr4vy/events.py
CHANGED
|
@@ -6,7 +6,8 @@ from gr4vy._hooks import HookContext
|
|
|
6
6
|
from gr4vy.types import OptionalNullable, UNSET
|
|
7
7
|
from gr4vy.utils import get_security_from_env
|
|
8
8
|
from gr4vy.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from
|
|
9
|
+
from jsonpath import JSONPath
|
|
10
|
+
from typing import Any, Dict, List, Mapping, Optional, Union
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class Events(BaseSDK):
|
|
@@ -21,7 +22,7 @@ class Events(BaseSDK):
|
|
|
21
22
|
server_url: Optional[str] = None,
|
|
22
23
|
timeout_ms: Optional[int] = None,
|
|
23
24
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
24
|
-
) -> models.
|
|
25
|
+
) -> Optional[models.ListTransactionEventsResponse]:
|
|
25
26
|
r"""List transaction events
|
|
26
27
|
|
|
27
28
|
Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first.
|
|
@@ -68,6 +69,7 @@ class Events(BaseSDK):
|
|
|
68
69
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
69
70
|
),
|
|
70
71
|
security=self.sdk_configuration.security,
|
|
72
|
+
allow_empty_value=None,
|
|
71
73
|
timeout_ms=timeout_ms,
|
|
72
74
|
)
|
|
73
75
|
|
|
@@ -88,7 +90,7 @@ class Events(BaseSDK):
|
|
|
88
90
|
config=self.sdk_configuration,
|
|
89
91
|
base_url=base_url or "",
|
|
90
92
|
operation_id="list_transaction_events",
|
|
91
|
-
oauth2_scopes=
|
|
93
|
+
oauth2_scopes=None,
|
|
92
94
|
security_source=get_security_from_env(
|
|
93
95
|
self.sdk_configuration.security, models.Security
|
|
94
96
|
),
|
|
@@ -113,9 +115,31 @@ class Events(BaseSDK):
|
|
|
113
115
|
retry_config=retry_config,
|
|
114
116
|
)
|
|
115
117
|
|
|
118
|
+
def next_func() -> Optional[models.ListTransactionEventsResponse]:
|
|
119
|
+
body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
|
|
120
|
+
next_cursor = JSONPath("$.next_cursor").parse(body)
|
|
121
|
+
|
|
122
|
+
if len(next_cursor) == 0:
|
|
123
|
+
return None
|
|
124
|
+
|
|
125
|
+
next_cursor = next_cursor[0]
|
|
126
|
+
if next_cursor is None or str(next_cursor).strip() == "":
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
return self.list(
|
|
130
|
+
transaction_id=transaction_id,
|
|
131
|
+
cursor=next_cursor,
|
|
132
|
+
limit=limit,
|
|
133
|
+
merchant_account_id=merchant_account_id,
|
|
134
|
+
retries=retries,
|
|
135
|
+
)
|
|
136
|
+
|
|
116
137
|
response_data: Any = None
|
|
117
138
|
if utils.match_response(http_res, "200", "application/json"):
|
|
118
|
-
return
|
|
139
|
+
return models.ListTransactionEventsResponse(
|
|
140
|
+
result=unmarshal_json_response(models.TransactionEvents, http_res),
|
|
141
|
+
next=next_func,
|
|
142
|
+
)
|
|
119
143
|
if utils.match_response(http_res, "400", "application/json"):
|
|
120
144
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
121
145
|
raise errors.Error400(response_data, http_res)
|
|
@@ -174,7 +198,7 @@ class Events(BaseSDK):
|
|
|
174
198
|
server_url: Optional[str] = None,
|
|
175
199
|
timeout_ms: Optional[int] = None,
|
|
176
200
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
177
|
-
) -> models.
|
|
201
|
+
) -> Optional[models.ListTransactionEventsResponse]:
|
|
178
202
|
r"""List transaction events
|
|
179
203
|
|
|
180
204
|
Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first.
|
|
@@ -221,6 +245,7 @@ class Events(BaseSDK):
|
|
|
221
245
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
222
246
|
),
|
|
223
247
|
security=self.sdk_configuration.security,
|
|
248
|
+
allow_empty_value=None,
|
|
224
249
|
timeout_ms=timeout_ms,
|
|
225
250
|
)
|
|
226
251
|
|
|
@@ -241,7 +266,7 @@ class Events(BaseSDK):
|
|
|
241
266
|
config=self.sdk_configuration,
|
|
242
267
|
base_url=base_url or "",
|
|
243
268
|
operation_id="list_transaction_events",
|
|
244
|
-
oauth2_scopes=
|
|
269
|
+
oauth2_scopes=None,
|
|
245
270
|
security_source=get_security_from_env(
|
|
246
271
|
self.sdk_configuration.security, models.Security
|
|
247
272
|
),
|
|
@@ -266,9 +291,31 @@ class Events(BaseSDK):
|
|
|
266
291
|
retry_config=retry_config,
|
|
267
292
|
)
|
|
268
293
|
|
|
294
|
+
def next_func() -> Optional[models.ListTransactionEventsResponse]:
|
|
295
|
+
body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
|
|
296
|
+
next_cursor = JSONPath("$.next_cursor").parse(body)
|
|
297
|
+
|
|
298
|
+
if len(next_cursor) == 0:
|
|
299
|
+
return None
|
|
300
|
+
|
|
301
|
+
next_cursor = next_cursor[0]
|
|
302
|
+
if next_cursor is None or str(next_cursor).strip() == "":
|
|
303
|
+
return None
|
|
304
|
+
|
|
305
|
+
return self.list(
|
|
306
|
+
transaction_id=transaction_id,
|
|
307
|
+
cursor=next_cursor,
|
|
308
|
+
limit=limit,
|
|
309
|
+
merchant_account_id=merchant_account_id,
|
|
310
|
+
retries=retries,
|
|
311
|
+
)
|
|
312
|
+
|
|
269
313
|
response_data: Any = None
|
|
270
314
|
if utils.match_response(http_res, "200", "application/json"):
|
|
271
|
-
return
|
|
315
|
+
return models.ListTransactionEventsResponse(
|
|
316
|
+
result=unmarshal_json_response(models.TransactionEvents, http_res),
|
|
317
|
+
next=next_func,
|
|
318
|
+
)
|
|
272
319
|
if utils.match_response(http_res, "400", "application/json"):
|
|
273
320
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
274
321
|
raise errors.Error400(response_data, http_res)
|