Afip 0.8.7 → 0.8.8

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: f38c5d249e07d139a44b89411affbde3b26f350047ec158cb3d40e200e186235
4
- data.tar.gz: 7c07f89926ae9ca1c62c450586feb6e7ba01caf7bd1b1e62571a548097063cd6
3
+ metadata.gz: e638ff3e118035bf03e12288830d1f483324e1ff35add99a53a1cd73aebea6b2
4
+ data.tar.gz: 85159b29102db44d6976f7becc4c3f09c6e9e33a2200b3af705521c894fda1f3
5
5
  SHA512:
6
- metadata.gz: aa409090e458ec9a7b2f77bda111a0b39bd03ff1ee62988a40115df2a756ab02d2051ee56914a0079da3d86141b0137f03efbca60f9cb373d2f4db97e36a6633
7
- data.tar.gz: 38337f51436a8e0c54b4be71ec7a713d1d46b5068cb99e7112018c8578c40f4f356d3ccd2e6d72309c99b12cae4192b10ab8a384b8d3912e13849a147c755867
6
+ metadata.gz: c26b2bc7dc4b89416f2491fbdd31c6df19944f8741a64775b56add16e1d95d9ae5824d3f409eb75da2df69b6c820087c0ea532c8e426cd0263a2dbca439937a4
7
+ data.tar.gz: 8d151093f45a682d8deda68b2d7555ae571aac0fdcdc2c6122cb72adc12a1e164253c248bac3cb59b520fc7f97c92d7863c82eb30490e10f5d7e07466953b3e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Afip (0.8.6)
4
+ Afip (0.8.7)
5
5
  httpi
6
6
  savon
7
7
 
data/lib/Afip/bill.rb CHANGED
@@ -43,6 +43,17 @@ module Afip
43
43
  end
44
44
  end
45
45
 
46
+ def self.get_tributos
47
+ client = set_client
48
+ body = { "Auth" => Afip.auth_hash }
49
+ response = client.call(:fe_param_get_tipos_tributos, message: body)
50
+ if response.body[:fe_param_get_tipos_tributos_response][:fe_param_get_tipos_tributos_result][:errors].nil?
51
+ response.body[:fe_param_get_tipos_tributos_response][:fe_param_get_tipos_tributos_result][:result_get][:tributo_tipo]
52
+ else
53
+ []
54
+ end
55
+ end
56
+
46
57
  def self.set_client
47
58
  Afip::AuthData.fetch
48
59
  @client = Savon.client(
@@ -123,6 +134,7 @@ module Afip
123
134
  if !tributos.empty?
124
135
  detail["Tributos"] = { array_tributos }
125
136
  end
137
+
126
138
  unless concepto == "Productos" # En "Productos" ("01"), si se mandan estos parámetros la afip rechaza.
127
139
  detail.merge!({"FchServDesde" => fch_serv_desde.strftime("%Y%m%d"),
128
140
  "FchServHasta" => fch_serv_hasta.strftime("%Y%m%d"),
data/lib/Afip/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Afip
2
- VERSION = "0.8.7"
2
+ VERSION = "0.8.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Afip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez