little_finger 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/little_finger/avatax.rb +4 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmJlM2M1OGVlY2QwOGQxYWQxNTAyZjY0YzVkYTNiMTRjMGIxMGM2NQ==
4
+ NDIxODhiZjg2YmU1ODA4MDlmODI3MTQzNjE4ZWI2OTJlNjM3MjAwZA==
5
5
  data.tar.gz: !binary |-
6
- NGM0ODc3MDZmYWNjYTA5ZTJlZjI1MmJmMWNmMzFkZWNjZGY2YWEwMw==
6
+ YTg1YWFiNmMwOGQyMzM0MzcwZGQwNzRlMmQ2YjExZjU0ZTE2YTYwMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDY2NjAxNTJkNDcyNjllY2VjNjFhYzcwN2NlNThhMjQ4M2QxMTYxMDRjNGFk
10
- MDUwNTYzYWZjMDdiOTNlN2MwYThlODExNDkzMDkxZjJiNzY3MTAyZGIxNDQ0
11
- MmU2YjMyNDRhNzViYWYyYjFiMDEzODk1MGFkY2NkMDQ3NDM5ZDM=
9
+ ZjVlOGU2NDg3MGZlYzhjZTY4ODIzMDI1NWY2MzFlOTk3NTNlNDVhMDEzOTM3
10
+ NjY4YjlkOThkMGYxOGFkNWExMjhjYjNhYTNjMDRiYTYwNzk5Nzk3MTQyY2I5
11
+ MzVhYjk0OWVkYWEyZjllNWUxZmQzZGQ3NjY2NDg1N2I5YjUwYTY=
12
12
  data.tar.gz: !binary |-
13
- NGRhNWU4NjZiMTRiODIwZjdmZDg2ZTAxNmU3OWI3OGU1OTI5ZDdkNjM0N2Yx
14
- ZDM4YTYwMGQ1MjNkOGNhMGY5M2EwMzFlNjZlYWNkZjdiN2ViZWIyMTAzMmRk
15
- NTAzYmVlMTIwNzk1OWJkOWMyODY2NWU1MDQyNmYxNzA2ZjU4MGQ=
13
+ MTliNWVjMzhkMDVlMzljNzI1ZmFiZTQ0NDM0OWQ5ZGFkY2Y1YmU0N2Y4Mjdk
14
+ NTIyZTJlN2VkZDA2YjVhY2FlNzA5YTNhZDEzNTk3MWEzZThmODJmMmU2M2M5
15
+ MTQ4NjBjMWUyNTAxYTllZTI5Y2QyOTRhNDFlNWVjYmRiMzU0Njg=
@@ -6,14 +6,15 @@ require_relative "configuration"
6
6
  class LittleFinger::Avatax
7
7
  attr_accessor :company_code, :account_number, :license_key, :credentials, :tax_service_url, :address_service_url
8
8
 
9
- def initialize()
9
+ def initialize(service_url_override)
10
10
  @company_code = LittleFinger::Configuration.configuration[:avatax][:company_code]
11
11
  @account_number = LittleFinger::Configuration.configuration[:avatax][:account_number]
12
12
  @license_key = LittleFinger::Configuration.configuration[:avatax][:license_key]
13
13
  @api_timeout = LittleFinger::Configuration.configuration[:avatax][:timeout] || 5
14
14
  @credentials = ["Basic ",Base64.encode64(@account_number + ":"+ @license_key)].join
15
- @tax_service_url = [LittleFinger::Configuration.configuration[:avatax][:service_url], LittleFinger::Configuration.configuration[:avatax][:tax_service_path]].join
16
- @address_service_url = [LittleFinger::Configuration.configuration[:avatax][:service_url], LittleFinger::Configuration.configuration[:avatax][:address_service_path]].join
15
+ service_url = service_url_override.present? ? service_url_override : LittleFinger::Configuration.configuration[:avatax][:service_url]
16
+ @tax_service_url = [service_url, LittleFinger::Configuration.configuration[:avatax][:tax_service_path]].join
17
+ @address_service_url = [service_url, LittleFinger::Configuration.configuration[:avatax][:address_service_path]].join
17
18
  end
18
19
 
19
20
  # Since the REST API does not provide an explicit ping function, the estimate method can also be used to test connectivity to the service.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: little_finger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honest Company
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  requirements: []
266
266
  rubyforge_project:
267
- rubygems_version: 2.2.2
267
+ rubygems_version: 2.4.6
268
268
  signing_key:
269
269
  specification_version: 4
270
270
  summary: AvaTax with backup tax calculation