class BatchFooterRecord(record.Record): '''Closing record for batches''' _fields = [ record.Filler('recordcode', 4, '9990'), record.Filler('variantcode', 1, 'A'), record.NumberField('total_amount', 18), record.NumberField('total_accountnos', 10), record.NumberField('nr_posts', 7), record.Filler('filler', 10), ]
class TransactionRecord(record.Record): '''Transaction''' _fields = [ record.Filler('recordcode', 4, '0100'), record.Filler('variantcode', 1, 'A'), record.NumberField('transactiontype', 4), record.NumberField('amount', 12), record.NumberField('accountno_payer', 10), record.NumberField('accountno_beneficiary', 10), record.Filler('filler', 9), ]
class BatchHeaderRecord(record.Record): '''Header record preceding new batches''' _fields = [ record.Filler('recordcode', 4, '0010'), record.Field('variantcode', 1), record.Field('transactiongroup', 2), record.NumberField('accountno_sender', 10), record.NumberField('batch_tracer', 4), record.Filler('currency_order', 3, 'EUR'), SWIFTField('batch_id', 16), record.Filler('filler', 10), ]
class OrderRecord(record.Record): '''Order details''' _fields = [ record.Filler('recordcode', 6, 'KAE092'), SWIFTField('name_transactioncode', 18), record.NumberField('total_amount', 13), record.Field('accountno_sender', 10), record.NumberField('total_accountnos', 5), record.NumberField('nr_posts', 6), record.Field('identification', 6), record.DateField('preferred_execution_date', '%y%m%d'), record.Field('batch_medium', 18), record.Filler('currency', 3, 'EUR'), record.Field('testcode', 1), ] def __init__(self, *args, **kwargs): super(OrderRecord, self).__init__(*args, **kwargs) self.batch_medium = 'DATACOM' self.name_transactioncode = self._transactioncode