Class: Kinabo::Fromtis::Remessa::Header

Inherits:
Hashie::Dash
  • Object
show all
Includes:
Utils
Defined in:
lib/kinabo/fromtis/remessa/header.rb

Instance Method Summary collapse

Methods included from Utils

#fill_sequencial, #justify_number, #justify_string, #justify_value, #parse_date, #parse_decimal, #parse_number, #parse_string

Instance Method Details

#buildObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/kinabo/fromtis/remessa/header.rb', line 14

def build
  parts = '01REMESSA01'

  parts << justify_string('COBRANCA', 15)
  parts << justify_string(codigo_empresa, 20)
  parts << justify_string(nome_empresa, 30)
  parts << justify_number(codigo_banco, 3)
  parts << justify_string(nome_banco, 15)
  parts << justify_number(data_gravacao, 6)
  parts << justify_string('', 8)
  parts << 'MX'
  parts << justify_number(sequencial, 7)
  parts << justify_string('', 277)
  parts << justify_string('', 44) # Put more 44 because it is a CNAB 444
end