afipws 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- afipws (0.1.2)
4
+ afipws (0.1.3)
5
5
  activesupport
6
6
  builder
7
7
  httpclient
@@ -1,3 +1,3 @@
1
1
  module Afipws
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/afipws/wsfe.rb CHANGED
@@ -110,6 +110,10 @@ module Afipws
110
110
  x2r r, :cbte_nro => :integer, :code => :integer
111
111
  end
112
112
 
113
+ def informar_caea_sin_movimientos caea, pto_vta
114
+ @client.fecaea_sin_movimiento_informar(auth.merge('CAEA' => caea, 'PtoVta' => pto_vta))
115
+ end
116
+
113
117
  def ultimo_comprobante_autorizado opciones
114
118
  @client.fe_comp_ultimo_autorizado(auth.merge(opciones))[:cbte_nro].to_i
115
119
  end
@@ -118,7 +122,7 @@ module Afipws
118
122
  @client.fe_comp_consultar(auth.merge(opciones))[:result_get]
119
123
  end
120
124
 
121
- def cant_max_registros_x_request
125
+ def cant_max_registros_x_lote
122
126
  @client.fe_comp_tot_x_request(auth)[:reg_x_req].to_i
123
127
  end
124
128
 
@@ -63,9 +63,9 @@ describe Afipws::WSFE do
63
63
  end
64
64
  end
65
65
 
66
- it "cant_max_registros_x_request" do
66
+ it "cant_max_registros_x_lote" do
67
67
  savon.expects('FECompTotXRequest').with(has_path '/Auth/Token' => 't').returns(:success)
68
- ws.cant_max_registros_x_request.should == 250
68
+ ws.cant_max_registros_x_lote.should == 250
69
69
  end
70
70
 
71
71
  context "autorizar_comprobante" do
@@ -190,6 +190,13 @@ describe Afipws::WSFE do
190
190
  rta[1].should have_entries :cbte_nro => 2, :caea => '21043476341977', :resultado => 'R', :observaciones => [{:code => 724, :msg => 'Msg'}]
191
191
  end
192
192
 
193
+ it "informar_caea_sin_movimientos" do
194
+ savon.expects('FECAEASinMovimientoInformar').with(has_path('/Auth/Token' => 't',
195
+ '/PtoVta' => 4, '/CAEA' => '21043476341977')).returns(:success)
196
+ rta = ws.informar_caea_sin_movimientos('21043476341977', 4)
197
+ rta.should have_entries :caea => '21043476341977', :resultado => 'A'
198
+ end
199
+
193
200
  context "consultar_caea" do
194
201
  it "consultar_caea" do
195
202
  savon.expects('FECAEAConsultar').with(has_path '/Periodo' => '201101', '/Orden' => 1).returns(:success)
@@ -0,0 +1,12 @@
1
+ <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
2
+ <soap:Body>
3
+ <FECAEASinMovimientoInformarResponse xmlns="http://ar.gov.afip.dif.FEV1/">
4
+ <FECAEASinMovimientoInformarResult>
5
+ <CAEA>21043476341977</CAEA>
6
+ <FchProceso>20110202</FchProceso>
7
+ <PtoVta>3</PtoVta>
8
+ <Resultado>A</Resultado>
9
+ </FECAEASinMovimientoInformarResult>
10
+ </FECAEASinMovimientoInformarResponse>
11
+ </soap:Body>
12
+ </soap:Envelope>
data/spec/manual/test.rb CHANGED
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  def autorizar_comprobante ws
22
22
  ultimo = ws.ultimo_comprobante_autorizado :pto_vta => 1, :cbte_tipo => 1
23
- # cant_informar = ws.cant_max_registros_x_request
23
+ # cant_informar = ws.cant_max_registros_x_lote
24
24
  cant_informar = 2
25
25
  puts "Informando #{cant_informar} comprobantes"
26
26
  comprobantes = (1..cant_informar).to_a.map do |i|
@@ -41,4 +41,4 @@ def soap_actions ws
41
41
  ws.client.soap_actions
42
42
  end
43
43
 
44
- p ws.tipos_comprobantes
44
+ obtener_ta ws
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Emmanuel Nicolau
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-31 00:00:00 -03:00
17
+ date: 2011-02-02 00:00:00 -03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -188,6 +188,7 @@ files:
188
188
  - spec/fixtures/fecae_solicitar/una_observacion.xml
189
189
  - spec/fixtures/fecaea_consultar/success.xml
190
190
  - spec/fixtures/fecaea_reg_informativo/informe_rtdo_parcial.xml
191
+ - spec/fixtures/fecaea_sin_movimiento_informar/success.xml
191
192
  - spec/fixtures/fecaea_solicitar/caea_ya_otorgado.xml
192
193
  - spec/fixtures/fecaea_solicitar/error_distinto.xml
193
194
  - spec/fixtures/fecaea_solicitar/success.xml
@@ -214,7 +215,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
215
  requirements:
215
216
  - - ">="
216
217
  - !ruby/object:Gem::Version
217
- hash: 1974779118108151094
218
+ hash: 2410002717626230803
218
219
  segments:
219
220
  - 0
220
221
  version: "0"
@@ -223,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
224
  requirements:
224
225
  - - ">="
225
226
  - !ruby/object:Gem::Version
226
- hash: 1974779118108151094
227
+ hash: 2410002717626230803
227
228
  segments:
228
229
  - 0
229
230
  version: "0"
@@ -261,6 +262,7 @@ test_files:
261
262
  - spec/fixtures/fecae_solicitar/una_observacion.xml
262
263
  - spec/fixtures/fecaea_consultar/success.xml
263
264
  - spec/fixtures/fecaea_reg_informativo/informe_rtdo_parcial.xml
265
+ - spec/fixtures/fecaea_sin_movimiento_informar/success.xml
264
266
  - spec/fixtures/fecaea_solicitar/caea_ya_otorgado.xml
265
267
  - spec/fixtures/fecaea_solicitar/error_distinto.xml
266
268
  - spec/fixtures/fecaea_solicitar/success.xml