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.
- checksums.yaml +8 -8
- data/lib/little_finger/avatax.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDIxODhiZjg2YmU1ODA4MDlmODI3MTQzNjE4ZWI2OTJlNjM3MjAwZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTg1YWFiNmMwOGQyMzM0MzcwZGQwNzRlMmQ2YjExZjU0ZTE2YTYwMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjVlOGU2NDg3MGZlYzhjZTY4ODIzMDI1NWY2MzFlOTk3NTNlNDVhMDEzOTM3
|
10
|
+
NjY4YjlkOThkMGYxOGFkNWExMjhjYjNhYTNjMDRiYTYwNzk5Nzk3MTQyY2I5
|
11
|
+
MzVhYjk0OWVkYWEyZjllNWUxZmQzZGQ3NjY2NDg1N2I5YjUwYTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTliNWVjMzhkMDVlMzljNzI1ZmFiZTQ0NDM0OWQ5ZGFkY2Y1YmU0N2Y4Mjdk
|
14
|
+
NTIyZTJlN2VkZDA2YjVhY2FlNzA5YTNhZDEzNTk3MWEzZThmODJmMmU2M2M5
|
15
|
+
MTQ4NjBjMWUyNTAxYTllZTI5Y2QyOTRhNDFlNWVjYmRiMzU0Njg=
|
data/lib/little_finger/avatax.rb
CHANGED
@@ -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
|
-
|
16
|
-
@
|
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
|
+
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.
|
267
|
+
rubygems_version: 2.4.6
|
268
268
|
signing_key:
|
269
269
|
specification_version: 4
|
270
270
|
summary: AvaTax with backup tax calculation
|