Permalink
Browse files

Support for updating charge disputes

  • Loading branch information...
1 parent 2e87211 commit 0a28527bd5afafa991f2e48ebb3186fd29f5de7b @spakanati spakanati committed Nov 8, 2012
Showing with 11 additions and 0 deletions.
  1. +4 −0 bin/stripe
  2. +7 −0 stripe/__init__.py
View
@@ -111,6 +111,10 @@ class ChargeClient(CreateableAPIResourceClient, ListableAPIResourceClient):
url = self.instance_url() + '/capture'
self.logged_curl('post', url, params)
+ def update_dispute(self, params):
+ url = self.instance_url() + '/dispute'
+ self.logged_curl('post', url, params)
+
class CustomerClient(CreateableAPIResourceClient, UpdateableAPIResourceClient,
ListableAPIResourceClient, DeletableAPIResourceClient):
client_for = stripe.Customer
View
@@ -699,6 +699,13 @@ def capture(self, **params):
self.refresh_from(response, api_key)
return self
+ def update_dispute(self, **params):
+ requestor = APIRequestor(self.api_key)
+ url = self.instance_url() + '/dispute'
+ response, api_key = requestor.request('post', url, params)
+ self.refresh_from({ 'dispute' : response }, api_key, True)
+ return self.dispute
+
class Customer(CreateableAPIResource, UpdateableAPIResource,
ListableAPIResource, DeletableAPIResource):
def add_invoice_item(self, **params):

0 comments on commit 0a28527

Please sign in to comment.