Skip to content

Commit 4e5cc57

Browse files
committed
Added missing ct param for import
1 parent 8decfdb commit 4e5cc57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_new_invite(self):
3131
self.assertIsNotNone(tx)
3232
self._twikey.transaction.batch_send(self.ct)
3333
try:
34-
self._twikey.transaction.batch_import("")
34+
self._twikey.transaction.batch_import(self.ct,"")
3535
except twikey.TwikeyError as e:
3636
self.assertEqual("invalid_file", e.get_code())
3737
try:

twikey/transaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def batch_send(self, ct, colltndt=False):
8585
except requests.exceptions.RequestException as e:
8686
raise self.client.raise_error_from_request("Send batch", e)
8787

88-
def batch_import(self, pain008_xml):
88+
def batch_import(self, ct, pain008_xml):
8989
"""
9090
See https://www.twikey.com/api/#import-collection
9191
:param pain008_xml content of the pain008 file
9292
"""
93-
url = self.client.instance_url("/collect/import")
93+
url = self.client.instance_url(f"/collect/import?ct={ct}")
9494
try:
9595
self.client.refresh_token_if_required()
9696
response = requests.post(

0 commit comments

Comments
 (0)