-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Codegen for openapi 21065d4 * Update black
- Loading branch information
1 parent
f7e16fe
commit f7bde48
Showing
3 changed files
with
17 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
# File generated from our OpenAPI spec | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from stripe import util | ||
from stripe.api_resources.abstract import CreateableAPIResource | ||
from stripe.api_resources.abstract import ListableAPIResource | ||
from stripe.api_resources.abstract import custom_method | ||
from stripe.api_resources.abstract import nested_resource_class_methods | ||
|
||
|
||
@custom_method("expire", http_verb="post") | ||
@nested_resource_class_methods("line_item", operations=["list"]) | ||
class Session(CreateableAPIResource, ListableAPIResource): | ||
OBJECT_NAME = "checkout.session" | ||
|
||
def expire(self, idempotency_key=None, **params): | ||
url = self.instance_url() + "/expire" | ||
headers = util.populate_headers(idempotency_key) | ||
self.refresh_from(self.request("post", url, params, headers)) | ||
return self |
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
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