cnab240 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/cnab240.gemspec +10 -12
  4. data/lib/cnab240.rb +108 -91
  5. data/lib/cnab240/arquivo/arquivo.rb +6 -9
  6. data/lib/cnab240/arquivo/builder.rb +111 -90
  7. data/lib/cnab240/arquivo/estrutura.rb +161 -99
  8. data/lib/cnab240/arquivo/v40/header.rb +27 -29
  9. data/lib/cnab240/arquivo/v40/trailer.rb +8 -10
  10. data/lib/cnab240/arquivo/v60/header.rb +38 -0
  11. data/lib/cnab240/arquivo/v60/trailer.rb +17 -0
  12. data/lib/cnab240/arquivo/v80/header.rb +23 -26
  13. data/lib/cnab240/arquivo/v80/trailer.rb +8 -9
  14. data/lib/cnab240/arquivo/v81/header.rb +37 -0
  15. data/lib/cnab240/arquivo/v81/trailer.rb +17 -0
  16. data/lib/cnab240/arquivo/v83/header.rb +25 -26
  17. data/lib/cnab240/arquivo/v83/trailer.rb +9 -9
  18. data/lib/cnab240/arquivo/v86/header.rb +25 -26
  19. data/lib/cnab240/arquivo/v86/trailer.rb +9 -10
  20. data/lib/cnab240/arquivo/v87/header.rb +25 -26
  21. data/lib/cnab240/arquivo/v87/trailer.rb +9 -10
  22. data/lib/cnab240/ext/attribute_accessors.rb +4 -4
  23. data/lib/cnab240/ext/bindata.rb +4 -4
  24. data/lib/cnab240/ext/default_mixin.rb +2 -4
  25. data/lib/cnab240/ext/filler.rb +1 -3
  26. data/lib/cnab240/ext/lstring.rb +9 -10
  27. data/lib/cnab240/ext/segmento_mixin.rb +1 -3
  28. data/lib/cnab240/helper/boleto_bancoob.rb +60 -0
  29. data/lib/cnab240/helper/helper.rb +1 -1
  30. data/lib/cnab240/helper/pagamento_bb.rb +7 -9
  31. data/lib/cnab240/helper/pagamento_bradesco.rb +6 -8
  32. data/lib/cnab240/helper/pagamento_itau.rb +6 -8
  33. data/lib/cnab240/helper/transferencia_citibank.rb +56 -0
  34. data/lib/cnab240/helper/{pagamento_sicoob.rb → transferencia_sicoob.rb} +8 -15
  35. data/lib/cnab240/{arquivo/lote.rb → lote.rb} +29 -14
  36. data/lib/cnab240/lote/v40/boletos/header.rb +46 -0
  37. data/lib/cnab240/lote/v40/boletos/trailer.rb +29 -0
  38. data/lib/cnab240/pagamentos/v40/header.rb +30 -32
  39. data/lib/cnab240/pagamentos/v40/trailer.rb +10 -11
  40. data/lib/cnab240/pagamentos/v60/header.rb +43 -0
  41. data/lib/cnab240/pagamentos/v60/trailer.rb +17 -0
  42. data/lib/cnab240/pagamentos/v80/header.rb +35 -37
  43. data/lib/cnab240/pagamentos/v80/trailer.rb +10 -11
  44. data/lib/cnab240/pagamentos/v83/header.rb +33 -35
  45. data/lib/cnab240/pagamentos/v83/trailer.rb +11 -12
  46. data/lib/cnab240/pagamentos/v86/header.rb +34 -36
  47. data/lib/cnab240/pagamentos/v86/titulos/header.rb +28 -30
  48. data/lib/cnab240/pagamentos/v86/titulos/trailer.rb +11 -12
  49. data/lib/cnab240/pagamentos/v86/trailer.rb +11 -12
  50. data/lib/cnab240/pagamentos/v86/tributos/header.rb +35 -37
  51. data/lib/cnab240/pagamentos/v86/tributos/trailer.rb +9 -10
  52. data/lib/cnab240/pagamentos/v87/header.rb +34 -36
  53. data/lib/cnab240/pagamentos/v87/titulos/header.rb +28 -30
  54. data/lib/cnab240/pagamentos/v87/titulos/trailer.rb +11 -12
  55. data/lib/cnab240/pagamentos/v87/trailer.rb +11 -12
  56. data/lib/cnab240/pagamentos/v87/tributos/header.rb +35 -37
  57. data/lib/cnab240/pagamentos/v87/tributos/trailer.rb +9 -10
  58. data/lib/cnab240/segmentos/v40/segmento_a.rb +40 -41
  59. data/lib/cnab240/segmentos/v60/segmento_a.rb +43 -0
  60. data/lib/cnab240/segmentos/v60/segmento_b.rb +38 -0
  61. data/lib/cnab240/segmentos/v60/segmento_j.rb +32 -0
  62. data/lib/cnab240/segmentos/v80/agencia_itau.rb +8 -9
  63. data/lib/cnab240/segmentos/v80/agencia_outros.rb +6 -7
  64. data/lib/cnab240/segmentos/v80/segmento_a.rb +30 -32
  65. data/lib/cnab240/segmentos/v81/segmento_p.rb +79 -0
  66. data/lib/cnab240/segmentos/v81/segmento_q.rb +36 -0
  67. data/lib/cnab240/segmentos/v81/segmento_r.rb +49 -0
  68. data/lib/cnab240/segmentos/v81/segmento_s.rb +37 -0
  69. data/lib/cnab240/segmentos/v83/segmento_a.rb +35 -36
  70. data/lib/cnab240/segmentos/v83/segmento_b.rb +33 -34
  71. data/lib/cnab240/segmentos/v83/segmento_j.rb +22 -23
  72. data/lib/cnab240/segmentos/v83/segmento_z.rb +10 -11
  73. data/lib/cnab240/segmentos/v86/segmento_a.rb +37 -38
  74. data/lib/cnab240/segmentos/v86/segmento_b.rb +33 -34
  75. data/lib/cnab240/segmentos/v86/segmento_c.rb +19 -20
  76. data/lib/cnab240/segmentos/v86/segmento_j.rb +22 -23
  77. data/lib/cnab240/segmentos/v86/segmento_j52.rb +19 -20
  78. data/lib/cnab240/segmentos/v86/segmento_n.rb +17 -18
  79. data/lib/cnab240/segmentos/v86/segmento_n1.rb +10 -11
  80. data/lib/cnab240/segmentos/v86/segmento_n2.rb +12 -13
  81. data/lib/cnab240/segmentos/v86/segmento_n3.rb +12 -13
  82. data/lib/cnab240/segmentos/v86/segmento_n4.rb +14 -15
  83. data/lib/cnab240/segmentos/v86/segmento_n5.rb +12 -13
  84. data/lib/cnab240/segmentos/v86/segmento_n6.rb +12 -13
  85. data/lib/cnab240/segmentos/v86/segmento_n7.rb +13 -14
  86. data/lib/cnab240/segmentos/v86/segmento_n8.rb +12 -14
  87. data/lib/cnab240/segmentos/v86/segmento_o.rb +17 -18
  88. data/lib/cnab240/segmentos/v86/segmento_w.rb +12 -13
  89. data/lib/cnab240/segmentos/v86/segmento_w1.rb +9 -10
  90. data/lib/cnab240/segmentos/v86/segmento_z.rb +10 -11
  91. data/lib/cnab240/segmentos/v87/segmento_a.rb +37 -38
  92. data/lib/cnab240/segmentos/v87/segmento_b.rb +33 -34
  93. data/lib/cnab240/segmentos/v87/segmento_c.rb +19 -20
  94. data/lib/cnab240/segmentos/v87/segmento_j.rb +22 -23
  95. data/lib/cnab240/segmentos/v87/segmento_j52.rb +19 -20
  96. data/lib/cnab240/segmentos/v87/segmento_n.rb +17 -18
  97. data/lib/cnab240/segmentos/v87/segmento_n1.rb +10 -11
  98. data/lib/cnab240/segmentos/v87/segmento_n2.rb +12 -13
  99. data/lib/cnab240/segmentos/v87/segmento_n3.rb +12 -13
  100. data/lib/cnab240/segmentos/v87/segmento_n4.rb +14 -15
  101. data/lib/cnab240/segmentos/v87/segmento_n5.rb +12 -13
  102. data/lib/cnab240/segmentos/v87/segmento_n6.rb +12 -13
  103. data/lib/cnab240/segmentos/v87/segmento_n7.rb +13 -14
  104. data/lib/cnab240/segmentos/v87/segmento_n8.rb +12 -14
  105. data/lib/cnab240/segmentos/v87/segmento_o.rb +17 -18
  106. data/lib/cnab240/segmentos/v87/segmento_w.rb +12 -13
  107. data/lib/cnab240/segmentos/v87/segmento_w1.rb +9 -10
  108. data/lib/cnab240/segmentos/v87/segmento_z.rb +10 -11
  109. data/lib/cnab240/version.rb +1 -1
  110. metadata +30 -40
@@ -1,45 +1,43 @@
1
1
  module Cnab240::V83::Pagamentos
2
2
  class Header < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
9
-
10
- string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- lstring :servico_tipo, :length => 2, :pad_byte => '0'
12
- lstring :servico_forma, :length => 2, :pad_byte => '0'
13
- lstring :servico_layout, :length => 3, :initial_value => '031', :pad_byte => '0'
14
- string :cnab_g004_1, :length => 1, :pad_byte => ' '
15
-
16
- lstring :empresa_tipo, :length => 1, :pad_byte => '0'
17
- lstring :empresa_numero, :length => 14, :pad_byte => '0'
18
- string :empresa_convenio, :length => 20, :pad_byte => ' '
19
- lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
20
- string :empresa_agencia_dv, :length => 1, :pad_byte => ' '
21
- lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
22
- string :empresa_conta_dv, :length => 1, :pad_byte => ' '
23
- string :empresa_agencia_conta_dv, :length => 1, :pad_byte => ' '
24
- string :empresa_nome, :length => 30, :pad_byte => ' '
25
-
26
- string :informacao_1, :length => 40, :pad_byte => ' '
27
-
28
- string :endereco_logradouro, :length => 30, :pad_byte => ' '
29
- lstring :endereco_numero, :length => 5, :pad_byte => '0'
30
- string :endereco_complemento, :length => 15, :pad_byte => ' '
31
- string :endereco_cidade, :length => 20, :pad_byte => ' '
32
- lstring :endereco_cep, :length => 5, :pad_byte => '0'
33
- lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
34
- string :endereco_estado, :length => 2, :pad_byte => ' '
35
-
36
- string :cnab_g004_2, :length => 8, :pad_byte => ' '
37
- string :ocorrencias, :length => 10, :pad_byte => ' '
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '1', pad_byte: '0'
8
+
9
+ string :servico_operacao, length: 1, initial_value: 'C', pad_byte: ' '
10
+ lstring :servico_tipo, length: 2, pad_byte: '0'
11
+ lstring :servico_forma, length: 2, pad_byte: '0'
12
+ lstring :servico_layout, length: 3, initial_value: '031', pad_byte: '0'
13
+ string :cnab_g004_1, length: 1, pad_byte: ' '
14
+
15
+ lstring :empresa_tipo, length: 1, pad_byte: '0'
16
+ lstring :empresa_numero, length: 14, pad_byte: '0'
17
+ string :empresa_convenio, length: 20, pad_byte: ' '
18
+ lstring :empresa_agencia_codigo, length: 5, pad_byte: '0'
19
+ string :empresa_agencia_dv, length: 1, pad_byte: ' '
20
+ lstring :empresa_conta_numero, length: 12, pad_byte: '0'
21
+ string :empresa_conta_dv, length: 1, pad_byte: ' '
22
+ string :empresa_agencia_conta_dv, length: 1, pad_byte: ' '
23
+ string :empresa_nome, length: 30, pad_byte: ' '
24
+
25
+ string :informacao_1, length: 40, pad_byte: ' '
26
+
27
+ string :endereco_logradouro, length: 30, pad_byte: ' '
28
+ lstring :endereco_numero, length: 5, pad_byte: '0'
29
+ string :endereco_complemento, length: 15, pad_byte: ' '
30
+ string :endereco_cidade, length: 20, pad_byte: ' '
31
+ lstring :endereco_cep, length: 5, pad_byte: '0'
32
+ lstring :endereco_complemento_cep, length: 3, pad_byte: '0'
33
+ string :endereco_estado, length: 2, pad_byte: ' '
34
+
35
+ string :cnab_g004_2, length: 8, pad_byte: ' '
36
+ string :ocorrencias, length: 10, pad_byte: ' '
38
37
 
39
38
  private
40
39
 
41
40
  def auto_fill
42
-
43
41
  end
44
42
  end
45
- end
43
+ end
@@ -1,18 +1,17 @@
1
1
  module Cnab240::V83::Pagamentos
2
2
  class Trailer < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '5', pad_byte: '0'
9
8
 
10
- lstring :cnab_g004_1, :length => 9, :pad_byte => ' '
11
- lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- lstring :totais_valor, :length => 18, :pad_byte => '0'
13
- lstring :totais_qtde_moeda, :length => 18, :pad_byte => '0'
14
- lstring :numero_aviso_debito, :length => 6, :pad_byte => '0'
15
- string :cnab_g004_2, :length => 165, :pad_byte => ' '
16
- string :ocorrencias, :length => 10, :pad_byte => ' '
9
+ lstring :cnab_g004_1, length: 9, pad_byte: ' '
10
+ lstring :totais_qtde_registros, length: 6, pad_byte: '0'
11
+ lstring :totais_valor, length: 18, pad_byte: '0'
12
+ lstring :totais_qtde_moeda, length: 18, pad_byte: '0'
13
+ lstring :numero_aviso_debito, length: 6, pad_byte: '0'
14
+ string :cnab_g004_2, length: 165, pad_byte: ' '
15
+ string :ocorrencias, length: 10, pad_byte: ' '
17
16
  end
18
- end
17
+ end
@@ -1,46 +1,44 @@
1
1
  module Cnab240::V86::Pagamentos
2
2
  class Header < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
9
-
10
- string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- lstring :servico_tipo, :length => 2, :pad_byte => '0'
12
- lstring :servico_forma, :length => 2, :pad_byte => '0'
13
- lstring :servico_layout, :length => 3, :initial_value => '044', :pad_byte => '0'
14
- string :cnab_g004_1, :length => 1, :pad_byte => ' '
15
-
16
- lstring :empresa_tipo, :length => 1, :pad_byte => '0'
17
- lstring :empresa_numero, :length => 14, :pad_byte => '0'
18
- string :empresa_convenio, :length => 20, :pad_byte => ' '
19
- lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
20
- string :empresa_agencia_dv, :length => 1, :pad_byte => '0'
21
- lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
22
- string :empresa_conta_dv, :length => 1, :pad_byte => ' '
23
- string :empresa_agencia_conta_dv, :length => 1, :pad_byte => '0'
24
- string :empresa_nome, :length => 30, :pad_byte => ' '
25
-
26
- string :informacao_1, :length => 40, :pad_byte => ' '
27
-
28
- string :endereco_logradouro, :length => 30, :pad_byte => ' '
29
- lstring :endereco_numero, :length => 5, :pad_byte => '0'
30
- string :endereco_complemento, :length => 15, :pad_byte => ' '
31
- string :endereco_cidade, :length => 20, :pad_byte => ' '
32
- lstring :endereco_cep, :length => 5, :pad_byte => '0'
33
- lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
34
- string :endereco_estado, :length => 2, :pad_byte => ' '
35
-
36
- lstring :indicativo_forma_pagamento, :length => 2, :pad_byte => '0'
37
- string :cnab_g004_2, :length => 6, :pad_byte => ' '
38
- string :ocorrencias, :length => 10, :pad_byte => ' '
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '1', pad_byte: '0'
8
+
9
+ string :servico_operacao, length: 1, initial_value: 'C', pad_byte: ' '
10
+ lstring :servico_tipo, length: 2, pad_byte: '0'
11
+ lstring :servico_forma, length: 2, pad_byte: '0'
12
+ lstring :servico_layout, length: 3, initial_value: '044', pad_byte: '0'
13
+ string :cnab_g004_1, length: 1, pad_byte: ' '
14
+
15
+ lstring :empresa_tipo, length: 1, pad_byte: '0'
16
+ lstring :empresa_numero, length: 14, pad_byte: '0'
17
+ string :empresa_convenio, length: 20, pad_byte: ' '
18
+ lstring :empresa_agencia_codigo, length: 5, pad_byte: '0'
19
+ string :empresa_agencia_dv, length: 1, pad_byte: '0'
20
+ lstring :empresa_conta_numero, length: 12, pad_byte: '0'
21
+ string :empresa_conta_dv, length: 1, pad_byte: ' '
22
+ string :empresa_agencia_conta_dv, length: 1, pad_byte: '0'
23
+ string :empresa_nome, length: 30, pad_byte: ' '
24
+
25
+ string :informacao_1, length: 40, pad_byte: ' '
26
+
27
+ string :endereco_logradouro, length: 30, pad_byte: ' '
28
+ lstring :endereco_numero, length: 5, pad_byte: '0'
29
+ string :endereco_complemento, length: 15, pad_byte: ' '
30
+ string :endereco_cidade, length: 20, pad_byte: ' '
31
+ lstring :endereco_cep, length: 5, pad_byte: '0'
32
+ lstring :endereco_complemento_cep, length: 3, pad_byte: '0'
33
+ string :endereco_estado, length: 2, pad_byte: ' '
34
+
35
+ lstring :indicativo_forma_pagamento, length: 2, pad_byte: '0'
36
+ string :cnab_g004_2, length: 6, pad_byte: ' '
37
+ string :ocorrencias, length: 10, pad_byte: ' '
39
38
 
40
39
  private
41
40
 
42
41
  def auto_fill
43
-
44
42
  end
45
43
  end
46
- end
44
+ end
@@ -1,46 +1,44 @@
1
1
  module Cnab240::V86::PagamentosTitulos
2
2
  class Header < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '1', pad_byte: '0'
9
8
 
10
- string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- lstring :servico_tipo, :length => 2, :pad_byte => '0'
12
- lstring :servico_forma, :length => 2, :pad_byte => '0'
13
- lstring :servico_layout, :length => 3, :initial_value => '040', :pad_byte => '0'
9
+ string :servico_operacao, length: 1, initial_value: 'C', pad_byte: ' '
10
+ lstring :servico_tipo, length: 2, pad_byte: '0'
11
+ lstring :servico_forma, length: 2, pad_byte: '0'
12
+ lstring :servico_layout, length: 3, initial_value: '040', pad_byte: '0'
14
13
 
15
- string :cnab_g004_1, :length => 1, :pad_byte => ' '
14
+ string :cnab_g004_1, length: 1, pad_byte: ' '
16
15
 
17
- lstring :empresa_tipo, :length => 1, :pad_byte => '0'
18
- lstring :empresa_numero, :length => 14, :pad_byte => '0'
19
- string :empresa_convenio, :length => 20, :pad_byte => ' '
20
- lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
21
- string :empresa_agencia_dv, :length => 1, :pad_byte => '0'
22
- lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
23
- string :empresa_conta_dv, :length => 1, :pad_byte => '0'
24
- string :empresa_agencia_conta_dv, :length => 1, :pad_byte => '0'
25
- string :empresa_nome, :length => 30, :pad_byte => ' '
16
+ lstring :empresa_tipo, length: 1, pad_byte: '0'
17
+ lstring :empresa_numero, length: 14, pad_byte: '0'
18
+ string :empresa_convenio, length: 20, pad_byte: ' '
19
+ lstring :empresa_agencia_codigo, length: 5, pad_byte: '0'
20
+ string :empresa_agencia_dv, length: 1, pad_byte: '0'
21
+ lstring :empresa_conta_numero, length: 12, pad_byte: '0'
22
+ string :empresa_conta_dv, length: 1, pad_byte: '0'
23
+ string :empresa_agencia_conta_dv, length: 1, pad_byte: '0'
24
+ string :empresa_nome, length: 30, pad_byte: ' '
26
25
 
27
- string :informacao_1, :length => 40, :pad_byte => ' '
26
+ string :informacao_1, length: 40, pad_byte: ' '
28
27
 
29
- string :endereco_logradouro, :length => 30, :pad_byte => ' '
30
- lstring :endereco_numero, :length => 5, :pad_byte => '0'
31
- string :endereco_complemento, :length => 15, :pad_byte => ' '
32
- string :endereco_cidade, :length => 20, :pad_byte => ' '
33
- lstring :endereco_cep, :length => 5, :pad_byte => '0'
34
- lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
35
- string :endereco_estado, :length => 2, :pad_byte => ' '
28
+ string :endereco_logradouro, length: 30, pad_byte: ' '
29
+ lstring :endereco_numero, length: 5, pad_byte: '0'
30
+ string :endereco_complemento, length: 15, pad_byte: ' '
31
+ string :endereco_cidade, length: 20, pad_byte: ' '
32
+ lstring :endereco_cep, length: 5, pad_byte: '0'
33
+ lstring :endereco_complemento_cep, length: 3, pad_byte: '0'
34
+ string :endereco_estado, length: 2, pad_byte: ' '
36
35
 
37
- string :cnab_g004_2, :length => 8, :pad_byte => ' '
38
- string :ocorrencias, :length => 10, :pad_byte => ' '
36
+ string :cnab_g004_2, length: 8, pad_byte: ' '
37
+ string :ocorrencias, length: 10, pad_byte: ' '
39
38
 
40
39
  private
41
40
 
42
41
  def auto_fill
43
-
44
42
  end
45
43
  end
46
- end
44
+ end
@@ -1,18 +1,17 @@
1
1
  module Cnab240::V86::PagamentosTitulos
2
2
  class Trailer < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '5', pad_byte: '0'
9
8
 
10
- lstring :cnab_g004_1, :length => 9, :pad_byte => '0'
11
- lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- lstring :totais_valor, :length => 18, :pad_byte => '0'
13
- lstring :totais_qtde_moeda, :length => 18, :pad_byte => '0'
14
- lstring :numero_aviso_debito, :length => 6, :pad_byte => '0'
15
- string :cnab_g004_2, :length => 165, :pad_byte => ' '
16
- string :ocorrencias, :length => 10, :pad_byte => ' '
9
+ lstring :cnab_g004_1, length: 9, pad_byte: '0'
10
+ lstring :totais_qtde_registros, length: 6, pad_byte: '0'
11
+ lstring :totais_valor, length: 18, pad_byte: '0'
12
+ lstring :totais_qtde_moeda, length: 18, pad_byte: '0'
13
+ lstring :numero_aviso_debito, length: 6, pad_byte: '0'
14
+ string :cnab_g004_2, length: 165, pad_byte: ' '
15
+ string :ocorrencias, length: 10, pad_byte: ' '
17
16
  end
18
- end
17
+ end
@@ -1,18 +1,17 @@
1
1
  module Cnab240::V86::Pagamentos
2
2
  class Trailer < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '5', pad_byte: '0'
9
8
 
10
- lstring :cnab_g004_1, :length => 9, :pad_byte => '0'
11
- lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- lstring :totais_valor, :length => 18, :pad_byte => '0'
13
- lstring :totais_qtde_moeda, :length => 18, :pad_byte => '0'
14
- lstring :numero_aviso_debito, :length => 6, :pad_byte => '0'
15
- string :cnab_g004_2, :length => 165, :pad_byte => ' '
16
- string :ocorrencias, :length => 10, :pad_byte => ' '
9
+ lstring :cnab_g004_1, length: 9, pad_byte: '0'
10
+ lstring :totais_qtde_registros, length: 6, pad_byte: '0'
11
+ lstring :totais_valor, length: 18, pad_byte: '0'
12
+ lstring :totais_qtde_moeda, length: 18, pad_byte: '0'
13
+ lstring :numero_aviso_debito, length: 6, pad_byte: '0'
14
+ string :cnab_g004_2, length: 165, pad_byte: ' '
15
+ string :ocorrencias, length: 10, pad_byte: ' '
17
16
  end
18
- end
17
+ end
@@ -1,47 +1,45 @@
1
1
  module Cnab240::V86::PagamentosTributos
2
2
  class Header < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
9
-
10
- string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- lstring :servico_tipo, :length => 2, :pad_byte => '0'
12
- lstring :servico_forma, :length => 2, :pad_byte => '0'
13
- lstring :servico_layout, :length => 3, :initial_value => '011', :pad_byte => '0'
14
-
15
- string :cnab_g004_1, :length => 1, :pad_byte => ' '
16
-
17
- lstring :empresa_tipo, :length => 1, :pad_byte => '0'
18
- lstring :empresa_numero, :length => 14, :pad_byte => '0'
19
- string :empresa_convenio, :length => 20, :pad_byte => ' '
20
- lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
21
- string :empresa_agencia_dv, :length => 1, :pad_byte => '0'
22
- lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
23
- string :empresa_conta_dv, :length => 1, :pad_byte => '0'
24
- string :empresa_agencia_conta_dv, :length => 1, :pad_byte => '0'
25
- string :empresa_nome, :length => 30, :pad_byte => ' '
26
-
27
- string :informacao_1, :length => 40, :pad_byte => ' '
28
-
29
- string :endereco_logradouro, :length => 30, :pad_byte => ' '
30
- lstring :endereco_numero, :length => 5, :pad_byte => '0'
31
- string :endereco_complemento, :length => 15, :pad_byte => ' '
32
- string :endereco_cidade, :length => 20, :pad_byte => ' '
33
- lstring :endereco_cep, :length => 5, :pad_byte => '0'
34
- lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
35
- string :endereco_estado, :length => 2, :pad_byte => ' '
36
-
37
- lstring :indicativo_forma_pagamento, :length => 2, :pad_byte => '0'
38
- string :cnab_g004_2, :length => 6, :pad_byte => ' '
39
- string :ocorrencias, :length => 10, :pad_byte => ' '
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '1', pad_byte: '0'
8
+
9
+ string :servico_operacao, length: 1, initial_value: 'C', pad_byte: ' '
10
+ lstring :servico_tipo, length: 2, pad_byte: '0'
11
+ lstring :servico_forma, length: 2, pad_byte: '0'
12
+ lstring :servico_layout, length: 3, initial_value: '011', pad_byte: '0'
13
+
14
+ string :cnab_g004_1, length: 1, pad_byte: ' '
15
+
16
+ lstring :empresa_tipo, length: 1, pad_byte: '0'
17
+ lstring :empresa_numero, length: 14, pad_byte: '0'
18
+ string :empresa_convenio, length: 20, pad_byte: ' '
19
+ lstring :empresa_agencia_codigo, length: 5, pad_byte: '0'
20
+ string :empresa_agencia_dv, length: 1, pad_byte: '0'
21
+ lstring :empresa_conta_numero, length: 12, pad_byte: '0'
22
+ string :empresa_conta_dv, length: 1, pad_byte: '0'
23
+ string :empresa_agencia_conta_dv, length: 1, pad_byte: '0'
24
+ string :empresa_nome, length: 30, pad_byte: ' '
25
+
26
+ string :informacao_1, length: 40, pad_byte: ' '
27
+
28
+ string :endereco_logradouro, length: 30, pad_byte: ' '
29
+ lstring :endereco_numero, length: 5, pad_byte: '0'
30
+ string :endereco_complemento, length: 15, pad_byte: ' '
31
+ string :endereco_cidade, length: 20, pad_byte: ' '
32
+ lstring :endereco_cep, length: 5, pad_byte: '0'
33
+ lstring :endereco_complemento_cep, length: 3, pad_byte: '0'
34
+ string :endereco_estado, length: 2, pad_byte: ' '
35
+
36
+ lstring :indicativo_forma_pagamento, length: 2, pad_byte: '0'
37
+ string :cnab_g004_2, length: 6, pad_byte: ' '
38
+ string :ocorrencias, length: 10, pad_byte: ' '
40
39
 
41
40
  private
42
41
 
43
42
  def auto_fill
44
-
45
43
  end
46
44
  end
47
- end
45
+ end
@@ -1,17 +1,16 @@
1
1
  module Cnab240::V86::PagamentosTributos
2
2
  class Trailer < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '5', pad_byte: '0'
9
8
 
10
- lstring :cnab_g004_1, :length => 9, :pad_byte => '0'
11
- lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- lstring :totais_valor, :length => 18, :pad_byte => '0'
9
+ lstring :cnab_g004_1, length: 9, pad_byte: '0'
10
+ lstring :totais_qtde_registros, length: 6, pad_byte: '0'
11
+ lstring :totais_valor, length: 18, pad_byte: '0'
13
12
 
14
- string :complemento, :length => 189, :pad_byte => ' '
15
- string :ocorrencias, :length => 10, :pad_byte => ' '
13
+ string :complemento, length: 189, pad_byte: ' '
14
+ string :ocorrencias, length: 10, pad_byte: ' '
16
15
  end
17
- end
16
+ end
@@ -1,46 +1,44 @@
1
1
  module Cnab240::V87::Pagamentos
2
2
  class Header < BinData::Record
3
-
4
3
  include Cnab240::DefaultMixin
5
4
 
6
- lstring :controle_banco, :length => 3, :pad_byte => '0'
7
- lstring :controle_lote, :length => 4, :pad_byte => '0'
8
- lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
9
-
10
- string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- lstring :servico_tipo, :length => 2, :pad_byte => '0'
12
- lstring :servico_forma, :length => 2, :pad_byte => '0'
13
- lstring :servico_layout, :length => 3, :initial_value => '045', :pad_byte => '0'
14
- string :cnab_g004_1, :length => 1, :pad_byte => ' '
15
-
16
- lstring :empresa_tipo, :length => 1, :pad_byte => '0'
17
- lstring :empresa_numero, :length => 14, :pad_byte => '0'
18
- string :empresa_convenio, :length => 20, :pad_byte => ' '
19
- lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
20
- string :empresa_agencia_dv, :length => 1, :pad_byte => '0'
21
- lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
22
- string :empresa_conta_dv, :length => 1, :pad_byte => ' '
23
- string :empresa_agencia_conta_dv, :length => 1, :pad_byte => '0'
24
- string :empresa_nome, :length => 30, :pad_byte => ' '
25
-
26
- string :informacao_1, :length => 40, :pad_byte => ' '
27
-
28
- string :endereco_logradouro, :length => 30, :pad_byte => ' '
29
- lstring :endereco_numero, :length => 5, :pad_byte => '0'
30
- string :endereco_complemento, :length => 15, :pad_byte => ' '
31
- string :endereco_cidade, :length => 20, :pad_byte => ' '
32
- lstring :endereco_cep, :length => 5, :pad_byte => '0'
33
- lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
34
- string :endereco_estado, :length => 2, :pad_byte => ' '
35
-
36
- lstring :indicativo_forma_pagamento, :length => 2, :pad_byte => '0'
37
- string :cnab_g004_2, :length => 6, :pad_byte => ' '
38
- string :ocorrencias, :length => 10, :pad_byte => ' '
5
+ lstring :controle_banco, length: 3, pad_byte: '0'
6
+ lstring :controle_lote, length: 4, pad_byte: '0'
7
+ lstring :controle_registro, length: 1, initial_value: '1', pad_byte: '0'
8
+
9
+ string :servico_operacao, length: 1, initial_value: 'C', pad_byte: ' '
10
+ lstring :servico_tipo, length: 2, pad_byte: '0'
11
+ lstring :servico_forma, length: 2, pad_byte: '0'
12
+ lstring :servico_layout, length: 3, initial_value: '045', pad_byte: '0'
13
+ string :cnab_g004_1, length: 1, pad_byte: ' '
14
+
15
+ lstring :empresa_tipo, length: 1, pad_byte: '0'
16
+ lstring :empresa_numero, length: 14, pad_byte: '0'
17
+ string :empresa_convenio, length: 20, pad_byte: ' '
18
+ lstring :empresa_agencia_codigo, length: 5, pad_byte: '0'
19
+ string :empresa_agencia_dv, length: 1, pad_byte: '0'
20
+ lstring :empresa_conta_numero, length: 12, pad_byte: '0'
21
+ string :empresa_conta_dv, length: 1, pad_byte: ' '
22
+ string :empresa_agencia_conta_dv, length: 1, pad_byte: '0'
23
+ string :empresa_nome, length: 30, pad_byte: ' '
24
+
25
+ string :informacao_1, length: 40, pad_byte: ' '
26
+
27
+ string :endereco_logradouro, length: 30, pad_byte: ' '
28
+ lstring :endereco_numero, length: 5, pad_byte: '0'
29
+ string :endereco_complemento, length: 15, pad_byte: ' '
30
+ string :endereco_cidade, length: 20, pad_byte: ' '
31
+ lstring :endereco_cep, length: 5, pad_byte: '0'
32
+ lstring :endereco_complemento_cep, length: 3, pad_byte: '0'
33
+ string :endereco_estado, length: 2, pad_byte: ' '
34
+
35
+ lstring :indicativo_forma_pagamento, length: 2, pad_byte: '0'
36
+ string :cnab_g004_2, length: 6, pad_byte: ' '
37
+ string :ocorrencias, length: 10, pad_byte: ' '
39
38
 
40
39
  private
41
40
 
42
41
  def auto_fill
43
-
44
42
  end
45
43
  end
46
- end
44
+ end