Class: CNAB240::BancoABC::Entities::RegisterS

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

Instance Method Summary collapse

Methods inherited from Base

#header?, #trailler?

Instance Method Details

#banco(data = "246") ⇒ Object



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

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

#codigo_movimento(data = nil) ⇒ Object



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

def codigo_movimento(data = nil)
  prepend_zero(data, 2)
end

#lote(data) ⇒ Object



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

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

#mensagem1(data = nil) ⇒ Object



47
48
49
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 47

def mensagem1(data = nil)
  append_space(data, 40)
end

#mensagem2(data = nil) ⇒ Object



51
52
53
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 51

def mensagem2(data = nil)
  append_space(data, 40)
end

#mensagem3(data = nil) ⇒ Object



55
56
57
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 55

def mensagem3(data = nil)
  append_space(data, 40)
end

#mensagem4(data = nil) ⇒ Object



59
60
61
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 59

def mensagem4(data = nil)
  append_space(data, 40)
end

#mensagem5(data = nil) ⇒ Object



63
64
65
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 63

def mensagem5(data = nil)
  append_space(data, 40)
end

#numero_registro(data = nil) ⇒ Object



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

def numero_registro(data = nil)
  prepend_zero(data, 5)
end

#register?Boolean

Returns:

  • (Boolean)


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

def register?
  true
end

#registro(data) ⇒ Object



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

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

#segmento_registro_detalheObject



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

def segmento_registro_detalhe
  "S"
end

#sequencial_registro_lote(data = nil) ⇒ Object



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

def sequencial_registro_lote(data = nil)
  append_space(data, 5) # incremental
end

#tipo_impressao(data) ⇒ Object



43
44
45
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 43

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

#uso_exclusivo_febraban_1(data = nil) ⇒ Object



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

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

#uso_exclusivo_febraban_2(data = nil) ⇒ Object



67
68
69
# File 'lib/cnab240/bancoabc/entities/register_s.rb', line 67

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