dfe-taxweb 0.1.11 → 0.1.12

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: 246d341b90731663449f18d293b589658f5931ba88e8e87c856f7a7fc5b10dee
4
- data.tar.gz: e78718e2068f374b338ced6ea930f055eec5bad6642dea11b55d41d70d534088
3
+ metadata.gz: 050c17a99ab7aa91277f9458431a52f9777d65643dd13b6bea27da90d91a4520
4
+ data.tar.gz: f66e3d59a97ca347789352fc13f8c17ff0bb5440bcab362bf9acb0b1daf45ede
5
5
  SHA512:
6
- metadata.gz: f15d74fcb0963fd019aef9ba3d6fefe4b3ba2182e314be5221a2a40721c40d3820ca396b91bf2f5007a519d52465a6e0588c0421aaf30ee7b89c7efcd352c64a
7
- data.tar.gz: 953f2c980f4b63853b644b7971b93f077f35dfc2bbb70421e5057b9cd3496fb9741324013ebed45a64bdf534ce40646ef080e746557604924938cc110c3ffa79
6
+ metadata.gz: 139894500ac71564dbaf4376d62b6987b2d990340157102e7f977335612d13fd1b20fa6f6beb60bf08121b0edc86e9a74e6ea843c8b8c22d3488f5e823600323
7
+ data.tar.gz: 2d7e5966bb6b8361ae81495faa1fd942ed3004703845de82a4ab2dc103a26ec6683d320a8c0b0a3aef3ee08b1ff59b686a1db6b35fbc12adf4e04cbdf80f0650
@@ -44,8 +44,8 @@ module DfeTaxweb
44
44
  indConsumidorFinal: (inf_nfe.atributo('ide.indFinal') == '1' ? 'S' : 'N'),
45
45
  emitente: emitente,
46
46
  destinatario: destinatario,
47
- retirada: retirada,
48
- entrega: entrega,
47
+ retirada: inf_nfe.atributo('retirada').to_h,
48
+ entrega: inf_nfe.atributo('entrega').to_h,
49
49
  itensDocFiscal: itens,
50
50
  tipoOperacao: tipo_de_operacao,
51
51
  tpDocFiscal: 'FT',
@@ -111,14 +111,6 @@ module DfeTaxweb
111
111
  }.compact
112
112
  end
113
113
 
114
- def retirada
115
- inf_nfe.atributo('retirada').to_h
116
- end
117
-
118
- def entrega
119
- inf_nfe.atributo('entrega').to_h
120
- end
121
-
122
114
  def itens
123
115
  itens = inf_nfe.atributo('det')
124
116
  itens = [itens] unless itens.is_a?(Array)
@@ -1,3 +1,3 @@
1
1
  module DfeTaxweb
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
@@ -46,8 +46,6 @@ describe DfeTaxweb::Nfe do
46
46
  expect(subject).to receive(:tipo_de_operacao).and_return(nil)
47
47
  expect(subject).to receive(:emitente).and_return({})
48
48
  expect(subject).to receive(:destinatario).and_return({})
49
- expect(subject).to receive(:retirada).and_return({})
50
- expect(subject).to receive(:entrega).and_return({})
51
49
  expect(subject).to receive(:itens).and_return([])
52
50
  documento = subject.mapear_documento
53
51
  expect(documento).to be_a(Hash)
@@ -81,26 +79,6 @@ describe DfeTaxweb::Nfe do
81
79
  end
82
80
  end
83
81
 
84
- describe "#retirada" do
85
- it "retorna o hash de retirada" do
86
- expect(subject).to receive_message_chain(:inf_nfe).and_return(DfeTaxweb::Conjunto.new({retirada: {fake: true}}))
87
- expect(subject.retirada).to be_a(DfeTaxweb::Conjunto)
88
- end
89
- it "retorna nil quando não há retirada" do
90
- expect(subject.retirada).to be_nil
91
- end
92
- end
93
-
94
- describe "#entrega" do
95
- it "retorna o hash de entrega" do
96
- expect(subject).to receive(:inf_nfe).and_return(DfeTaxweb::Conjunto.new({entrega: {fake: true}}))
97
- expect(subject.entrega).to be_a(DfeTaxweb::Conjunto)
98
- end
99
- it "retorna nil quando não há entrega" do
100
- expect(subject.retirada).to be_nil
101
- end
102
- end
103
-
104
82
  describe "#itens" do
105
83
  it "retorna o hash de entrega" do
106
84
  expect(subject).to receive(:inf_nfe).and_return(DfeTaxweb::Conjunto.new({det: [{prod: {fake: true}}]}))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dfe-taxweb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Porto