Module: Snoopy
- Extended by:
- Snoopy
- Included in:
- Snoopy
- Defined in:
- lib/snoopy_afip.rb,
lib/snoopy_afip/bill.rb,
lib/snoopy_afip/client.rb,
lib/snoopy_afip/version.rb,
lib/snoopy_afip/constants.rb,
lib/snoopy_afip/exceptions.rb,
lib/snoopy_afip/authorize_adapter.rb,
lib/snoopy_afip/authentication_adapter.rb
Defined Under Namespace
Modules: Exception Classes: AuthenticationAdapter, AuthorizeAdapter, Bill, Client
Constant Summary collapse
- VERSION =
"4.2.2"- CBTE_TYPE =
{ '01' => 'Factura A', '02' => 'Nota de Débito A', '03' => 'Nota de Crédito A', '04' => 'Recibos A', '05' => 'Notas de Venta al contado A', '06' => 'Factura B', '07' => 'Nota de Debito B', '08' => 'Nota de Credito B', '09' => 'Recibos B', '10' => 'Notas de Venta al contado B', '11' => 'Factura C', '13' => 'Nota de Crédito C', '34' => 'Cbtes. A del Anexo I, Apartado A,inc.f),R.G.Nro. 1415', '35' => 'Cbtes. B del Anexo I,Apartado A,inc. f),R.G. Nro. 1415', '39' => 'Otros comprobantes A que cumplan con R.G.Nro. 1415', '40' => 'Otros comprobantes B que cumplan con R.G.Nro. 1415', '60' => 'Cta de Vta y Liquido prod. A', '61' => 'Cta de Vta y Liquido prod. B', '63' => 'Liquidacion A', '64' => 'Liquidacion B' }
- SNOOPY_SSL_VERSION =
- :TLSv1_2, :TLSv1_1, :TLSv1, :SSLv3, :SSLv23, :SSLv2
(ENV['SNOOPY_SSL_VERSION'] || 'TLSv1').to_sym
- RESPONSABLE_INSCRIPTO =
:responsable_inscripto- RESPONSABLE_MONOTRIBUTO =
:responsable_monotributo- IVA_COND =
[ RESPONSABLE_MONOTRIBUTO, RESPONSABLE_INSCRIPTO ]
- CONCEPTS =
{ 'Productos' => '01', 'Servicios' => '02', 'Productos y Servicios' => '03' }
- DOCUMENTS =
{ 'CUIT' => '80', 'CUIL' => '86', 'CDI' => '87', 'LE' => '89', 'LC' => '90', 'CI Extranjera' => '91', 'en tramite' => '92', 'Acta Nacimiento' => '93', 'CI Bs. As. RNP' => '95', 'DNI' => '96', 'Pasaporte' => '94', 'Doc. (Otro)' => '99', 'CI Policía Federal' => '00', 'CI Buenos Aires' => '01', 'CI Catamarca' => '02', 'CI Córdoba' => '03', 'CI Corrientes' => '04', 'CI Entre Ríos' => '05', 'CI Jujuy' => '06', 'CI Mendoza' => '07', 'CI La Rioja' => '08', 'CI Salta' => '09', 'CI San Juan' => '10', 'CI San Luis' => '11', 'CI Santa Fe' => '12', 'CI Santiago del Estero' => '13', 'CI Tucumán' => '14', 'CI Chaco' => '16', 'CI Chubut' => '17', 'CI Formosa' => '18', 'CI Misiones' => '19', 'CI Neuquén' => '20', 'CI La Pampa' => '21', 'CI Río Negro' => '22', 'CI Santa Cruz' => '23', 'CI Tierra del Fuego' => '24' }
- CURRENCY =
{ :peso => { :code => 'PES', :nombre => 'Pesos Argentinos' }, :dolar => { :code => 'DOL', :nombre => 'Dolar Estadounidense' }, :real => { :code => '012', :nombre => 'Real' }, :euro => { :code => '060', :nombre => 'Euro' }, :oro => { :code => '049', :nombre => 'Gramos de Oro Fino' } }
- ALIC_IVA =
{ 0 => '3', 0.0 => '3', 0.025 => '9', 0.05 => '8', 0.105 => '4', 0.21 => '5', 0.27 => '6' }
- BILL_TYPE =
{ :factura_a => '01', :factura_b => '06', :factura_c => '11', :nota_credito_a => '03', :nota_credito_b => '08', :nota_credito_c => '13' }
Instance Attribute Summary collapse
-
#auth_url ⇒ Object
Returns the value of attribute auth_url.
-
#cert ⇒ Object
Returns the value of attribute cert.
-
#cuit ⇒ Object
Returns the value of attribute cuit.
-
#default_concept ⇒ Object
Returns the value of attribute default_concept.
-
#default_currency ⇒ Object
Returns the value of attribute default_currency.
-
#default_document_type ⇒ Object
Returns the value of attribute default_document_type.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#own_iva_cond ⇒ Object
Returns the value of attribute own_iva_cond.
-
#pkey ⇒ Object
Returns the value of attribute pkey.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#sale_point ⇒ Object
Returns the value of attribute sale_point.
-
#service_url ⇒ Object
Returns the value of attribute service_url.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
Instance Attribute Details
#auth_url ⇒ Object
Returns the value of attribute auth_url.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def auth_url @auth_url end |
#cert ⇒ Object
Returns the value of attribute cert.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def cert @cert end |
#cuit ⇒ Object
Returns the value of attribute cuit.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def cuit @cuit end |
#default_concept ⇒ Object
Returns the value of attribute default_concept.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def default_concept @default_concept end |
#default_currency ⇒ Object
Returns the value of attribute default_currency.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def default_currency @default_currency end |
#default_document_type ⇒ Object
Returns the value of attribute default_document_type.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def default_document_type @default_document_type end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def open_timeout @open_timeout end |
#own_iva_cond ⇒ Object
Returns the value of attribute own_iva_cond.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def own_iva_cond @own_iva_cond end |
#pkey ⇒ Object
Returns the value of attribute pkey.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def pkey @pkey end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def read_timeout @read_timeout end |
#sale_point ⇒ Object
Returns the value of attribute sale_point.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def sale_point @sale_point end |
#service_url ⇒ Object
Returns the value of attribute service_url.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def service_url @service_url end |
#verbose ⇒ Object
Returns the value of attribute verbose.
19 20 21 |
# File 'lib/snoopy_afip.rb', line 19 def verbose @verbose end |
Instance Method Details
#auth_hash ⇒ Object
26 27 28 |
# File 'lib/snoopy_afip.rb', line 26 def auth_hash {"Token" => Snoopy::TOKEN, "Sign" => Snoopy::SIGN, "Cuit" => Snoopy.cuit} end |
#bill_types ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/snoopy_afip.rb', line 30 def bill_types [ ["Factura A", "01"], # ["Nota de Débito A", "02"], ["Nota de Crédito A", "03"], # ["Recibos A", "04"], # ["Notas de Venta al contado A", "05"], ["Factura B", "06"], # ["Nota de Debito B", "07"], ["Nota de Credito B", "08"], # ["Recibos B", "09"], # ["Notas de Venta al contado B", "10"], ["Factura C", "11"], ["Nota de Crédito C", "13"], # ["Cbtes. A del Anexo I, Apartado A,inc.f),R.G.Nro. 1415", "34"], # ["Cbtes. B del Anexo I,Apartado A,inc. f),R.G. Nro. 1415", "35"], # ["Otros comprobantes A que cumplan con R.G.Nro. 1415", "39"], # ["Otros comprobantes B que cumplan con R.G.Nro. 1415", "40"], # ["Cta de Vta y Liquido prod. A", "60"], # ["Cta de Vta y Liquido prod. B", "61"], # ["Liquidacion A", "63"], # ["Liquidacion B, "64""] ] end |