sefaz 0.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +121 -0
  4. data/Gemfile.lock +77 -20
  5. data/README.md +449 -17
  6. data/Rakefile +1 -0
  7. data/docs/CFe-SAT/Especificacao_SAT_v_ER_2_30_03.pdf +0 -0
  8. data/docs/CFe-SAT/Manual_Orientacao_SAT_v_MO_2_19_04.pdf +0 -0
  9. data/docs/CFe-SAT/Manual_do_Emulador_SAT-CF-e_Offline_2015_09_10.pdf +0 -0
  10. data/docs/CFe-SAT/_CANCEL_dataset.md +14 -0
  11. data/docs/CFe-SAT/_SALE_dataset.md +171 -0
  12. data/docs/CFe-SAT/emulador_off_line_v2_9_4.zip +0 -0
  13. data/docs/NFe-NFCe/ANEXO I - Leiaute e Regra de Valida/303/247/303/243o - NF-e e NFC-e.pdf +0 -0
  14. data/docs/NFe-NFCe/ANEXO II -Manual Especifica/303/247/303/265esT/303/251cnicas - Danfe-C/303/263digo-Barras.pdf +0 -0
  15. data/docs/NFe-NFCe/Anexo III - Manual de Conting/303/252ncia - NF-e.pdf +0 -0
  16. data/docs/NFe-NFCe/Anexo IV - Manual de Conting/303/252ncia - NFC-e.pdf +0 -0
  17. data/docs/NFe-NFCe/Manual de Orienta/303/247/303/243o ao Contribuinte - MOC - vers/303/243o 7.0 - NF-e e NFC-e.pdf +0 -0
  18. data/docs/NFe-NFCe/_dataset.md +819 -0
  19. data/lib/sefaz/assets/NFe_logo.png +0 -0
  20. data/lib/sefaz/base.rb +11 -0
  21. data/lib/sefaz/configuration.rb +66 -0
  22. data/lib/sefaz/exception.rb +14 -0
  23. data/lib/sefaz/refinement.rb +91 -0
  24. data/lib/sefaz/utils/connection.rb +35 -0
  25. data/lib/sefaz/utils/prawn_helper.rb +49 -0
  26. data/lib/sefaz/utils/signer.rb +122 -0
  27. data/lib/sefaz/version.rb +1 -1
  28. data/lib/sefaz/webservice/base.rb +13 -0
  29. data/lib/sefaz/webservice/nfe/auditor.rb +35 -0
  30. data/lib/sefaz/webservice/nfe/client.rb +471 -0
  31. data/lib/sefaz/webservice/nfe/connection.rb +17 -0
  32. data/lib/sefaz/webservice/nfe/dataset.rb +451 -0
  33. data/lib/sefaz/webservice/nfe/templates/base.rb +32 -0
  34. data/lib/sefaz/webservice/nfe/templates/evento_cancelamento.rb +48 -0
  35. data/lib/sefaz/webservice/nfe/templates/evento_carta_correcao.rb +54 -0
  36. data/lib/sefaz/webservice/nfe/templates/evento_inutilizacao.rb +22 -0
  37. data/lib/sefaz/webservice/nfe/validator.rb +63 -0
  38. data/lib/sefaz/webservice/nfe/wsdl.rb +117 -0
  39. data/lib/sefaz/webservice/sat/client.rb +44 -0
  40. data/lib/sefaz/webservice/sat/dataset/cancel.rb +34 -0
  41. data/lib/sefaz/webservice/sat/dataset/sale.rb +176 -0
  42. data/lib/sefaz/webservice/sat/templates/base.rb +54 -0
  43. data/lib/sefaz/webservice/sat/templates/cupom_fiscal_55mm.rb +307 -0
  44. data/lib/sefaz/webservice/sat/templates/cupom_fiscal_80mm.rb +307 -0
  45. data/lib/sefaz.rb +51 -3
  46. data/sefaz.gemspec +6 -3
  47. metadata +103 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e50954f984ef9cb4488133faf08624b78e856bfd3a530cbce6ce3416312ea4b9
4
- data.tar.gz: e73a3ee6ac1e31057dc006e0a75bfafab3a1b120e54f3ac02456bf93ad601126
3
+ metadata.gz: 04c3cf85140dd666271ed23c39ef684e18f6d4669467122299dd40b46589697f
4
+ data.tar.gz: d5c5bb5290fae72d8703ed030d0cc27c236279fc358537643e9822e591672d94
5
5
  SHA512:
6
- metadata.gz: 704b0d73e868cfcfdf04ca0686f01eb20ded426e9b62933b1e19358cbc195e54c4967fb813801565f89215e9e257db0386450de1e9c713be2884f0113dcef440
7
- data.tar.gz: 1eceaf647e0821e8b7564676a5a9e484c5002e790544c514fe97883403158d114865a9e89a094911d40d0218e9205fa94aaf483d13722f38871dc728806f62b2
6
+ metadata.gz: 5cb0e73dcbb8e1aa1d8fde63f6e52dcc33ecf0d6708e83f6ac749050d296724651b8e90a343e6eb9d3ab6ca11d1a57d6408eb6015220d3546817e048b2cf7f86
7
+ data.tar.gz: 70d0f91ff430e5be49df9243e525b4ee17ca59abc6a244a7cba455c6f6b7bd35b121bc23f5d2365de73926b440e1f91bb728b2481b5d30da1ecbf53ea26bb765
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,126 @@
1
+ # CHANGELOG
2
+
1
3
  ## [Unreleased]
2
4
 
5
+ - ConsultarGTIN service
6
+ - consultarDistribuicaoDFe service
7
+ - consultarDistribuicaoDFeChave service
8
+ - enviarManifestacao service
9
+ - exportarManifestacao service
10
+
11
+ ## [1.4.0] - 2025-09-30
12
+
13
+ - Adding export pdf file for enviarNF(DANFE), cancelarNF, enviarCCe and inutilizarNF
14
+ - Fixing Dataset Structs and prawn warning
15
+ - Changing ruby version
16
+
17
+ ## [1.3.0] - 2024-02-29
18
+
19
+ - Adding SEFAZ::Utils::PrawnHelper with utils methods for Prawn
20
+ - Adding layout CupomFiscal55mm/CupomFiscal80mm
21
+ - Adding base class to unify printing
22
+ - Adding SEFAZ::Webservice::SAT::Client with exportarCF method
23
+ - Adding new configuration field
24
+ - Adding new exception (ValidationError)
25
+ - Adding new refinement (mask!, to_number, numeric?, to_currency, with_delimiter and with_precision)
26
+ - Adding prawn gem
27
+ - Adding barby gem (with dependencies rqrcode)
28
+ - Organizing tests (CFe/NFe and fixtures with examples/results)
29
+
30
+ ## [1.2.0] - 2024-02-24
31
+
32
+ - Adding SEFAZ::Webservice::SAT::Dataset::Cancel to cancel XML (CFe-SAT)
33
+
34
+ ## [1.1.0] - 2024-02-23
35
+
36
+ - Adding SEFAZ::Webservice::SAT::Dataset::Sale to sale XML (CFe-SAT)
37
+
38
+ ## [1.0.0] - 2024-02-23
39
+
40
+ - Major update: Redesign and improvements to the library
41
+
42
+ ## [0.9.0] - 2023-03-22
43
+
44
+ - Adding SEFAZ::DataSet::NFE object
45
+ - Adding enviarNF service
46
+ - Adding enviarLoteNF service
47
+ - Adding calculaChaveNF service
48
+ - Changed: method 'gerarInfRespTec' accepting XML or HASH
49
+
50
+ ## [0.8.0] - 2023-01-16
51
+
52
+ - Adding enviarCCe service
53
+ - Adding exportarCCe service
54
+
55
+ ## [0.7.0] - 2023-01-16
56
+
57
+ - Adding enviarEvento service
58
+ - Adding enviarLoteDeEvento service
59
+ - Adding cancelarNF service
60
+ - Adding exportarCancelarNF service
61
+ - Adding gerarLeiauteEvento method
62
+ - Adding global issuer CNPJ
63
+ - Fix: method name 'exportarDados'/'enviarDados' to 'exportar'/'enviar'
64
+
65
+ ## [0.6.2] - 2023-01-14
66
+
67
+ - Fix: turn off warnings when run test
68
+ - Fix: wrong comments
69
+ - Changed: require ruby version 2.6.0 to 2.5.1 (downgrade)
70
+
71
+ ## [0.6.1] - 2023-01-14
72
+
73
+ - Fix: fixing wrong signature
74
+
75
+ ## [0.6.0] - 2023-01-12
76
+
77
+ - Adding technical manager section
78
+ - Adding assinarNF service
79
+ - Adding inutilizarNF service
80
+ - Adding calculaChaveInutilizacao service
81
+ - Adding exportarInutilizarNF service
82
+ - Adding enviarInutilizarNF service
83
+ - Adding validarNF service (<https://www.sefaz.rs.gov.br/NFE/NFE-VAL.aspx>)
84
+ - Adding auditarNF service (<https://validador.nfe.tecnospeed.com.br/>)
85
+ - Adding gerarDANFE service (<https://www.freenfe.com.br/leitor-de-xml-online>)
86
+ - Changed: README.md
87
+
88
+ ## [0.5.1] - 2023-01-12
89
+
90
+ - Adding helper method (SEFAZ.toXML(@hash), SEFAZ.toHASH(@xml))
91
+ - Allowing to services return XML and HASH
92
+ - Allowing to SEFAZ::Utils::Connection#call return response object
93
+ - Fix: Globals variables
94
+ - Fix: Response Savon :LowerCamelCase to :None
95
+ - Changed: README.md
96
+
97
+ ## [0.5.0] - 2023-01-11
98
+
99
+ - consultarRecibo service
100
+
101
+ ## [0.4.1] - 2023-01-11
102
+
103
+ - Adding README.md
104
+ - Allowing to set PFX transmission and signature
105
+ - Fix: Nomenclatures
106
+ - Fix: Organizations
107
+ - Fix: WSDL Service returning only URL
108
+
109
+ ## [0.4.0] - 2023-01-11
110
+
111
+ - Adding consultarNF service
112
+ - Adding consultarCadastro service
113
+
114
+ ## [0.3.1] - 2023-01-10
115
+
116
+ - Fix: Connection bug with xmlns attribute
117
+
118
+ ## [0.3.0] - 2023-01-10
119
+
120
+ - Adding WSDL manager
121
+ - Adding Connection manager
122
+ - Adding module NFE with 'connected?' and 'statusDoServico' service
123
+
3
124
  ## [0.2.0] - 2023-01-10
4
125
 
5
126
  - Adding savon gem
data/Gemfile.lock CHANGED
@@ -1,48 +1,100 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sefaz (0.2.0)
4
+ sefaz (1.4.0)
5
+ barby (~> 0.6.8)
6
+ br_danfe (~> 0.17.8)
7
+ prawn (~> 2.4.0)
8
+ rqrcode (~> 2.1.0)
5
9
  savon (~> 2.13.0)
6
10
 
7
11
  GEM
8
12
  remote: https://rubygems.org/
9
13
  specs:
10
- addressable (2.8.1)
11
- public_suffix (>= 2.0.2, < 6.0)
12
- akami (1.3.1)
14
+ activemodel (7.1.5.2)
15
+ activesupport (= 7.1.5.2)
16
+ activesupport (7.1.5.2)
17
+ base64
18
+ benchmark (>= 0.3)
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ logger (>= 1.4.2)
25
+ minitest (>= 5.1)
26
+ mutex_m
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0)
29
+ addressable (2.8.7)
30
+ public_suffix (>= 2.0.2, < 7.0)
31
+ akami (1.3.2)
13
32
  gyoku (>= 0.4.0)
14
33
  nokogiri
15
- builder (3.2.4)
16
- date (3.3.3)
34
+ barby (0.6.8)
35
+ base64 (0.3.0)
36
+ benchmark (0.4.1)
37
+ bigdecimal (3.1.9)
38
+ br_danfe (0.17.8)
39
+ barby (= 0.6.8)
40
+ br_documents (>= 0.1.3)
41
+ i18n (>= 0.8.6)
42
+ nokogiri (>= 1.8)
43
+ prawn (~> 2.4.0)
44
+ prawn-table (= 0.2.2)
45
+ rqrcode (~> 2.1.0)
46
+ br_documents (0.2.5)
47
+ activemodel (>= 4.0.0)
48
+ i18n (>= 0.6.5)
49
+ builder (3.3.0)
50
+ chunky_png (1.4.0)
51
+ concurrent-ruby (1.3.5)
52
+ connection_pool (2.5.4)
53
+ date (3.4.1)
54
+ drb (2.2.3)
17
55
  gyoku (1.4.0)
18
56
  builder (>= 2.1.2)
19
57
  rexml (~> 3.0)
20
58
  httpi (3.0.1)
21
59
  rack
22
- mail (2.8.0)
60
+ i18n (1.14.7)
61
+ concurrent-ruby (~> 1.0)
62
+ logger (1.7.0)
63
+ mail (2.8.1)
23
64
  mini_mime (>= 0.1.1)
24
65
  net-imap
25
66
  net-pop
26
67
  net-smtp
27
- mini_mime (1.1.2)
28
- minitest (5.15.0)
29
- net-imap (0.3.4)
68
+ mini_mime (1.1.5)
69
+ minitest (5.25.5)
70
+ mutex_m (0.3.0)
71
+ net-imap (0.4.19)
30
72
  date
31
73
  net-protocol
32
74
  net-pop (0.1.2)
33
75
  net-protocol
34
- net-protocol (0.2.1)
76
+ net-protocol (0.2.2)
35
77
  timeout
36
- net-smtp (0.3.3)
78
+ net-smtp (0.5.1)
37
79
  net-protocol
38
- nokogiri (1.13.10-x86_64-linux)
80
+ nokogiri (1.15.7-x86_64-linux)
39
81
  racc (~> 1.4)
40
82
  nori (2.6.0)
41
- public_suffix (5.0.1)
42
- racc (1.6.2)
43
- rack (3.0.3)
44
- rake (13.0.6)
45
- rexml (3.2.5)
83
+ pdf-core (0.9.0)
84
+ prawn (2.4.0)
85
+ pdf-core (~> 0.9.0)
86
+ ttfunk (~> 1.7)
87
+ prawn-table (0.2.2)
88
+ prawn (>= 1.3.0, < 3.0.0)
89
+ public_suffix (5.1.1)
90
+ racc (1.8.1)
91
+ rack (3.1.12)
92
+ rake (13.2.1)
93
+ rexml (3.4.1)
94
+ rqrcode (2.1.2)
95
+ chunky_png (~> 1.0)
96
+ rqrcode_core (~> 1.0)
97
+ rqrcode_core (1.2.0)
46
98
  savon (2.13.1)
47
99
  akami (~> 1.2)
48
100
  builder (>= 2.1.2)
@@ -52,7 +104,12 @@ GEM
52
104
  nokogiri (>= 1.8.1)
53
105
  nori (~> 2.4)
54
106
  wasabi (~> 3.4)
55
- timeout (0.3.1)
107
+ securerandom (0.3.2)
108
+ timeout (0.4.3)
109
+ ttfunk (1.8.0)
110
+ bigdecimal (~> 3.1)
111
+ tzinfo (2.0.6)
112
+ concurrent-ruby (~> 1.0)
56
113
  wasabi (3.8.0)
57
114
  addressable
58
115
  httpi (~> 3.0)
@@ -67,4 +124,4 @@ DEPENDENCIES
67
124
  sefaz!
68
125
 
69
126
  BUNDLED WITH
70
- 2.3.26
127
+ 2.4.22