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/errors/error401.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 Error401Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "unauthorized"
|
|
23
23
|
r"""Always `unauthorized`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 401
|
|
26
25
|
r"""Always `401`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "No valid API authentication found"
|
|
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 Error401(Gr4vyError):
|
|
36
|
-
data: Error401Data
|
|
34
|
+
data: Error401Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error401(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)
|
gr4vy/errors/error403.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 Error403Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "forbidden"
|
|
23
23
|
r"""Always `forbidden`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 403
|
|
26
25
|
r"""Always `403`."""
|
|
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 Error403(Gr4vyError):
|
|
36
|
-
data: Error403Data
|
|
34
|
+
data: Error403Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error403(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)
|
gr4vy/errors/error404.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 Error404Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "not_found"
|
|
23
23
|
r"""Always `not_found`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 404
|
|
26
25
|
r"""Always `404`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "The resource could not be found"
|
|
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 Error404(Gr4vyError):
|
|
36
|
-
data: Error404Data
|
|
34
|
+
data: Error404Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error404(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)
|
gr4vy/errors/error405.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 Error405Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "method_not_allowed"
|
|
23
23
|
r"""Always `method_not_allowed`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 405
|
|
26
25
|
r"""Always `405`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "Method Not Allowed"
|
|
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 Error405(Gr4vyError):
|
|
36
|
-
data: Error405Data
|
|
34
|
+
data: Error405Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error405(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)
|
gr4vy/errors/error409.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 Error409Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "duplicate_record"
|
|
23
23
|
r"""Always `duplicate_record`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 409
|
|
26
25
|
r"""Always `409`."""
|
|
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 Error409(Gr4vyError):
|
|
36
|
-
data: Error409Data
|
|
34
|
+
data: Error409Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error409(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)
|
gr4vy/errors/error425.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 Error425Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "too_early"
|
|
23
23
|
r"""Always `too_early`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 425
|
|
26
25
|
r"""Always `425`."""
|
|
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 Error425(Gr4vyError):
|
|
36
|
-
data: Error425Data
|
|
34
|
+
data: Error425Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error425(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)
|
gr4vy/errors/error429.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 Error429Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "too_many_requests"
|
|
23
23
|
r"""Always `too_many_requests`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 429
|
|
26
25
|
r"""Always `429`."""
|
|
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 Error429(Gr4vyError):
|
|
36
|
-
data: Error429Data
|
|
34
|
+
data: Error429Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error429(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)
|
gr4vy/errors/error500.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 Error500Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "server_error"
|
|
23
23
|
r"""Always `server_error`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 500
|
|
26
25
|
r"""Always `500`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "Request could not be processed"
|
|
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 Error500(Gr4vyError):
|
|
36
|
-
data: Error500Data
|
|
34
|
+
data: Error500Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error500(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)
|
gr4vy/errors/error502.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 Error502Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "bad_gateway"
|
|
23
23
|
r"""Always `bad_gateway`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 502
|
|
26
25
|
r"""Always `502`."""
|
|
27
|
-
|
|
28
26
|
message: Optional[str] = "Request could not be processed"
|
|
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 Error502(Gr4vyError):
|
|
36
|
-
data: Error502Data
|
|
34
|
+
data: Error502Data = field(hash=False)
|
|
37
35
|
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
@@ -44,4 +42,4 @@ class Error502(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)
|
gr4vy/errors/error504.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,21 +19,18 @@ class Error504Data(BaseModel):
|
|
|
18
19
|
pydantic.Field(alias="type"),
|
|
19
20
|
] = "error"
|
|
20
21
|
r"""Always `error`."""
|
|
21
|
-
|
|
22
22
|
code: Optional[str] = "gateway_timeout"
|
|
23
23
|
r"""Always `gateway_timeout`"""
|
|
24
|
-
|
|
25
24
|
status: Optional[int] = 504
|
|
26
|
-
|
|
27
25
|
message: Optional[str] = "Request could not be processed"
|
|
28
26
|
r"""A human readable message that provides more context to the error."""
|
|
29
|
-
|
|
30
27
|
details: Optional[List[models_errordetail.ErrorDetail]] = None
|
|
31
28
|
r"""A list of details that further ellaborate on the error."""
|
|
32
29
|
|
|
33
30
|
|
|
31
|
+
@dataclass(unsafe_hash=True)
|
|
34
32
|
class Error504(Gr4vyError):
|
|
35
|
-
data: Error504Data
|
|
33
|
+
data: Error504Data = field(hash=False)
|
|
36
34
|
|
|
37
35
|
def __init__(
|
|
38
36
|
self,
|
|
@@ -43,4 +41,4 @@ class Error504(Gr4vyError):
|
|
|
43
41
|
fallback = body or raw_response.text
|
|
44
42
|
message = str(data.message) or fallback
|
|
45
43
|
super().__init__(message, raw_response, body)
|
|
46
|
-
self
|
|
44
|
+
object.__setattr__(self, "data", data)
|
gr4vy/errors/gr4vyerror.py
CHANGED
|
@@ -2,25 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
from typing import Optional
|
|
5
|
+
from dataclasses import dataclass, field
|
|
5
6
|
|
|
6
7
|
|
|
8
|
+
@dataclass(unsafe_hash=True)
|
|
7
9
|
class Gr4vyError(Exception):
|
|
8
10
|
"""The base class for all HTTP error responses."""
|
|
9
11
|
|
|
10
12
|
message: str
|
|
11
13
|
status_code: int
|
|
12
14
|
body: str
|
|
13
|
-
headers: httpx.Headers
|
|
14
|
-
raw_response: httpx.Response
|
|
15
|
+
headers: httpx.Headers = field(hash=False)
|
|
16
|
+
raw_response: httpx.Response = field(hash=False)
|
|
15
17
|
|
|
16
18
|
def __init__(
|
|
17
19
|
self, message: str, raw_response: httpx.Response, body: Optional[str] = None
|
|
18
20
|
):
|
|
19
|
-
self
|
|
20
|
-
self
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
object.__setattr__(self, "message", message)
|
|
22
|
+
object.__setattr__(self, "status_code", raw_response.status_code)
|
|
23
|
+
object.__setattr__(
|
|
24
|
+
self, "body", body if body is not None else raw_response.text
|
|
25
|
+
)
|
|
26
|
+
object.__setattr__(self, "headers", raw_response.headers)
|
|
27
|
+
object.__setattr__(self, "raw_response", raw_response)
|
|
24
28
|
|
|
25
29
|
def __str__(self):
|
|
26
30
|
return self.message
|
|
@@ -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 validationerror as models_validationerror
|
|
6
7
|
from gr4vy.types import BaseModel
|
|
@@ -12,8 +13,9 @@ class HTTPValidationErrorData(BaseModel):
|
|
|
12
13
|
detail: Optional[List[models_validationerror.ValidationError]] = None
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
@dataclass(unsafe_hash=True)
|
|
15
17
|
class HTTPValidationError(Gr4vyError):
|
|
16
|
-
data: HTTPValidationErrorData
|
|
18
|
+
data: HTTPValidationErrorData = field(hash=False)
|
|
17
19
|
|
|
18
20
|
def __init__(
|
|
19
21
|
self,
|
|
@@ -23,4 +25,4 @@ class HTTPValidationError(Gr4vyError):
|
|
|
23
25
|
):
|
|
24
26
|
message = body or raw_response.text
|
|
25
27
|
super().__init__(message, raw_response, body)
|
|
26
|
-
self
|
|
28
|
+
object.__setattr__(self, "data", data)
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass(unsafe_hash=True)
|
|
3
7
|
class NoResponseError(Exception):
|
|
4
8
|
"""Error raised when no HTTP response is received from the server."""
|
|
5
9
|
|
|
6
10
|
message: str
|
|
7
11
|
|
|
8
12
|
def __init__(self, message: str = "No response received"):
|
|
9
|
-
self
|
|
13
|
+
object.__setattr__(self, "message", message)
|
|
10
14
|
super().__init__(message)
|
|
11
15
|
|
|
12
16
|
def __str__(self):
|
|
@@ -2,10 +2,12 @@
|
|
|
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
|
|
|
10
|
+
@dataclass(unsafe_hash=True)
|
|
9
11
|
class ResponseValidationError(Gr4vyError):
|
|
10
12
|
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
|
11
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)
|