FeeFighters/samurai-client-python — Issue #6: is_success and is_declined is broken
Author: whit537
Created: 2012-02-25 15:54:06+00:00
State: open

(Pdb) trans.is_success()
*** AttributeError: 'Transaction' object has no attribute 'processor_response'
(Pdb) trans.is_declined()
*** AttributeError: 'function' object has no attribute 'get'
(Pdb)

The docstring for each says "You are better off checking `trans.errors`", which is good advice. Could these functions themselves be simplified to use `trans.errors`?

def is_success(self):
return not self.is_declined()

def is_declined(self):
return bool(self.errors)