def get(self, id): from services.mailinvoice import InvoiceService try: invoice = InvoiceService.get_by_id(id) return _stub(invoice) except Exception as exc: error(unicode(exc)) raise
def get(self, mail_id): from services.mailinvoice import MailInvoiceService try: mail = MailInvoiceService.get_mail(mail_id) invoice = mail.invoice return _stub(invoice) except Exception as exc: error(unicode(exc)) raise