Class: AvaTax::API

Inherits:
Object
  • Object
show all
Includes:
Connection, Request
Defined in:
lib/avatax/api.rb

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods included from Request

#delete, #get, #post, #put, #request

Constructor Details

#initialize(options = {}) ⇒ API

Returns a new instance of API.


9
10
11
12
13
14
# File 'lib/avatax/api.rb', line 9

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

Instance Method Details

#configObject


16
17
18
19
20
21
22
# File 'lib/avatax/api.rb', line 16

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