Skip to content

Commit

Permalink
Merge pull request #788 from stripe/latest-codegen
Browse files Browse the repository at this point in the history
API Updates
  • Loading branch information
kamil-stripe authored Apr 8, 2022
2 parents ac1b4ca + 3942f73 commit 6969edd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stripe/api_resources/payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from stripe.api_resources.abstract import custom_method


@custom_method("apply_customer_balance", http_verb="post")
@custom_method("cancel", http_verb="post")
@custom_method("capture", http_verb="post")
@custom_method("confirm", http_verb="post")
Expand All @@ -21,6 +22,12 @@ class PaymentIntent(
):
OBJECT_NAME = "payment_intent"

def apply_customer_balance(self, idempotency_key=None, **params):
url = self.instance_url() + "/apply_customer_balance"
headers = util.populate_headers(idempotency_key)
self.refresh_from(self.request("post", url, params, headers))
return self

def cancel(self, idempotency_key=None, **params):
url = self.instance_url() + "/cancel"
headers = util.populate_headers(idempotency_key)
Expand Down

0 comments on commit 6969edd

Please sign in to comment.