Class: Einvoice::Provider

Inherits:
Object
  • Object
show all
Includes:
Connection
Defined in:
lib/einvoice/provider.rb

Direct Known Subclasses

Tradevan::Provider

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Provider

Returns a new instance of Provider.



6
7
8
9
10
11
# File 'lib/einvoice/provider.rb', line 6

def initialize(options={})
  options = Einvoice.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Attribute Details

#providerObject

Returns the value of attribute provider.



4
5
6
# File 'lib/einvoice/provider.rb', line 4

def provider
  @provider
end

Instance Method Details

#configObject



13
14
15
16
17
18
19
# File 'lib/einvoice/provider.rb', line 13

def config
  conf = {}
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    conf[key] = send key
  end
  conf
end