Class: CNAB240::BancoABC::Entities::TraillerBuilder

Inherits:
Base
  • Object
show all
Defined in:
lib/cnab240/bancoabc/entities/trailler_builder.rb

Instance Method Summary collapse

Methods inherited from Base

#header?, #register?

Instance Method Details

#codigo_banco(data = "246") ⇒ Object



11
12
13
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 11

def codigo_banco(data = "246")
  prepend_zero(data, 3)
end

#lote_do_servico(data) ⇒ Object



15
16
17
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 15

def lote_do_servico(data)
  prepend_zero(data, 4)
end

#quantidade_contas_para_conciliacao(data = "0") ⇒ Object



31
32
33
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 31

def quantidade_contas_para_conciliacao(data = "0")
  prepend_zero(data, 6)
end

#quantidade_lotes(data = "1") ⇒ Object



23
24
25
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 23

def quantidade_lotes(data = "1")
  prepend_zero(data, 6)
end

#quantidade_registros(data = nil) ⇒ Object



27
28
29
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 27

def quantidade_registros(data = nil)
  prepend_zero(data, 6)
end

#tipo_registro(data) ⇒ Object



19
20
21
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 19

def tipo_registro(data)
  prepend_zero(data, 1)
end

#trailler?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 7

def trailler?
  true
end

#uso_exclusivo_febraban_1(data = nil) ⇒ Object



35
36
37
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 35

def uso_exclusivo_febraban_1(data = nil)
  append_space(data, 9)
end

#uso_exclusivo_febraban_2(data = nil) ⇒ Object



39
40
41
# File 'lib/cnab240/bancoabc/entities/trailler_builder.rb', line 39

def uso_exclusivo_febraban_2(data = nil)
  append_space(data, 205)
end