Sha256: ae7d33747fda81722010cdaa6d3688bbd8184e6dca82b1f446aef205424092a2

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

# encoding: utf-8
require 'bundler/setup'
require 'afip_wsfe/version'
require 'afip_wsfe/constants'
require 'savon'

require 'net/http'
require 'net/https'
             
module AfipWsfe

  # Exception Class for missing or invalid attributes
  class NullOrInvalidAttribute < StandardError; end

  autoload :Constants,            'afip_wsfe/constants'
  autoload :Authorizer,           'afip_wsfe/authorizer'
  autoload :AuthData,             'afip_wsfe/auth_data'
  autoload :Bill,                 'afip_wsfe/bill'
  autoload :Wsaa,                 'afip_wsfe/wsaa'

  extend self

  attr_accessor :environment, :verbose, :log_level,
                :pkey, :cert, :openssl_bin,
                :cuit, :own_iva_cond, :sale_point,
                :default_documento, :default_concepto, :default_moneda

  def auth_hash
    {"Token" => AfipWsfe::TOKEN, "Sign" => AfipWsfe::SIGN, "Cuit" => AfipWsfe.cuit}
  end

  def log?
    AfipWsfe.verbose || ENV["WSFE_VERBOSE"]
  end
  
  def remove_token
    AuthData.remove
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
afip_wsfe-0.1.3 lib/afip_wsfe.rb
afip_wsfe-0.1.2 lib/afip_wsfe.rb
afip_wsfe-0.1.1 lib/afip_wsfe.rb