summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Van Doorn <vandoorn.nick@gmail.com>2021-02-24 14:08:49 -0800
committerNicholas Van Doorn <vandoorn.nick@gmail.com>2021-02-24 14:08:49 -0800
commit755bce528c2ef41d7ccfe20db9e5ecfc491e9197 (patch)
tree7230147f50915b125322f4fc9c9324e97d9d69fb /lib
parent6e9ff3c16c705cb75b55b4cfb9f66379bcad45a7 (diff)
Put plugin name in API request headers
To meet Taxjar's certification requirements, we need to supply a 'plugin' name in each API request header. As such we add this header where the API version header is supplied. Co-authored-by: Noah Silvera <noah@super.gd>
Diffstat (limited to 'lib')
-rw-r--r--lib/super_good/solidus_taxjar/api.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/super_good/solidus_taxjar/api.rb b/lib/super_good/solidus_taxjar/api.rb
index a1d1af5..5c6ab3e 100644
--- a/lib/super_good/solidus_taxjar/api.rb
+++ b/lib/super_good/solidus_taxjar/api.rb
@@ -6,7 +6,8 @@ module SuperGood
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', {
- 'x-api-version' => '2020-08-07'
+ 'x-api-version' => '2020-08-07',
+ 'plugin' => 'supergoodsolidustaxjar'
})
end