Setra Client
Client for doing HTTP requests to the SETRA api
from setra_client import SetraClient
from setra_client.models import Batch, Multi, Transaction, Voucher
c = SetraClient(url='https://example.com',
headers={'X-Gravitee-API-Key': 'c-d-a-b'})
batch = Batch.from_dict({
"client": 1,
"batchid": 2,
"period": 3,
"interface": 4,
"vouchertype": 5,
"batchid_interface": 6
})
vouchers = [Voucher.from_dict({
"batchid": 1,
"voucherno_interface": 2,
"exref": 3,
"voucherno": 4
})]
transactions = [Transaction.from_dict({
"voucherid": 1,
"account": 1,
"amount": 1,
"transdate": 1,
"curamount": 1,
"currency": 1,
"description": 1,
"dim1": 1,
"dim2": 1,
"dim3": 1,
"dim4": 1,
"dim5": 1,
"dim6": 1,
"dim7": 1,
"sequenceno": 1,
"taxcode": 1,
"transtype": 1,
"extinvref": 1
})]
multi = Multi(batch=batch, vouchers=vouchers, transactions=transactions)
response = c.post_multi(multi)