#[derive(Debug, Clone)]
pub struct FileHeader<'a> {
pub record_type: &'a str,
pub priority_code: &'a str,
pub immediate_destination: &'a str,
pub immediate_origin: &'a str,
pub file_creation_date: &'a str,
pub file_creation_time: &'a str,
pub file_id_modifier: &'a str,
pub record_size: &'a str,
pub blocking_factor: &'a str,
pub format_code: &'a str,
pub immediate_destination_name: &'a str,
pub immediate_origin_name: &'a str,
pub reference_code: &'a str,
}
#[derive(Debug, Clone)]
pub struct BatchHeader<'a> {
pub record_type: &'a str,
pub service_class_code: &'a str,
pub company_name: &'a str,
pub company_discretionary_data: &'a str,
pub company_identification: &'a str,
pub standard_entry_class_code: &'a str,
pub company_entry_description: &'a str,
pub company_descriptive_date: &'a str,
pub effective_entry_date: &'a str,
pub settlement_date: &'a str,
pub originator_status_code: &'a str,
pub originating_dfi_identification: &'a str,
pub batch_number: &'a str,
}
#[derive(Debug, Clone)]
pub struct EntryDetail<'a> {
pub record_type: &'a str,
pub transaction_code: &'a str,
pub receiving_dfi_identification: &'a str,
pub check_digit: &'a str,
pub dfi_account_number: &'a str,
pub amount: u64,
pub individual_identification_number: &'a str,
pub individual_name: &'a str,
pub discretionary_data: &'a str,
pub addenda_record_indicator: &'a str,
pub trace_number: &'a str,
pub addenda: Vec<Addenda<'a>>,
}
#[derive(Debug, Clone)]
pub struct Addenda<'a> {
pub record_type: &'a str,
pub addenda_type_code: &'a str,
pub payment_related_information: &'a str,
pub addenda_sequence_number: &'a str,
pub entry_detail_sequence_number: &'a str,
}
#[derive(Debug, Clone)]
pub struct BatchControl {
pub record_type: String,
pub service_class_code: String,
pub entry_addenda_count: u64,
pub entry_hash: u64,
pub total_debit_amount: u64,
pub total_credit_amount: u64,
pub company_identification: String,
pub message_authentication_code: String,
pub reserved: String,
pub originating_dfi_identification: String,
pub batch_number: String,
}
#[derive(Debug, Clone)]
pub struct FileControl {
pub record_type: String,
pub batch_count: u64,
pub block_count: u64,
pub entry_addenda_count: u64,
pub entry_hash: u64,
pub total_debit_amount: u64,
pub total_credit_amount: u64,
pub reserved: String,
}