-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update app to include service for AvaTax api.
- Loading branch information
Kelsey Langlois and LDevinMacKrell
committed
Dec 7, 2017
1 parent
eae8dbe
commit f41b2c4
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class TaxRate | ||
def self.get_tax_rate | ||
response = RestClient::Request.execute( | ||
method: :get, | ||
url: 'https://sandbox-rest.avatax.com/api/v2/taxrates/bypostalcode?country=US&postalCode=98105', | ||
headers: { Authorization: ENV['AVATAX_KEY'] } | ||
) | ||
return JSON.parse(response)['totalRate'] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters