@@ -140,7 +140,7 @@ def test_should_create_get_cancel_refund_request_new(self):
140140 )
141141 first_invoice = invoices [0 ]
142142 create_refund = self .client .create_refund (
143- first_invoice .get_id (), 1.0 , "BTC" , True , False , False
143+ first_invoice .get_id (), first_invoice . get_price (), first_invoice . get_currency () , True , False , False
144144 )
145145 retrieved_refunds = self .client .get_refunds (first_invoice .get_id ())
146146 last_refund = retrieved_refunds [- 1 ]
@@ -150,15 +150,17 @@ def test_should_create_get_cancel_refund_request_new(self):
150150 last_refund .get_id ()
151151 )
152152 cancel_refund = self .client .cancel_refund (last_refund .get_id ())
153- supported_wallets = self .client .get_supported_wallets ()
154153
155154 self .assertIsNotNone (invoices )
156155 self .assertIsNotNone (create_refund .get_id ())
157156 self .assertIsNotNone (retrieved_refunds )
158157 self .assertEqual ("created" , update_refund .get_status ())
159158 self .assertEqual (last_refund .get_id (), retrieved_refund .get_id ())
160159 self .assertTrue (notification_status )
161- self .assertEqual ("cancelled" , cancel_refund .get_status ())
160+ self .assertEqual ("canceled" , cancel_refund .get_status ())
161+
162+ def test_should_get_supported_wallets (self ):
163+ supported_wallets = self .client .get_supported_wallets ()
162164 self .assertIsNotNone (supported_wallets )
163165
164166 def test_should_create_bill_usd (self ):
@@ -417,7 +419,7 @@ def test_should_get_payout_recipient_id(self):
417419 recipients_list = []
418420
419421 payout_recipient = PayoutRecipient ()
420- payout_recipient .set_email ("sandbox@bitpay .com" )
422+ payout_recipient .set_email ("nsoni@mailinator .com" )
421423 payout_recipient .set_label ("recipient1" )
422424 payout_recipient .set_notification_url ("https://hookb.in/QJOPBdMgRkukpp2WO60o" )
423425 recipients_list .append (payout_recipient )
@@ -489,7 +491,7 @@ def test_should_request_payout_recipient_notification(self):
489491 def test_should_submit_payout (self ):
490492 recipients = self .client .get_payout_recipients (None , 1 )
491493 currency = Currency .USD
492- ledger_currency = Currency .ETH
494+ ledger_currency = Currency .USD
493495
494496 payout = Payout (5.0 , currency , ledger_currency )
495497 payout .set_recipient_id (recipients [0 ].get_id ())
@@ -511,7 +513,7 @@ def test_should_get_payouts_by_status(self):
511513 def test_should_submit_get_and_delete_payout (self ):
512514 recipients = self .client .get_payout_recipients (None , 1 )
513515 currency = Currency .USD
514- ledger_currency = Currency .ETH
516+ ledger_currency = Currency .USD
515517
516518 payout = Payout (5.0 , currency , ledger_currency )
517519 payout .set_recipient_id (recipients [0 ].get_id ())
@@ -529,7 +531,7 @@ def test_should_submit_get_and_delete_payout(self):
529531 def test_should_request_payout_notification (self ):
530532 recipients = self .client .get_payout_recipients (None , 1 )
531533 currency = Currency .USD
532- ledger_currency = Currency .ETH
534+ ledger_currency = Currency .USD
533535
534536 payout = Payout (5.0 , currency , ledger_currency )
535537 payout .set_recipient_id (recipients [0 ].get_id ())
@@ -547,16 +549,16 @@ def test_should_request_payout_notification(self):
547549 self .assertTrue (cancel_payout )
548550
549551 def test_should_submit_payout_batch (self ):
550- recipients = self .client .get_payout_recipients (None , 2 )
552+ recipients = self .client .get_payout_recipients ("active" , 2 )
551553 currency = Currency .USD
552- ledger_currency = Currency .ETH
554+ ledger_currency = Currency .USD
553555 effective_date = (date .today () + timedelta (days = 3 )).strftime ("%Y-%m-%d" )
554556 instructions = [
555557 PayoutInstruction (
556558 5.0 , RecipientReferenceMethod .EMAIL , recipients [0 ].get_email ()
557559 ),
558560 PayoutInstruction (
559- 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_email ()
561+ 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_id ()
560562 ),
561563 ]
562564 batch = PayoutBatch (currency , effective_date , ledger_currency )
@@ -569,17 +571,17 @@ def test_should_submit_payout_batch(self):
569571 self .assertTrue (cancel_batch )
570572
571573 def test_should_submit_get_and_delete_payout_batch (self ):
572- recipients = self .client .get_payout_recipients (None , 2 )
574+ recipients = self .client .get_payout_recipients ("active" , 2 )
573575 currency = Currency .USD
574- ledger_currency = Currency .ETH
576+ ledger_currency = Currency .USD
575577 effective_date = (date .today () + timedelta (days = 3 )).strftime ("%Y-%m-%d" )
576578
577579 instructions = [
578580 PayoutInstruction (
579581 5.0 , RecipientReferenceMethod .EMAIL , recipients [0 ].get_email ()
580582 ),
581583 PayoutInstruction (
582- 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_email ()
584+ 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_id ()
583585 ),
584586 ]
585587 batch = PayoutBatch (currency , effective_date , ledger_currency )
@@ -597,17 +599,17 @@ def test_should_submit_get_and_delete_payout_batch(self):
597599 self .assertEqual (PayoutStatus .New , retrieve_batch .get_status ())
598600
599601 def test_should_request_payout_batch_notification (self ):
600- recipients = self .client .get_payout_recipients (None , 2 )
602+ recipients = self .client .get_payout_recipients ("active" , 2 )
601603 currency = Currency .USD
602- ledger_currency = Currency .ETH
604+ ledger_currency = Currency .USD
603605 effective_date = (date .today () + timedelta (days = 3 )).strftime ("%Y-%m-%d" )
604606
605607 instructions = [
606608 PayoutInstruction (
607609 5.0 , RecipientReferenceMethod .EMAIL , recipients [0 ].get_email ()
608610 ),
609611 PayoutInstruction (
610- 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_email ()
612+ 6.0 , RecipientReferenceMethod .RECIPIENT_ID , recipients [1 ].get_id ()
611613 ),
612614 ]
613615 batch = PayoutBatch (currency , effective_date , ledger_currency )
0 commit comments