enotas_nfe 0.0.28 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a2167ae8ac223d7ca1696571f9601bb9f5c70bd3d80cba765680ecb6fca357d
4
- data.tar.gz: a72c8f8fb555fd7216d4150652f17b2075cca46caf1b4e710bf4010b56277ff1
3
+ metadata.gz: 5019961f0f1ffbe02b643cbc42148d4ec5ae581be9e97695a8c274af5fb5fbe6
4
+ data.tar.gz: 5f4483550af091128717ce71febaaf6d22a9b2cd89d7529b0f51fae0d372ca08
5
5
  SHA512:
6
- metadata.gz: 90988ffd7be82b680a1e35a2f805de226fd7dba7ca42d35f0dfbe685a309a08df693bbca5a133507d764b47a6c49f51a762d366733ff77a54a576888697122e1
7
- data.tar.gz: b7981934fe128144c92c46ef7ed50d18374b1d5afc51d7524d26f840f488470340596dab76f733ce2ff6653969ca46e9f9a3ae4adc6a0bbab5f79c0c7e09fed5
6
+ metadata.gz: 8533551e6d1f6a0c0b137ec2e23dd6d8f0bd864fbdf97e29ffe71bf914e4a461a7bd39e178888d6aa7421aea7e16b88cb73de4f0915610de7ad398807864a0be
7
+ data.tar.gz: eaa60317cef59d5cbe7c40c5ff3cd5e6c0dc0dba5699647e5042d127cfb472c124955727b456d216b051e371db7aa5129944b3ce3485acdd87d1f4ba4743614c
@@ -44,6 +44,8 @@ require "enotas_nfe/model/combustivel"
44
44
  require "enotas_nfe/model/impostos"
45
45
  require "enotas_nfe/model/issqn"
46
46
  require "enotas_nfe/model/pis"
47
+ require "enotas_nfe/model/metadados"
48
+ require "enotas_nfe/model/cidade_prestacao"
47
49
  require "enotas_nfe/facades"
48
50
  require "enotas_nfe/client"
49
51
 
@@ -11,7 +11,8 @@ module EnotasNfe
11
11
  "Accept": "application/json",
12
12
  "User-Agent": "Enotas ruby client"
13
13
  },
14
- url: endpoint
14
+ url: endpoint,
15
+ ssl: {verify: false}
15
16
  }
16
17
 
17
18
  Faraday.new(options) do |connection|
@@ -27,6 +27,14 @@ module EnotasNfe
27
27
  get("estados/cidades/#{codigo_ibge_cidade}/provedor")
28
28
  end
29
29
 
30
+ def desabilitar_empresa(firm_id)
31
+ post("empresas/#{firm_id}/desabilitar")
32
+ end
33
+
34
+ def habilitar_empresa(firm_id)
35
+ post("empresas/#{firm_id}/habilitar")
36
+ end
37
+
30
38
  ## rota para carta de correcao
31
39
  def cc_create(firm_id, body)
32
40
  post("empresas/#{firm_id}/nf-e/cartaCorrecao", body)
@@ -0,0 +1,16 @@
1
+ module EnotasNfe
2
+ module Model
3
+ class CidadePrestacao
4
+
5
+ include Virtus.model
6
+
7
+ attribute :siglaUF, String
8
+ attribute :municipio, String
9
+ attribute :logradouro, String
10
+ attribute :numero, String
11
+ attribute :bairro, String
12
+ attribute :cep, String
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ module EnotasNfe
2
+ module Model
3
+ class Metadados
4
+
5
+ include Virtus.model
6
+ require "enotas_nfe/model/cidade_prestacao"
7
+
8
+ attribute :cidadeprestacao, CidadePrestacao
9
+
10
+ end
11
+ end
12
+ end
@@ -3,11 +3,14 @@ module EnotasNfe
3
3
  class Nfe
4
4
 
5
5
  include Virtus.model
6
+ require "enotas_nfe/model/metadados"
6
7
 
7
8
  attribute :id, String
8
9
  attribute :numero, Integer
9
10
  attribute :serie, String
10
11
  attribute :enviarPorEmail, Boolean
12
+ attribute :numeroRps, Integer
13
+ attribute :serieRps, String
11
14
  attribute :ambienteEmissao, String
12
15
  attribute :dataCompetencia, String
13
16
  attribute :dataEmissao, String
@@ -32,6 +35,7 @@ module EnotasNfe
32
35
  attribute :nfeReferenciada, Array
33
36
  attribute :transporte, Transporte
34
37
  attribute :observacoes, String
38
+ attribute :metadados, Metadados
35
39
 
36
40
  end
37
41
  end
@@ -23,7 +23,7 @@ module EnotasNfe
23
23
  def request_multipart(path, body)
24
24
  response = connection.post do |request|
25
25
  multipart_body = {}
26
- multipart_body["arquivo"] = Faraday::UploadIO.new(body[:arquivo].tempfile, "application/x-pkcs12")
26
+ multipart_body["arquivo"] = Faraday::UploadIO.new(body[:arquivo], "application/x-pkcs12")
27
27
  multipart_body["senha"] = body[:senha]
28
28
 
29
29
  request.path = path
@@ -1,3 +1,3 @@
1
1
  module EnotasNfe
2
- VERSION = "0.0.28"
2
+ VERSION = "0.0.33"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enotas_nfe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Fernando Pimenta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2021-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '12.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '12.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -135,6 +135,7 @@ files:
135
135
  - lib/enotas_nfe/model/caracteristica_prefeitura.rb
136
136
  - lib/enotas_nfe/model/carta_correcao.rb
137
137
  - lib/enotas_nfe/model/certificado_digital.rb
138
+ - lib/enotas_nfe/model/cidade_prestacao.rb
138
139
  - lib/enotas_nfe/model/cide.rb
139
140
  - lib/enotas_nfe/model/cliente.rb
140
141
  - lib/enotas_nfe/model/cofins.rb
@@ -153,6 +154,7 @@ files:
153
154
  - lib/enotas_nfe/model/icms.rb
154
155
  - lib/enotas_nfe/model/impostos.rb
155
156
  - lib/enotas_nfe/model/issqn.rb
157
+ - lib/enotas_nfe/model/metadados.rb
156
158
  - lib/enotas_nfe/model/nfe.rb
157
159
  - lib/enotas_nfe/model/nfe_referenciada.rb
158
160
  - lib/enotas_nfe/model/pagamento.rb
@@ -188,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
190
  - !ruby/object:Gem::Version
189
191
  version: '0'
190
192
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.7.6
193
+ rubygems_version: 3.1.2
193
194
  signing_key:
194
195
  specification_version: 4
195
196
  summary: E-Notas nfe