@@ -17,7 +17,7 @@ class BatchTest(unittest.TestCase):
1717 client = None
1818
1919 def setUp (self ):
20- self .client = Configuration .gateway ("YOUR-API-KEY" , "YOUR-API-SECRET" , "YOUR-ENVIROMENT " )
20+ self .client = Configuration .gateway ("YOUR-API-KEY" , "YOUR-API-SECRET" , "YOUR-ENVIRONMENT " )
2121
2222 def test_processing (self ):
2323 uuidString = str (uuid .uuid4 ())
@@ -26,12 +26,11 @@ def test_processing(self):
2626 response = self .client .recipient .create (payload )
2727 recipient_id = response .id
2828
29- payload = {"type" : "bank-transfer" , "primary" : "true" , "country" : "CA" , "currency" : "USD" ,
30- "accountNum" : "604542847" , "bankId" : "123" , "branchId" : "47261" , "accountHolderName" : "Tom Jones" }
29+ payload = {"type" : "bank-transfer" , "primary" : True , "country" : "DE" , "currency" : "EUR" , "iban" : "DE89 3704 0044 0532 0130 00" }
3130 response = self .client .recipient_account .create (recipient_id , payload )
3231
3332 payload = {"payments" : [{"recipient" : {
34- "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "USD " }]}
33+ "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "EUR " }]}
3534 response = self .client .batch .create (payload )
3635 batch_id = response .id
3736
@@ -47,14 +46,14 @@ def test_create_batch(self):
4746 response = self .client .recipient .create (payload )
4847 recipient_id = response .id
4948
50- payload = {"type" : "bank-transfer" , "primary" : "true" , "country" : "CA " , "currency" : "USD" ,
51- "accountNum" : "604542847" , "bankId" : "123" , "branchId" : "47261" , "accountHolderName" : "Tom Jones" }
49+ payload = {"type" : "bank-transfer" , "primary" : True , "country" : "DE " , "currency" : "EUR" , "iban" : "DE89 3704 0044 0532 0130 00" }
50+
5251 response = self .client .recipient_account .create (recipient_id , payload )
5352
5453 payload = {"payments" : [{"recipient" : {
55- "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "USD " }]}
54+ "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "EUR " }]}
5655 response = self .client .batch .create (payload )
57- self .assertTrue (response .currency == "USD " )
56+ self .assertTrue (response .currency == "CAD " )
5857
5958 def test_delete (self ):
6059 uuidString = str (uuid .uuid4 ())
@@ -64,12 +63,11 @@ def test_delete(self):
6463 response = self .client .recipient .create (payload )
6564 recipient_id = response .id
6665
67- payload = {"type" : "bank-transfer" , "primary" : "true" , "country" : "CA" , "currency" : "USD" ,
68- "accountNum" : "604542847" , "bankId" : "123" , "branchId" : "47261" , "accountHolderName" : "Tom Jones" }
66+ payload = {"type" : "bank-transfer" , "primary" : True , "country" : "DE" , "currency" : "EUR" , "iban" : "DE89 3704 0044 0532 0130 00" }
6967 response = self .client .recipient_account .create (recipient_id , payload )
7068
7169 payload = {"payments" : [{"recipient" : {
72- "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "USD " }]}
70+ "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "EUR " }]}
7371 response = self .client .batch .create (payload )
7472 batch_id = response .id
7573
@@ -83,18 +81,17 @@ def test_payment(self):
8381 response = self .client .recipient .create (payload )
8482 recipient_id = response .id
8583
86- payload = {"type" : "bank-transfer" , "primary" : "true" , "country" : "CA" , "currency" : "USD" ,
87- "accountNum" : "604542847" , "bankId" : "123" , "branchId" : "47261" , "accountHolderName" : "Tom Jones" }
84+ payload = {"type" : "bank-transfer" , "primary" : True , "country" : "DE" , "currency" : "EUR" , "iban" : "DE89 3704 0044 0532 0130 00" }
8885 response = self .client .recipient_account .create (recipient_id , payload )
8986
9087 payload = {"payments" : [{"recipient" : {
91- "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "USD " }]}
88+ "id" : recipient_id }, "sourceAmount" : "65" , "memo" : "" , "sourceCurrency" : "EUR " }]}
9289 response = self .client .batch .create (payload )
9390 batch_id = response .id
9491
9592 payload = {"recipient" :{"id" : recipient_id },"sourceAmount" :"100.10" ,"memo" :"Freelance payment" }
9693 response = self .client .payment .create (payload , batch_id )
97- self .assertTrue (response .sourceAmount == '100.10 ' )
94+ self .assertTrue (response .sourceAmount == '76.08 ' )
9895
9996if __name__ == '__main__' :
10097 unittest .main ()
0 commit comments