Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types for error object #1115

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions stripe/api_resources/error_object.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
from typing import Optional
from stripe.api_resources.payment_intent import PaymentIntent
from stripe.api_resources.setup_intent import SetupIntent
from stripe.api_resources.source import Source
from stripe.util import merge_dicts
from stripe.stripe_object import StripeObject

from api_resources.payment_method import PaymentMethod
anniel-stripe marked this conversation as resolved.
Show resolved Hide resolved


class ErrorObject(StripeObject):
charge: Optional[str]
code: int
decline_code: Optional[str]
doc_url: Optional[str]
message: Optional[str]
param: Optional[str]
payment_intent: Optional[PaymentIntent]
payment_method: Optional[PaymentMethod]
setup_intent: Optional[SetupIntent]
source: Optional[Source]
type: str

def refresh_from(
self,
values,
Expand Down
Loading