Class: Api::Taxjar

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
app/services/api/taxjar.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTaxjar

Returns a new instance of Taxjar.



7
8
9
10
11
12
13
14
# File 'app/services/api/taxjar.rb', line 7

def initialize
  require 'taxjar'
  options = {
    api_key: Heatwave::Configuration.fetch(:taxjar,:api_key),
    api_url: Heatwave::Configuration.fetch(:taxjar,:api_url)
  }
  @client = Taxjar::Client.new(**options)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'app/services/api/taxjar.rb', line 5

def client
  @client
end

Class Method Details

.clientObject



16
17
18
# File 'app/services/api/taxjar.rb', line 16

def self.client
  instance.client
end