-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update code and tests to support stripe-python 6.1.0
- Loading branch information
Showing
4 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
async_stripe/api_resources/abstract/listable_api_resource.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
async_stripe/api_resources/abstract/searchable_api_resource.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from stripe.api_resources.abstract.searchable_api_resource import ( | ||
SearchableAPIResource, | ||
) | ||
from stripe.api_resources.search_result_object import SearchResultObject | ||
from typing import Awaitable | ||
|
||
|
||
def _search_patch( | ||
cls, | ||
search_url, | ||
api_key=None, | ||
stripe_version=None, | ||
stripe_account=None, | ||
**params | ||
) -> Awaitable[SearchResultObject]: | ||
ret = cls._static_request( | ||
"get", | ||
search_url, | ||
api_key=api_key, | ||
stripe_version=stripe_version, | ||
stripe_account=stripe_account, | ||
params=params, | ||
) | ||
if not isinstance(ret, Awaitable): | ||
raise TypeError( | ||
"Expected awaitable object from API, got %s" | ||
% (type(ret).__name__,) | ||
) | ||
|
||
return ret | ||
|
||
|
||
SearchableAPIResource._search = classmethod(_search_patch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters