Skip to content

Commit

Permalink
Merge branch 'master' into latest-codegen-master
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Nov 2, 2023
2 parents 5cf5755 + 22f9c32 commit 4a30ccf
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .lgtm.yml

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"ms-python.python",
"bungcip.better-toml",
"EditorConfig.editorconfig"
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 7.2.0 - 2023-10-31
* [#1115](https://github.com/stripe/stripe-python/pull/1115) Types: Add types for `ErrorObject`.
* [#1116](https://github.com/stripe/stripe-python/pull/1116) Types: Use @staticmethod overloads instead of @classmethod to fix MyPy compatibility.

## 7.1.0 - 2023-10-26
* [#1104](https://github.com/stripe/stripe-python/pull/1104) Include `py.typed` and enable type annotations for the package
* This PR includes `py.typed` and enables inline type annotations for stripe-python package. Inline type annotations will now take precedence over Typeshed for users who use a type checker or IDE.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.0
7.2.0
20 changes: 20 additions & 0 deletions stripe/api_resources/error_object.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
from typing import Optional
from typing_extensions import TYPE_CHECKING
from stripe.util import merge_dicts
from stripe.stripe_object import StripeObject

if TYPE_CHECKING:
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.api_resources.payment_method import PaymentMethod


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
2 changes: 1 addition & 1 deletion stripe/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "7.1.0"
VERSION = "7.2.0"

0 comments on commit 4a30ccf

Please sign in to comment.