Interesting
A Ruby Class’s default ‘initialize’ method takes zero or any number or arguments depending on the version of Ruby you use.
Given the Foo class:
class Foo end
And then attempting to instantiate an instance of Foo with arguments like so:
Foo.new('any argument')
You get an invalid number of arguments error in 1.8.7 and 1.9.3.
However, 1.9.2 and 1.9.1 will just accept any number of arguments.
Ruby spec documents this behavior:
https://github.com/rubyspec/rubyspec/blob/master/core/object/new_spec.rb
It appears that this difference between versions was introduced as a feature in 1.9.2 and back ported to 1.9.1 and then reverted in 1.9.3. Perhaps the reversion should be back ported now?
http://redmine.ruby-lang.org/issues/2451
Help
Does anyone know of an API that provides a sales tax lookup service?
RE: Sales Tax
Not exactly, that I know.
There are enterprise solutions, such as GeoTAX by PitneyBowes that offer On-Demand APIs. They don’t list pricing online.
http://geotax.com/USTaxLookup/HowGeoTAX.aspx
A lower budget option appears to be Zip2Tax. They offer a service that lets you download up to date lookup tables or databases.
http://zip2tax.com/
Both offer an online forms based approach to looking up tax rates.
Many (all?) states offer free web services for looking up tax rates. Here’s an example from Ohio:
https://thefinder.tax.ohio.gov/StreamlineSalesTaxWeb/WebService/About.aspx
December 14, 2011 at 3:19 pm