Class: Rocknab::Layouts::CNAB240::Batch

Inherits:
Struct
  • Object
show all
Defined in:
lib/rocknab/layouts/cnab_240/batch.rb

Constant Summary collapse

BATCH_PARAMS =
[ :bank_code, :cnpj, :branch, :account, :digit, :name,
:zipcode, :state, :payment_type, :payment_reason ]
SEGMENT_PARAMS =
[ :bank_code, :bank, :branch, :account, :digit, :name,
:date, :value, :inscription_number ]
TRAILER_PARAMS =
[ :bank_code ]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batch_indexObject

Returns the value of attribute batch_index

Returns:

  • (Object)

    the current value of batch_index



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def batch_index
  @batch_index
end

#is_same_bankObject

Returns the value of attribute is_same_bank

Returns:

  • (Object)

    the current value of is_same_bank



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def is_same_bank
  @is_same_bank
end

#is_savingsObject

Returns the value of attribute is_savings

Returns:

  • (Object)

    the current value of is_savings



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def is_savings
  @is_savings
end

#is_tedObject

Returns the value of attribute is_ted

Returns:

  • (Object)

    the current value of is_ted



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def is_ted
  @is_ted
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def params
  @params
end

#paymentsObject

Returns the value of attribute payments

Returns:

  • (Object)

    the current value of payments



8
9
10
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 8

def payments
  @payments
end

Instance Method Details

#buildObject



16
17
18
# File 'lib/rocknab/layouts/cnab_240/batch.rb', line 16

def build
  [ batch_header, segments, batch_trailer ]
end