Class: AvataxClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/avatax_client/configuration.rb

Overview

Configuration class to manage settings for Avatax

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

rubocop:disable Metrics/MethodLength



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/avatax_client/configuration.rb', line 8

def initialize
  @item_codes = OpenStruct.new
  @endpoint = nil
  @password = nil
  @tax_codes = OpenStruct.new
  @username = nil
  @version = nil
  @debug = false
  @debug_response = lambda { |response|
    puts "Response Debug"
    puts "Response Code:"
    puts response.code
    puts "Response Body:"
    puts response.body
  }
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def debug
  @debug
end

#debug_responseObject

Returns the value of attribute debug_response.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def debug_response
  @debug_response
end

#endpointObject

Returns the value of attribute endpoint.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def endpoint
  @endpoint
end

#item_codesObject

Returns the value of attribute item_codes.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def item_codes
  @item_codes
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def password
  @password
end

#tax_codesObject

Returns the value of attribute tax_codes.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def tax_codes
  @tax_codes
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def username
  @username
end

#versionObject

Returns the value of attribute version.



5
6
7
# File 'lib/avatax_client/configuration.rb', line 5

def version
  @version
end