Esempio n. 1
0
 def __init__(self, attrs={}, client=API.client()):
     self.client = client
     self._do_attributes(attrs)
Esempio n. 2
0
 def retrieve(cls, id, client=API.client()):
     return cls(attrs={"id":id},client=client).refresh()
Esempio n. 3
0
 def create(cls, checkout_token, client=API.client()):
     response = client.make_request("/charges", "post", checkout_token=checkout_token)
     if response.is_success():
         return cls(attrs=response.body(), client=client)
     else:
         raise ChargeError.from_response(response)