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.
- gr4vy/_version.py +3 -3
- gr4vy/account_updater.py +6 -3
- gr4vy/actions.py +307 -0
- gr4vy/all.py +4 -2
- gr4vy/audit_logs.py +6 -4
- gr4vy/balances.py +4 -2
- gr4vy/basesdk.py +17 -1
- gr4vy/buyers_gift_cards.py +4 -2
- gr4vy/buyers_payment_methods.py +4 -2
- gr4vy/buyers_sdk.py +43 -25
- gr4vy/buyers_shipping_details.py +26 -16
- gr4vy/card_scheme_definitions_sdk.py +4 -2
- gr4vy/checkout_sessions.py +40 -14
- gr4vy/digital_wallets_sdk.py +32 -20
- gr4vy/domains.py +14 -10
- gr4vy/errors/__init__.py +15 -3
- gr4vy/errors/apierror.py +2 -0
- gr4vy/errors/error400.py +4 -6
- gr4vy/errors/error401.py +4 -6
- gr4vy/errors/error403.py +4 -6
- gr4vy/errors/error404.py +4 -6
- gr4vy/errors/error405.py +4 -6
- gr4vy/errors/error409.py +4 -6
- gr4vy/errors/error425.py +4 -6
- gr4vy/errors/error429.py +4 -6
- gr4vy/errors/error500.py +4 -6
- gr4vy/errors/error502.py +4 -6
- gr4vy/errors/error504.py +4 -6
- gr4vy/errors/gr4vyerror.py +11 -7
- gr4vy/errors/httpvalidationerror.py +4 -2
- gr4vy/errors/no_response_error.py +5 -1
- gr4vy/errors/responsevalidationerror.py +2 -0
- gr4vy/events.py +54 -7
- gr4vy/executions.py +38 -8
- gr4vy/gift_cards_sdk.py +29 -19
- gr4vy/httpclient.py +0 -1
- gr4vy/jobs.py +4 -2
- gr4vy/merchant_accounts_sdk.py +30 -10
- gr4vy/models/__init__.py +184 -30
- gr4vy/models/adyenautorescuesepascenariosenum.py +3 -1
- gr4vy/models/adyencardoptions.py +9 -6
- gr4vy/models/adyensepaoptions.py +1 -6
- gr4vy/models/adyensplitsoptions.py +57 -0
- gr4vy/models/airline.py +9 -8
- gr4vy/models/airlineleg.py +9 -7
- gr4vy/models/airlinepassenger.py +9 -7
- gr4vy/models/antifrauddecision.py +9 -1
- gr4vy/models/approvaltarget.py +7 -1
- gr4vy/models/auditlogaction.py +9 -1
- 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 +33 -3
- gr4vy/models/browserinfo.py +9 -5
- gr4vy/models/buyer.py +3 -3
- gr4vy/models/buyercreate.py +3 -3
- gr4vy/models/buyerupdate.py +3 -3
- gr4vy/models/cancel_transactionop.py +43 -0
- gr4vy/models/cancelstatus.py +15 -0
- gr4vy/models/capturestatus.py +7 -1
- gr4vy/models/cardtype.py +8 -1
- gr4vy/models/cartitem.py +53 -8
- 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/create_report_execution_urlop.py +16 -1
- gr4vy/models/createsession.py +3 -3
- gr4vy/models/createsessionstatus.py +7 -1
- gr4vy/models/cvvresponsecode.py +7 -1
- gr4vy/models/cybersourceoptions.py +7 -0
- gr4vy/models/definitionfield.py +1 -6
- gr4vy/models/definitionfieldformat.py +8 -1
- gr4vy/models/digitalwallet.py +3 -5
- gr4vy/models/digitalwalletcreate.py +2 -6
- gr4vy/models/digitalwalletprovider.py +6 -1
- gr4vy/models/dlocalupioptions.py +50 -0
- gr4vy/models/dlocalupirecurringinfooptions.py +47 -0
- gr4vy/models/dlocalupiwalletoptions.py +89 -0
- gr4vy/models/errordetail.py +2 -4
- gr4vy/models/errorlocation.py +8 -1
- gr4vy/models/flow.py +16 -0
- gr4vy/models/flowaction.py +16 -0
- gr4vy/models/forterantifraudoptions.py +8 -8
- gr4vy/models/forterantifraudoptionscartitembasicitemdata.py +10 -8
- gr4vy/models/forterantifraudoptionscartitemdeliverydetails.py +9 -7
- gr4vy/models/giftcardredemption.py +4 -8
- gr4vy/models/giftcardredemptionstatus.py +7 -1
- gr4vy/models/giftcardservice.py +3 -5
- gr4vy/models/giftcardserviceprovider.py +5 -1
- 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/internal/__init__.py +14 -1
- gr4vy/models/list_all_report_executionsop.py +2 -14
- gr4vy/models/list_audit_logsop.py +2 -10
- gr4vy/models/list_buyer_payment_methodsop.py +9 -4
- 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 +14 -22
- gr4vy/models/merchantaccount.py +9 -5
- gr4vy/models/merchantaccountcreate.py +8 -6
- gr4vy/models/merchantaccountupdate.py +8 -6
- gr4vy/models/merchantprofilescheme.py +7 -7
- gr4vy/models/merchantprofileschemesummary.py +7 -7
- gr4vy/models/method.py +4 -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 +11 -9
- gr4vy/models/networktokenstatus.py +7 -1
- gr4vy/models/nuveiidealoptions.py +49 -0
- gr4vy/models/nuveipseoptions.py +70 -0
- gr4vy/models/paymentlink.py +25 -7
- gr4vy/models/paymentlinkcreate.py +23 -28
- gr4vy/models/paymentlinkstatus.py +7 -1
- gr4vy/models/paymentmethod.py +7 -13
- gr4vy/models/paymentmethodcard.py +3 -5
- gr4vy/models/paymentmethoddetailscard.py +2 -6
- gr4vy/models/paymentmethodstatus.py +7 -1
- 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/paymentservicestatus.py +8 -1
- gr4vy/models/paymentservicetoken.py +3 -3
- gr4vy/models/payoutcategory.py +1 -1
- gr4vy/models/payoutcreate.py +5 -9
- gr4vy/models/payoutstatus.py +7 -1
- 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 +4 -6
- gr4vy/models/refund.py +4 -4
- gr4vy/models/refundstatus.py +8 -1
- gr4vy/models/refundtargettype.py +5 -1
- gr4vy/models/report.py +4 -6
- gr4vy/models/reportcreate.py +2 -3
- gr4vy/models/reportcreatortype.py +7 -1
- gr4vy/models/reportexecution.py +3 -3
- gr4vy/models/reportexecutionstatus.py +7 -1
- gr4vy/models/reportexecutionsummary.py +3 -3
- gr4vy/models/reportexecutionurlgenerate.py +16 -0
- gr4vy/models/reportschedule.py +9 -1
- gr4vy/models/reportspec.py +2 -4
- gr4vy/models/reportsummary.py +3 -5
- gr4vy/models/settlement.py +32 -32
- gr4vy/models/statementdescriptor.py +7 -0
- gr4vy/models/stripeconnectoptions.py +7 -0
- gr4vy/models/taxid.py +2 -4
- gr4vy/models/taxidkind.py +7 -0
- gr4vy/models/threedsecuredatav1.py +2 -6
- gr4vy/models/threedsecuredatav2.py +2 -6
- gr4vy/models/threedsecuremethod.py +7 -1
- gr4vy/models/threedsecurestatus.py +7 -1
- gr4vy/models/transaction.py +86 -25
- gr4vy/models/transactionaction.py +48 -0
- gr4vy/models/transactionactions.py +17 -0
- gr4vy/models/transactionbuyer.py +3 -3
- gr4vy/models/transactioncancel.py +81 -0
- gr4vy/models/transactioncapture.py +3 -3
- gr4vy/models/transactionconnectionoptions.py +50 -0
- gr4vy/models/transactioncreate.py +76 -12
- gr4vy/models/transactionevent.py +10 -3
- gr4vy/models/transactionintent.py +7 -1
- gr4vy/models/transactionintentoutcome.py +6 -1
- gr4vy/models/transactionpaymentmethod.py +6 -12
- gr4vy/models/transactionpaymentservice.py +3 -3
- gr4vy/models/transactionpaymentsource.py +7 -1
- gr4vy/models/transactionrefundcreate.py +2 -6
- gr4vy/models/transactionsummary.py +11 -10
- gr4vy/models/transactionthreedsecuresummary.py +3 -9
- gr4vy/models/transactionvoid.py +3 -3
- gr4vy/models/userstatus.py +8 -1
- gr4vy/models/voidstatus.py +7 -1
- gr4vy/network_tokens_cryptogram.py +4 -2
- gr4vy/payment_links_sdk.py +36 -16
- gr4vy/payment_methods_network_tokens.py +27 -13
- gr4vy/payment_methods_payment_service_tokens.py +12 -6
- gr4vy/payment_methods_sdk.py +26 -14
- gr4vy/payment_options_sdk.py +4 -2
- gr4vy/payment_service_definitions_sdk.py +14 -8
- gr4vy/payment_services_sdk.py +36 -22
- gr4vy/payouts.py +18 -12
- gr4vy/refunds_sdk.py +4 -2
- gr4vy/report_executions_sdk.py +6 -4
- gr4vy/reports_sdk.py +23 -13
- gr4vy/sdk.py +17 -4
- gr4vy/sessions.py +12 -6
- gr4vy/transactions.py +446 -33
- gr4vy/transactions_refunds.py +17 -9
- gr4vy/transactions_settlements.py +8 -4
- gr4vy/types/basemodel.py +41 -3
- gr4vy/utils/__init__.py +15 -6
- gr4vy/utils/annotations.py +32 -8
- gr4vy/utils/enums.py +60 -0
- gr4vy/utils/eventstreaming.py +10 -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.1.29.dist-info → gr4vy-1.10.9.dist-info}/METADATA +43 -41
- {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/RECORD +217 -196
- {gr4vy-1.1.29.dist-info → gr4vy-1.10.9.dist-info}/WHEEL +1 -1
- gr4vy/models/billingdetails_output.py +0 -87
- gr4vy/models/guestbuyer_output.py +0 -80
gr4vy/checkout_sessions.py
CHANGED
|
@@ -73,6 +73,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
73
73
|
"json",
|
|
74
74
|
Optional[models.CheckoutSessionCreate],
|
|
75
75
|
),
|
|
76
|
+
allow_empty_value=None,
|
|
76
77
|
timeout_ms=timeout_ms,
|
|
77
78
|
)
|
|
78
79
|
|
|
@@ -89,7 +90,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
89
90
|
config=self.sdk_configuration,
|
|
90
91
|
base_url=base_url or "",
|
|
91
92
|
operation_id="create_checkout_session",
|
|
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
|
),
|
|
@@ -227,6 +228,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
227
228
|
"json",
|
|
228
229
|
Optional[models.CheckoutSessionCreate],
|
|
229
230
|
),
|
|
231
|
+
allow_empty_value=None,
|
|
230
232
|
timeout_ms=timeout_ms,
|
|
231
233
|
)
|
|
232
234
|
|
|
@@ -243,7 +245,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
243
245
|
config=self.sdk_configuration,
|
|
244
246
|
base_url=base_url or "",
|
|
245
247
|
operation_id="create_checkout_session",
|
|
246
|
-
oauth2_scopes=
|
|
248
|
+
oauth2_scopes=None,
|
|
247
249
|
security_source=get_security_from_env(
|
|
248
250
|
self.sdk_configuration.security, models.Security
|
|
249
251
|
),
|
|
@@ -328,11 +330,14 @@ class CheckoutSessions(BaseSDK):
|
|
|
328
330
|
] = UNSET,
|
|
329
331
|
metadata: OptionalNullable[Dict[str, str]] = UNSET,
|
|
330
332
|
buyer: OptionalNullable[
|
|
331
|
-
Union[models.
|
|
333
|
+
Union[models.GuestBuyer, models.GuestBuyerTypedDict]
|
|
332
334
|
] = UNSET,
|
|
333
335
|
airline: OptionalNullable[
|
|
334
336
|
Union[models.Airline, models.AirlineTypedDict]
|
|
335
337
|
] = UNSET,
|
|
338
|
+
amount: OptionalNullable[int] = UNSET,
|
|
339
|
+
currency: OptionalNullable[str] = UNSET,
|
|
340
|
+
payment_service_id: OptionalNullable[str] = UNSET,
|
|
336
341
|
expires_in: Optional[float] = 3600,
|
|
337
342
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
338
343
|
server_url: Optional[str] = None,
|
|
@@ -349,7 +354,10 @@ class CheckoutSessions(BaseSDK):
|
|
|
349
354
|
:param metadata: Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
|
|
350
355
|
:param buyer: Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used.
|
|
351
356
|
:param airline: The airline addendum data which describes the airline booking associated with this transaction.
|
|
352
|
-
:param
|
|
357
|
+
:param amount: The total amount for this transaction.
|
|
358
|
+
:param currency: The currency code for this transaction.
|
|
359
|
+
:param payment_service_id: The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped.
|
|
360
|
+
:param expires_in: The time in seconds when this checkout session expires.
|
|
353
361
|
:param retries: Override the default retry configuration for this method
|
|
354
362
|
:param server_url: Override the default server URL for this method
|
|
355
363
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -374,11 +382,14 @@ class CheckoutSessions(BaseSDK):
|
|
|
374
382
|
),
|
|
375
383
|
metadata=metadata,
|
|
376
384
|
buyer=utils.get_pydantic_model(
|
|
377
|
-
buyer, OptionalNullable[models.
|
|
385
|
+
buyer, OptionalNullable[models.GuestBuyer]
|
|
378
386
|
),
|
|
379
387
|
airline=utils.get_pydantic_model(
|
|
380
388
|
airline, OptionalNullable[models.Airline]
|
|
381
389
|
),
|
|
390
|
+
amount=amount,
|
|
391
|
+
currency=currency,
|
|
392
|
+
payment_service_id=payment_service_id,
|
|
382
393
|
expires_in=expires_in,
|
|
383
394
|
),
|
|
384
395
|
)
|
|
@@ -406,6 +417,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
406
417
|
"json",
|
|
407
418
|
models.CheckoutSessionCreate,
|
|
408
419
|
),
|
|
420
|
+
allow_empty_value=None,
|
|
409
421
|
timeout_ms=timeout_ms,
|
|
410
422
|
)
|
|
411
423
|
|
|
@@ -422,7 +434,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
422
434
|
config=self.sdk_configuration,
|
|
423
435
|
base_url=base_url or "",
|
|
424
436
|
operation_id="update_checkout_session",
|
|
425
|
-
oauth2_scopes=
|
|
437
|
+
oauth2_scopes=None,
|
|
426
438
|
security_source=get_security_from_env(
|
|
427
439
|
self.sdk_configuration.security, models.Security
|
|
428
440
|
),
|
|
@@ -507,11 +519,14 @@ class CheckoutSessions(BaseSDK):
|
|
|
507
519
|
] = UNSET,
|
|
508
520
|
metadata: OptionalNullable[Dict[str, str]] = UNSET,
|
|
509
521
|
buyer: OptionalNullable[
|
|
510
|
-
Union[models.
|
|
522
|
+
Union[models.GuestBuyer, models.GuestBuyerTypedDict]
|
|
511
523
|
] = UNSET,
|
|
512
524
|
airline: OptionalNullable[
|
|
513
525
|
Union[models.Airline, models.AirlineTypedDict]
|
|
514
526
|
] = UNSET,
|
|
527
|
+
amount: OptionalNullable[int] = UNSET,
|
|
528
|
+
currency: OptionalNullable[str] = UNSET,
|
|
529
|
+
payment_service_id: OptionalNullable[str] = UNSET,
|
|
515
530
|
expires_in: Optional[float] = 3600,
|
|
516
531
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
517
532
|
server_url: Optional[str] = None,
|
|
@@ -528,7 +543,10 @@ class CheckoutSessions(BaseSDK):
|
|
|
528
543
|
:param metadata: Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
|
|
529
544
|
:param buyer: Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used.
|
|
530
545
|
:param airline: The airline addendum data which describes the airline booking associated with this transaction.
|
|
531
|
-
:param
|
|
546
|
+
:param amount: The total amount for this transaction.
|
|
547
|
+
:param currency: The currency code for this transaction.
|
|
548
|
+
:param payment_service_id: The unique identifier of an existing payment service. When provided, the created transaction will be processed by the given payment service and any routing rules will be skipped.
|
|
549
|
+
:param expires_in: The time in seconds when this checkout session expires.
|
|
532
550
|
:param retries: Override the default retry configuration for this method
|
|
533
551
|
:param server_url: Override the default server URL for this method
|
|
534
552
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -553,11 +571,14 @@ class CheckoutSessions(BaseSDK):
|
|
|
553
571
|
),
|
|
554
572
|
metadata=metadata,
|
|
555
573
|
buyer=utils.get_pydantic_model(
|
|
556
|
-
buyer, OptionalNullable[models.
|
|
574
|
+
buyer, OptionalNullable[models.GuestBuyer]
|
|
557
575
|
),
|
|
558
576
|
airline=utils.get_pydantic_model(
|
|
559
577
|
airline, OptionalNullable[models.Airline]
|
|
560
578
|
),
|
|
579
|
+
amount=amount,
|
|
580
|
+
currency=currency,
|
|
581
|
+
payment_service_id=payment_service_id,
|
|
561
582
|
expires_in=expires_in,
|
|
562
583
|
),
|
|
563
584
|
)
|
|
@@ -585,6 +606,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
585
606
|
"json",
|
|
586
607
|
models.CheckoutSessionCreate,
|
|
587
608
|
),
|
|
609
|
+
allow_empty_value=None,
|
|
588
610
|
timeout_ms=timeout_ms,
|
|
589
611
|
)
|
|
590
612
|
|
|
@@ -601,7 +623,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
601
623
|
config=self.sdk_configuration,
|
|
602
624
|
base_url=base_url or "",
|
|
603
625
|
operation_id="update_checkout_session",
|
|
604
|
-
oauth2_scopes=
|
|
626
|
+
oauth2_scopes=None,
|
|
605
627
|
security_source=get_security_from_env(
|
|
606
628
|
self.sdk_configuration.security, models.Security
|
|
607
629
|
),
|
|
@@ -728,6 +750,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
728
750
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
729
751
|
),
|
|
730
752
|
security=self.sdk_configuration.security,
|
|
753
|
+
allow_empty_value=None,
|
|
731
754
|
timeout_ms=timeout_ms,
|
|
732
755
|
)
|
|
733
756
|
|
|
@@ -748,7 +771,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
748
771
|
config=self.sdk_configuration,
|
|
749
772
|
base_url=base_url or "",
|
|
750
773
|
operation_id="get_checkout_session",
|
|
751
|
-
oauth2_scopes=
|
|
774
|
+
oauth2_scopes=None,
|
|
752
775
|
security_source=get_security_from_env(
|
|
753
776
|
self.sdk_configuration.security, models.Security
|
|
754
777
|
),
|
|
@@ -870,6 +893,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
870
893
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
871
894
|
),
|
|
872
895
|
security=self.sdk_configuration.security,
|
|
896
|
+
allow_empty_value=None,
|
|
873
897
|
timeout_ms=timeout_ms,
|
|
874
898
|
)
|
|
875
899
|
|
|
@@ -890,7 +914,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
890
914
|
config=self.sdk_configuration,
|
|
891
915
|
base_url=base_url or "",
|
|
892
916
|
operation_id="get_checkout_session",
|
|
893
|
-
oauth2_scopes=
|
|
917
|
+
oauth2_scopes=None,
|
|
894
918
|
security_source=get_security_from_env(
|
|
895
919
|
self.sdk_configuration.security, models.Security
|
|
896
920
|
),
|
|
@@ -1012,6 +1036,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
1012
1036
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1013
1037
|
),
|
|
1014
1038
|
security=self.sdk_configuration.security,
|
|
1039
|
+
allow_empty_value=None,
|
|
1015
1040
|
timeout_ms=timeout_ms,
|
|
1016
1041
|
)
|
|
1017
1042
|
|
|
@@ -1028,7 +1053,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
1028
1053
|
config=self.sdk_configuration,
|
|
1029
1054
|
base_url=base_url or "",
|
|
1030
1055
|
operation_id="delete_checkout_session",
|
|
1031
|
-
oauth2_scopes=
|
|
1056
|
+
oauth2_scopes=None,
|
|
1032
1057
|
security_source=get_security_from_env(
|
|
1033
1058
|
self.sdk_configuration.security, models.Security
|
|
1034
1059
|
),
|
|
@@ -1155,6 +1180,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
1155
1180
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1156
1181
|
),
|
|
1157
1182
|
security=self.sdk_configuration.security,
|
|
1183
|
+
allow_empty_value=None,
|
|
1158
1184
|
timeout_ms=timeout_ms,
|
|
1159
1185
|
)
|
|
1160
1186
|
|
|
@@ -1171,7 +1197,7 @@ class CheckoutSessions(BaseSDK):
|
|
|
1171
1197
|
config=self.sdk_configuration,
|
|
1172
1198
|
base_url=base_url or "",
|
|
1173
1199
|
operation_id="delete_checkout_session",
|
|
1174
|
-
oauth2_scopes=
|
|
1200
|
+
oauth2_scopes=None,
|
|
1175
1201
|
security_source=get_security_from_env(
|
|
1176
1202
|
self.sdk_configuration.security, models.Security
|
|
1177
1203
|
),
|
gr4vy/digital_wallets_sdk.py
CHANGED
|
@@ -16,14 +16,16 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
16
16
|
sessions: Sessions
|
|
17
17
|
domains: Domains
|
|
18
18
|
|
|
19
|
-
def __init__(
|
|
20
|
-
|
|
19
|
+
def __init__(
|
|
20
|
+
self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
|
|
21
|
+
) -> None:
|
|
22
|
+
BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
|
|
21
23
|
self.sdk_configuration = sdk_config
|
|
22
24
|
self._init_sdks()
|
|
23
25
|
|
|
24
26
|
def _init_sdks(self):
|
|
25
|
-
self.sessions = Sessions(self.sdk_configuration)
|
|
26
|
-
self.domains = Domains(self.sdk_configuration)
|
|
27
|
+
self.sessions = Sessions(self.sdk_configuration, parent_ref=self.parent_ref)
|
|
28
|
+
self.domains = Domains(self.sdk_configuration, parent_ref=self.parent_ref)
|
|
27
29
|
|
|
28
30
|
def create(
|
|
29
31
|
self,
|
|
@@ -104,6 +106,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
104
106
|
"json",
|
|
105
107
|
models.DigitalWalletCreate,
|
|
106
108
|
),
|
|
109
|
+
allow_empty_value=None,
|
|
107
110
|
timeout_ms=timeout_ms,
|
|
108
111
|
)
|
|
109
112
|
|
|
@@ -120,7 +123,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
120
123
|
config=self.sdk_configuration,
|
|
121
124
|
base_url=base_url or "",
|
|
122
125
|
operation_id="configure_digital_wallet",
|
|
123
|
-
oauth2_scopes=
|
|
126
|
+
oauth2_scopes=None,
|
|
124
127
|
security_source=get_security_from_env(
|
|
125
128
|
self.sdk_configuration.security, models.Security
|
|
126
129
|
),
|
|
@@ -274,6 +277,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
274
277
|
"json",
|
|
275
278
|
models.DigitalWalletCreate,
|
|
276
279
|
),
|
|
280
|
+
allow_empty_value=None,
|
|
277
281
|
timeout_ms=timeout_ms,
|
|
278
282
|
)
|
|
279
283
|
|
|
@@ -290,7 +294,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
290
294
|
config=self.sdk_configuration,
|
|
291
295
|
base_url=base_url or "",
|
|
292
296
|
operation_id="configure_digital_wallet",
|
|
293
|
-
oauth2_scopes=
|
|
297
|
+
oauth2_scopes=None,
|
|
294
298
|
security_source=get_security_from_env(
|
|
295
299
|
self.sdk_configuration.security, models.Security
|
|
296
300
|
),
|
|
@@ -414,6 +418,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
414
418
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
415
419
|
),
|
|
416
420
|
security=self.sdk_configuration.security,
|
|
421
|
+
allow_empty_value=None,
|
|
417
422
|
timeout_ms=timeout_ms,
|
|
418
423
|
)
|
|
419
424
|
|
|
@@ -434,7 +439,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
434
439
|
config=self.sdk_configuration,
|
|
435
440
|
base_url=base_url or "",
|
|
436
441
|
operation_id="list_digital_wallets",
|
|
437
|
-
oauth2_scopes=
|
|
442
|
+
oauth2_scopes=None,
|
|
438
443
|
security_source=get_security_from_env(
|
|
439
444
|
self.sdk_configuration.security, models.Security
|
|
440
445
|
),
|
|
@@ -558,6 +563,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
558
563
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
559
564
|
),
|
|
560
565
|
security=self.sdk_configuration.security,
|
|
566
|
+
allow_empty_value=None,
|
|
561
567
|
timeout_ms=timeout_ms,
|
|
562
568
|
)
|
|
563
569
|
|
|
@@ -578,7 +584,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
578
584
|
config=self.sdk_configuration,
|
|
579
585
|
base_url=base_url or "",
|
|
580
586
|
operation_id="list_digital_wallets",
|
|
581
|
-
oauth2_scopes=
|
|
587
|
+
oauth2_scopes=None,
|
|
582
588
|
security_source=get_security_from_env(
|
|
583
589
|
self.sdk_configuration.security, models.Security
|
|
584
590
|
),
|
|
@@ -705,6 +711,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
705
711
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
706
712
|
),
|
|
707
713
|
security=self.sdk_configuration.security,
|
|
714
|
+
allow_empty_value=None,
|
|
708
715
|
timeout_ms=timeout_ms,
|
|
709
716
|
)
|
|
710
717
|
|
|
@@ -725,7 +732,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
725
732
|
config=self.sdk_configuration,
|
|
726
733
|
base_url=base_url or "",
|
|
727
734
|
operation_id="get_digital_wallet",
|
|
728
|
-
oauth2_scopes=
|
|
735
|
+
oauth2_scopes=None,
|
|
729
736
|
security_source=get_security_from_env(
|
|
730
737
|
self.sdk_configuration.security, models.Security
|
|
731
738
|
),
|
|
@@ -852,6 +859,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
852
859
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
853
860
|
),
|
|
854
861
|
security=self.sdk_configuration.security,
|
|
862
|
+
allow_empty_value=None,
|
|
855
863
|
timeout_ms=timeout_ms,
|
|
856
864
|
)
|
|
857
865
|
|
|
@@ -872,7 +880,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
872
880
|
config=self.sdk_configuration,
|
|
873
881
|
base_url=base_url or "",
|
|
874
882
|
operation_id="get_digital_wallet",
|
|
875
|
-
oauth2_scopes=
|
|
883
|
+
oauth2_scopes=None,
|
|
876
884
|
security_source=get_security_from_env(
|
|
877
885
|
self.sdk_configuration.security, models.Security
|
|
878
886
|
),
|
|
@@ -956,7 +964,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
956
964
|
server_url: Optional[str] = None,
|
|
957
965
|
timeout_ms: Optional[int] = None,
|
|
958
966
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
959
|
-
)
|
|
967
|
+
):
|
|
960
968
|
r"""Delete digital wallet
|
|
961
969
|
|
|
962
970
|
Delete a configured digital wallet.
|
|
@@ -999,6 +1007,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
999
1007
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1000
1008
|
),
|
|
1001
1009
|
security=self.sdk_configuration.security,
|
|
1010
|
+
allow_empty_value=None,
|
|
1002
1011
|
timeout_ms=timeout_ms,
|
|
1003
1012
|
)
|
|
1004
1013
|
|
|
@@ -1015,7 +1024,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1015
1024
|
config=self.sdk_configuration,
|
|
1016
1025
|
base_url=base_url or "",
|
|
1017
1026
|
operation_id="delete_digital_wallet",
|
|
1018
|
-
oauth2_scopes=
|
|
1027
|
+
oauth2_scopes=None,
|
|
1019
1028
|
security_source=get_security_from_env(
|
|
1020
1029
|
self.sdk_configuration.security, models.Security
|
|
1021
1030
|
),
|
|
@@ -1041,8 +1050,8 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1041
1050
|
)
|
|
1042
1051
|
|
|
1043
1052
|
response_data: Any = None
|
|
1044
|
-
if utils.match_response(http_res, "
|
|
1045
|
-
return
|
|
1053
|
+
if utils.match_response(http_res, "204", "*"):
|
|
1054
|
+
return
|
|
1046
1055
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1047
1056
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1048
1057
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1099,7 +1108,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1099
1108
|
server_url: Optional[str] = None,
|
|
1100
1109
|
timeout_ms: Optional[int] = None,
|
|
1101
1110
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1102
|
-
)
|
|
1111
|
+
):
|
|
1103
1112
|
r"""Delete digital wallet
|
|
1104
1113
|
|
|
1105
1114
|
Delete a configured digital wallet.
|
|
@@ -1142,6 +1151,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1142
1151
|
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
1143
1152
|
),
|
|
1144
1153
|
security=self.sdk_configuration.security,
|
|
1154
|
+
allow_empty_value=None,
|
|
1145
1155
|
timeout_ms=timeout_ms,
|
|
1146
1156
|
)
|
|
1147
1157
|
|
|
@@ -1158,7 +1168,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1158
1168
|
config=self.sdk_configuration,
|
|
1159
1169
|
base_url=base_url or "",
|
|
1160
1170
|
operation_id="delete_digital_wallet",
|
|
1161
|
-
oauth2_scopes=
|
|
1171
|
+
oauth2_scopes=None,
|
|
1162
1172
|
security_source=get_security_from_env(
|
|
1163
1173
|
self.sdk_configuration.security, models.Security
|
|
1164
1174
|
),
|
|
@@ -1184,8 +1194,8 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1184
1194
|
)
|
|
1185
1195
|
|
|
1186
1196
|
response_data: Any = None
|
|
1187
|
-
if utils.match_response(http_res, "
|
|
1188
|
-
return
|
|
1197
|
+
if utils.match_response(http_res, "204", "*"):
|
|
1198
|
+
return
|
|
1189
1199
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1190
1200
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
1191
1201
|
raise errors.Error400(response_data, http_res)
|
|
@@ -1309,6 +1319,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1309
1319
|
"json",
|
|
1310
1320
|
models.DigitalWalletUpdate,
|
|
1311
1321
|
),
|
|
1322
|
+
allow_empty_value=None,
|
|
1312
1323
|
timeout_ms=timeout_ms,
|
|
1313
1324
|
)
|
|
1314
1325
|
|
|
@@ -1325,7 +1336,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1325
1336
|
config=self.sdk_configuration,
|
|
1326
1337
|
base_url=base_url or "",
|
|
1327
1338
|
operation_id="update_digital_wallet",
|
|
1328
|
-
oauth2_scopes=
|
|
1339
|
+
oauth2_scopes=None,
|
|
1329
1340
|
security_source=get_security_from_env(
|
|
1330
1341
|
self.sdk_configuration.security, models.Security
|
|
1331
1342
|
),
|
|
@@ -1476,6 +1487,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1476
1487
|
"json",
|
|
1477
1488
|
models.DigitalWalletUpdate,
|
|
1478
1489
|
),
|
|
1490
|
+
allow_empty_value=None,
|
|
1479
1491
|
timeout_ms=timeout_ms,
|
|
1480
1492
|
)
|
|
1481
1493
|
|
|
@@ -1492,7 +1504,7 @@ class DigitalWalletsSDK(BaseSDK):
|
|
|
1492
1504
|
config=self.sdk_configuration,
|
|
1493
1505
|
base_url=base_url or "",
|
|
1494
1506
|
operation_id="update_digital_wallet",
|
|
1495
|
-
oauth2_scopes=
|
|
1507
|
+
oauth2_scopes=None,
|
|
1496
1508
|
security_source=get_security_from_env(
|
|
1497
1509
|
self.sdk_configuration.security, models.Security
|
|
1498
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
|
),
|
|
@@ -330,7 +332,7 @@ class Domains(BaseSDK):
|
|
|
330
332
|
server_url: Optional[str] = None,
|
|
331
333
|
timeout_ms: Optional[int] = None,
|
|
332
334
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
333
|
-
)
|
|
335
|
+
):
|
|
334
336
|
r"""Remove a digital wallet domain
|
|
335
337
|
|
|
336
338
|
Remove a digital wallet domain (Apple Pay only).
|
|
@@ -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
|
),
|
|
@@ -426,8 +429,8 @@ class Domains(BaseSDK):
|
|
|
426
429
|
)
|
|
427
430
|
|
|
428
431
|
response_data: Any = None
|
|
429
|
-
if utils.match_response(http_res, "
|
|
430
|
-
return
|
|
432
|
+
if utils.match_response(http_res, "204", "*"):
|
|
433
|
+
return
|
|
431
434
|
if utils.match_response(http_res, "400", "application/json"):
|
|
432
435
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
433
436
|
raise errors.Error400(response_data, http_res)
|
|
@@ -485,7 +488,7 @@ class Domains(BaseSDK):
|
|
|
485
488
|
server_url: Optional[str] = None,
|
|
486
489
|
timeout_ms: Optional[int] = None,
|
|
487
490
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
488
|
-
)
|
|
491
|
+
):
|
|
489
492
|
r"""Remove a digital wallet domain
|
|
490
493
|
|
|
491
494
|
Remove a digital wallet domain (Apple Pay only).
|
|
@@ -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
|
),
|
|
@@ -581,8 +585,8 @@ class Domains(BaseSDK):
|
|
|
581
585
|
)
|
|
582
586
|
|
|
583
587
|
response_data: Any = None
|
|
584
|
-
if utils.match_response(http_res, "
|
|
585
|
-
return
|
|
588
|
+
if utils.match_response(http_res, "204", "*"):
|
|
589
|
+
return
|
|
586
590
|
if utils.match_response(http_res, "400", "application/json"):
|
|
587
591
|
response_data = unmarshal_json_response(errors.Error400Data, http_res)
|
|
588
592
|
raise errors.Error400(response_data, http_res)
|
gr4vy/errors/__init__.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
|
+
from .gr4vyerror import Gr4vyError
|
|
3
4
|
from typing import TYPE_CHECKING
|
|
4
5
|
from importlib import import_module
|
|
5
6
|
import builtins
|
|
7
|
+
import sys
|
|
6
8
|
|
|
7
9
|
if TYPE_CHECKING:
|
|
8
10
|
from .apierror import APIError
|
|
@@ -17,7 +19,6 @@ if TYPE_CHECKING:
|
|
|
17
19
|
from .error500 import Error500, Error500Data
|
|
18
20
|
from .error502 import Error502, Error502Data
|
|
19
21
|
from .error504 import Error504, Error504Data
|
|
20
|
-
from .gr4vyerror import Gr4vyError
|
|
21
22
|
from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
|
|
22
23
|
from .no_response_error import NoResponseError
|
|
23
24
|
from .responsevalidationerror import ResponseValidationError
|
|
@@ -77,7 +78,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
77
78
|
"Error502Data": ".error502",
|
|
78
79
|
"Error504": ".error504",
|
|
79
80
|
"Error504Data": ".error504",
|
|
80
|
-
"Gr4vyError": ".gr4vyerror",
|
|
81
81
|
"HTTPValidationError": ".httpvalidationerror",
|
|
82
82
|
"HTTPValidationErrorData": ".httpvalidationerror",
|
|
83
83
|
"NoResponseError": ".no_response_error",
|
|
@@ -85,6 +85,18 @@ _dynamic_imports: dict[str, str] = {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
|
|
88
|
+
def dynamic_import(modname, retries=3):
|
|
89
|
+
for attempt in range(retries):
|
|
90
|
+
try:
|
|
91
|
+
return import_module(modname, __package__)
|
|
92
|
+
except KeyError:
|
|
93
|
+
# Clear any half-initialized module and retry
|
|
94
|
+
sys.modules.pop(modname, None)
|
|
95
|
+
if attempt == retries - 1:
|
|
96
|
+
break
|
|
97
|
+
raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
|
|
98
|
+
|
|
99
|
+
|
|
88
100
|
def __getattr__(attr_name: str) -> object:
|
|
89
101
|
module_name = _dynamic_imports.get(attr_name)
|
|
90
102
|
if module_name is None:
|
|
@@ -93,7 +105,7 @@ def __getattr__(attr_name: str) -> object:
|
|
|
93
105
|
)
|
|
94
106
|
|
|
95
107
|
try:
|
|
96
|
-
module =
|
|
108
|
+
module = dynamic_import(module_name)
|
|
97
109
|
result = getattr(module, attr_name)
|
|
98
110
|
return result
|
|
99
111
|
except ImportError as e:
|
gr4vy/errors/apierror.py
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from dataclasses import dataclass
|
|
5
6
|
|
|
6
7
|
from gr4vy.errors import Gr4vyError
|
|
7
8
|
|
|
8
9
|
MAX_MESSAGE_LEN = 10_000
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
@dataclass(unsafe_hash=True)
|
|
11
13
|
class APIError(Gr4vyError):
|
|
12
14
|
"""The fallback error class if no more specific error class is matched."""
|
|
13
15
|
|
gr4vy/errors/error400.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from dataclasses import dataclass, field
|
|
4
5
|
from gr4vy.errors import Gr4vyError
|
|
5
6
|
from gr4vy.models import errordetail as models_errordetail
|
|
6
7
|
from gr4vy.types import BaseModel
|
|
@@ -18,22 +19,19 @@ class Error400Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "bad_request"
|
|
23
23
|
r"""Always `bad_request`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 400
|
|
26
25
|
r"""Always `400`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "Generic error"
|
|
29
27
|
r"""A human readable message that provides more context to the error."""
|
|
30
|
-
|
|
31
28
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
32
29
|
r"""A list of details that further ellaborate on the error."""
|
|
33
30
|
|
|
34
31
|
|
|
32
|
+
@dataclass(unsafe_hash=True)
|
|
35
33
|
class Error400(Gr4vyError):
|
|
36
|
-
data: Error400Data
|
|
34
|
+
data: Error400Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error400(Gr4vyError):
|
|
|
44
42
|
fallback = body or raw_response.text
|
|
45
43
|
message = str(data.message) or fallback
|
|
46
44
|
super().__init__(message, raw_response, body)
|
|
47
|
-
self
|
|
45
|
+
object.__setattr__(self, "data", data)
|