module AfipWsfe

Constants

ALIC_IVA

Tax percentage and codes according to each iva combination

BILL_TYPE
CBTE_LETRA
CBTE_TIPO

This constant contains the invoice types mappings between codes and names used by WSFE.

CONCEPTOS

Name to code mapping for Sale types.

DOCUMENTOS

Name to code mapping for types of documents.

MONEDAS

Currency code and names hash identified by a symbol

URLS

This hash keeps the set of urls for wsaa and wsfe for production and testing envs

VERSION

Gem version

Attributes

cert[RW]
cuit[RW]
default_concepto[RW]
default_documento[RW]
default_moneda[RW]
environment[RW]
log_level[RW]
own_iva_cond[RW]
pkey[RW]
sale_point[RW]
storage[RW]
verbose[RW]

Public Instance Methods

auth_hash() click to toggle source
# File lib/afip_wsfe.rb, line 29
def auth_hash
  AuthData.auth_hash
end
enabled?() click to toggle source
# File lib/afip_wsfe.rb, line 41
def enabled?
  if self.storage == :file
    File.exists?(AfipWsfe.pkey || "") && File.exists?(AfipWsfe.cert || "")
  else
    AfipWsfe.pkey.present? && AfipWsfe.cert.present?
  end
end
log?() click to toggle source
# File lib/afip_wsfe.rb, line 33
def log?
  AfipWsfe.verbose || ENV["WSFE_VERBOSE"]
end
remove_token() click to toggle source
# File lib/afip_wsfe.rb, line 37
def remove_token
  AuthData.remove
end