diff options
Diffstat (limited to 'lib/super_good/solidus_taxjar/api.rb')
-rw-r--r-- | lib/super_good/solidus_taxjar/api.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/super_good/solidus_taxjar/api.rb b/lib/super_good/solidus_taxjar/api.rb index ca6ff6c..096994b 100644 --- a/lib/super_good/solidus_taxjar/api.rb +++ b/lib/super_good/solidus_taxjar/api.rb @@ -2,13 +2,15 @@ module SuperGood module SolidusTaxjar class Api def self.default_taxjar_client - ::Taxjar::Client.new( + client = ::Taxjar::Client.new( api_key: ENV.fetch("TAXJAR_API_KEY"), api_url: ENV.fetch("TAXJAR_API_URL") { "https://api.taxjar.com" } # Sandbox URL: https://api.sandbox.taxjar.com - ).set_api_config('headers', { + ) + client.set_api_config('headers', { 'x-api-version' => '2020-08-07', 'plugin' => 'supergoodsolidustaxjar' }) + client end def initialize(taxjar_client: self.class.default_taxjar_client) |