Пример #1
0
 def get(payment_id, invoice_id):
     """Get the Invoice records."""
     try:
         response, status = InvoiceService.find_by_id(invoice_id, payment_id).asdict(), HTTPStatus.OK
     except BusinessException as exception:
         response, status = {'code': exception.code, 'message': exception.message}, exception.status
     return jsonify(response), status
Пример #2
0
    def get(invoice_id):
        """Subject to remove once the change has been notified to teams."""
        try:
            response = {'items': []}

            response['items'].append(
                InvoiceService.find_by_id(invoice_id).asdict())
        except BusinessException as exception:
            return exception.response()
        return jsonify(response), HTTPStatus.OK
Пример #3
0
 def get(payment_id):
     """Get the Invoice records."""
     response, status = InvoiceService.get_invoices(payment_id,
                                                    _jwt), HTTPStatus.OK
     return jsonify(response), status