@@ -79,7 +79,8 @@ def create(
7979 response_json = self .__bitpay_client .post ("refunds" , params , True )
8080 except BitPayException as exe :
8181 raise RefundCreationException (
82- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
82+ "failed to serialize refund object : %s" % str (exe ),
83+ api_code = exe .get_api_code (),
8384 )
8485 except Exception as exe :
8586 raise RefundCreationException (
@@ -100,7 +101,8 @@ def get(self, refund_id: str) -> Refund:
100101 response_json = self .__bitpay_client .get ("refunds/%s" % refund_id , params )
101102 except BitPayException as exe :
102103 raise RefundQueryException (
103- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
104+ "failed to serialize refund object : %s" % str (exe ),
105+ api_code = exe .get_api_code (),
104106 )
105107 except Exception as exe :
106108 raise RefundQueryException ("failed to serialize refund object : %s" % exe )
@@ -127,7 +129,8 @@ def get_by_guid(self, guid: str) -> Refund:
127129 response_json = self .__bitpay_client .get ("refunds/guid/%s" % guid , params )
128130 except BitPayException as exe :
129131 raise RefundQueryException (
130- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
132+ "failed to serialize refund object : %s" % str (exe ),
133+ api_code = exe .get_api_code (),
131134 )
132135 except Exception as exe :
133136 raise RefundQueryException ("failed to serialize refund object : %s" % exe )
@@ -157,7 +160,8 @@ def get_refunds(self, invoice_id: str) -> List[Refund]:
157160 response_json = self .__bitpay_client .get ("refunds" , params )
158161 except BitPayException as exe :
159162 raise RefundQueryException (
160- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
163+ "failed to serialize refund object : %s" % str (exe ),
164+ api_code = exe .get_api_code (),
161165 )
162166 except Exception as exe :
163167 raise RefundQueryException (
@@ -198,7 +202,8 @@ def update(self, refund_id: str, status: str) -> Refund:
198202 )
199203 except BitPayException as exe :
200204 raise RefundUpdateException (
201- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
205+ "failed to serialize refund object : %s" % str (exe ),
206+ api_code = exe .get_api_code (),
202207 )
203208 except Exception as exe :
204209 raise RefundUpdateException (
@@ -235,7 +240,8 @@ def update_by_guid(self, refund_guid: str, status: str) -> Refund:
235240 )
236241 except BitPayException as exe :
237242 raise RefundUpdateException (
238- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
243+ "failed to serialize refund object : %s" % str (exe ),
244+ api_code = exe .get_api_code (),
239245 )
240246 except Exception as exe :
241247 raise RefundUpdateException (
@@ -267,7 +273,8 @@ def cancel(self, refund_id: str) -> Refund:
267273 )
268274 except BitPayException as exe :
269275 raise RefundCancellationException (
270- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
276+ "failed to serialize refund object : %s" % str (exe ),
277+ api_code = exe .get_api_code (),
271278 )
272279 except Exception as exe :
273280 raise RefundCancellationException (
@@ -299,7 +306,8 @@ def cancel_by_guid(self, guid: str) -> Refund:
299306 )
300307 except BitPayException as exe :
301308 raise RefundCancellationException (
302- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
309+ "failed to serialize refund object : %s" % str (exe ),
310+ api_code = exe .get_api_code (),
303311 )
304312 except Exception as exe :
305313 raise RefundCancellationException (
@@ -331,7 +339,8 @@ def request_notification(self, refund_id: str) -> bool:
331339 )
332340 except BitPayException as exe :
333341 raise RefundNotificationException (
334- "failed to serialize refund object : %s" % str (exe ), api_code = exe .get_api_code ()
342+ "failed to serialize refund object : %s" % str (exe ),
343+ api_code = exe .get_api_code (),
335344 )
336345 except Exception as exe :
337346 raise RefundNotificationException (
0 commit comments