Sha256: 4df1612ab414bf523e722d540b59bdfb6db1af803be6982a8829aa9c624dceb7

Contents?: true

Size: 876 Bytes

Versions: 22

Compression:

Stored size: 876 Bytes

Contents

module CabooseStore
  class TaxCalculator
    def self.tax_rate(address)
      return 0 if address.state.downcase != 'al'
      city = address.city.downcase
      rate = 0.00
      rate = rate + 0.05 if city == 'brookwood'  
      rate = rate + 0.05 if city == 'coaling'    
      rate = rate + 0.05 if city == 'coker'      
      rate = rate + 0.05 if city == 'holt'       
      rate = rate + 0.05 if city == 'holt CDP'   
      rate = rate + 0.05 if city == 'lake View'  
      rate = rate + 0.05 if city == 'moundville' 
      rate = rate + 0.05 if city == 'northport'  
      rate = rate + 0.05 if city == 'tuscaloosa' 
      rate = rate + 0.05 if city == 'vance'      
      rate = rate + 0.05 if city == 'woodstock'  
      rate = rate + 0.04 if address.state.downcase == 'al' || address.state.downcase == 'alabama'        
      return rate.round(2)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
caboose-store-0.0.32 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.31 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.30 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.29 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.28 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.27 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.26 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.25 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.24 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.23 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.22 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.21 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.20 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.19 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.18 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.17 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.16 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.15 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.14 app/models/caboose_store/tax_calculator.rb
caboose-store-0.0.13 app/models/caboose_store/tax_calculator.rb