income-tax 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +4 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +60 -0
- data/LICENSE +22 -0
- data/income-tax.gemspec +12 -0
- data/lib/income-tax.rb +1 -0
- data/lib/income_tax/countries/afghanistan.rb +10 -0
- data/lib/income_tax/countries/aland.rb +10 -0
- data/lib/income_tax/countries/albania.rb +12 -0
- data/lib/income_tax/countries/algeria.rb +13 -0
- data/lib/income_tax/countries/american_samoa.rb +10 -0
- data/lib/income_tax/countries/andorra.rb +9 -0
- data/lib/income_tax/countries/angola.rb +23 -0
- data/lib/income_tax/countries/anguilla.rb +8 -0
- data/lib/income_tax/countries/antigua_and_barbuda.rb +11 -0
- data/lib/income_tax/countries/argentina.rb +16 -0
- data/lib/income_tax/countries/armenia.rb +11 -0
- data/lib/income_tax/countries/aruba.rb +23 -0
- data/lib/income_tax/countries/australia.rb +32 -0
- data/lib/income_tax/countries/austria.rb +14 -0
- data/lib/income_tax/countries/azerbaijan.rb +11 -0
- data/lib/income_tax/countries/bahamas.rb +8 -0
- data/lib/income_tax/countries/bahrain.rb +8 -0
- data/lib/income_tax/countries/bangladesh.rb +42 -0
- data/lib/income_tax/countries/barbados.rb +28 -0
- data/lib/income_tax/countries/belarus.rb +9 -0
- data/lib/income_tax/countries/belgium.rb +14 -0
- data/lib/income_tax/countries/belize.rb +11 -0
- data/lib/income_tax/countries/benin.rb +13 -0
- data/lib/income_tax/countries/bermuda.rb +8 -0
- data/lib/income_tax/countries/bhutan.rb +14 -0
- data/lib/income_tax/countries/bolivia.rb +9 -0
- data/lib/income_tax/countries/bosnia_and_herzegovina.rb +9 -0
- data/lib/income_tax/countries/botswana.rb +11 -0
- data/lib/income_tax/countries/bouvet_island.rb +10 -0
- data/lib/income_tax/countries/brazil.rb +14 -0
- data/lib/income_tax/countries/british_indian_ocean_territory.rb +10 -0
- data/lib/income_tax/countries/brunei.rb +8 -0
- data/lib/income_tax/countries/bulgaria.rb +9 -0
- data/lib/income_tax/countries/burkina_faso.rb +16 -0
- data/lib/income_tax/countries/burundi.rb +12 -0
- data/lib/income_tax/countries/cambodia.rb +14 -0
- data/lib/income_tax/countries/cameroon.rb +13 -0
- data/lib/income_tax/countries/canada.rb +13 -0
- data/lib/income_tax/countries/cape_verde.rb +14 -0
- data/lib/income_tax/countries/caribbean_netherlands.rb +15 -0
- data/lib/income_tax/countries/cayman_islands.rb +8 -0
- data/lib/income_tax/countries/central_african_republic.rb +11 -0
- data/lib/income_tax/countries/chad.rb +17 -0
- data/lib/income_tax/countries/chile.rb +20 -0
- data/lib/income_tax/countries/china.rb +17 -0
- data/lib/income_tax/countries/christmas_island.rb +8 -0
- data/lib/income_tax/countries/cocos_keeling_islands.rb +8 -0
- data/lib/income_tax/countries/colombia.rb +14 -0
- data/lib/income_tax/countries/comoros.rb +16 -0
- data/lib/income_tax/countries/congo.rb +9 -0
- data/lib/income_tax/countries/congo_republic.rb +14 -0
- data/lib/income_tax/countries/cook_islands.rb +13 -0
- data/lib/income_tax/countries/costa_rica.rb +30 -0
- data/lib/income_tax/countries/croatia.rb +12 -0
- data/lib/income_tax/countries/cuba.rb +12 -0
- data/lib/income_tax/countries/curacao.rb +15 -0
- data/lib/income_tax/countries/cyprus.rb +14 -0
- data/lib/income_tax/countries/czech_republic.rb +9 -0
- data/lib/income_tax/countries/denmark.rb +12 -0
- data/lib/income_tax/countries/djibouti.rb +14 -0
- data/lib/income_tax/countries/dominica.rb +13 -0
- data/lib/income_tax/countries/dominican_republic.rb +13 -0
- data/lib/income_tax/countries/ecuador.rb +18 -0
- data/lib/income_tax/countries/egypt.rb +14 -0
- data/lib/income_tax/countries/el_salvador.rb +9 -0
- data/lib/income_tax/countries/equatorial_guinea.rb +16 -0
- data/lib/income_tax/countries/eritrea.rb +9 -0
- data/lib/income_tax/countries/estonia.rb +9 -0
- data/lib/income_tax/countries/ethiopia.rb +16 -0
- data/lib/income_tax/countries/falkland_islands.rb +12 -0
- data/lib/income_tax/countries/faroe_islands.rb +9 -0
- data/lib/income_tax/countries/fiji.rb +20 -0
- data/lib/income_tax/countries/finland.rb +14 -0
- data/lib/income_tax/countries/france.rb +34 -0
- data/lib/income_tax/countries/french_guiana.rb +8 -0
- data/lib/income_tax/countries/french_polynesia.rb +8 -0
- data/lib/income_tax/countries/french_southern_territories.rb +8 -0
- data/lib/income_tax/countries/gabon.rb +17 -0
- data/lib/income_tax/countries/gambia.rb +15 -0
- data/lib/income_tax/countries/georgia.rb +9 -0
- data/lib/income_tax/countries/germany.rb +58 -0
- data/lib/income_tax/countries/ghana.rb +14 -0
- data/lib/income_tax/countries/gibraltar.rb +15 -0
- data/lib/income_tax/countries/greece.rb +11 -0
- data/lib/income_tax/countries/greenland.rb +9 -0
- data/lib/income_tax/countries/grenada.rb +11 -0
- data/lib/income_tax/countries/guadeloupe.rb +14 -0
- data/lib/income_tax/countries/guam.rb +10 -0
- data/lib/income_tax/countries/guatemala.rb +13 -0
- data/lib/income_tax/countries/guernsey.rb +9 -0
- data/lib/income_tax/countries/guinea.rb +13 -0
- data/lib/income_tax/countries/guinea_bissau.rb +9 -0
- data/lib/income_tax/countries/guyana.rb +11 -0
- data/lib/income_tax/countries/haiti.rb +9 -0
- data/lib/income_tax/countries/heard_and_mcdonald_islands.rb +8 -0
- data/lib/income_tax/countries/honduras.rb +9 -0
- data/lib/income_tax/countries/hong_kong.rb +15 -0
- data/lib/income_tax/countries/hungary.rb +9 -0
- data/lib/income_tax/countries/iceland.rb +12 -0
- data/lib/income_tax/countries/india.rb +14 -0
- data/lib/income_tax/countries/indonesia.rb +14 -0
- data/lib/income_tax/countries/iran.rb +14 -0
- data/lib/income_tax/countries/iraq.rb +9 -0
- data/lib/income_tax/countries/ireland.rb +24 -0
- data/lib/income_tax/countries/isle_of_man.rb +11 -0
- data/lib/income_tax/countries/israel.rb +16 -0
- data/lib/income_tax/countries/italy.rb +14 -0
- data/lib/income_tax/countries/ivory_coast.rb +14 -0
- data/lib/income_tax/countries/jamaica.rb +11 -0
- data/lib/income_tax/countries/japan.rb +15 -0
- data/lib/income_tax/countries/jersey.rb +9 -0
- data/lib/income_tax/countries/jordan.rb +14 -0
- data/lib/income_tax/countries/kazakhstan.rb +9 -0
- data/lib/income_tax/countries/kenya.rb +14 -0
- data/lib/income_tax/countries/kiribati.rb +9 -0
- data/lib/income_tax/countries/kosovo.rb +13 -0
- data/lib/income_tax/countries/kuwait.rb +8 -0
- data/lib/income_tax/countries/kyrgyzstan.rb +9 -0
- data/lib/income_tax/countries/laos.rb +15 -0
- data/lib/income_tax/countries/latvia.rb +9 -0
- data/lib/income_tax/countries/lebanon.rb +15 -0
- data/lib/income_tax/countries/lesotho.rb +13 -0
- data/lib/income_tax/countries/liberia.rb +13 -0
- data/lib/income_tax/countries/libya.rb +12 -0
- data/lib/income_tax/countries/liechtenstein.rb +9 -0
- data/lib/income_tax/countries/lithuania.rb +9 -0
- data/lib/income_tax/countries/luxembourg.rb +33 -0
- data/lib/income_tax/countries/macao.rb +19 -0
- data/lib/income_tax/countries/macedonia.rb +9 -0
- data/lib/income_tax/countries/madagascar.rb +11 -0
- data/lib/income_tax/countries/malawi.rb +12 -0
- data/lib/income_tax/countries/malaysia.rb +18 -0
- data/lib/income_tax/countries/maldives.rb +8 -0
- data/lib/income_tax/countries/mali.rb +9 -0
- data/lib/income_tax/countries/malta.rb +36 -0
- data/lib/income_tax/countries/marshall_islands.rb +11 -0
- data/lib/income_tax/countries/martinique.rb +14 -0
- data/lib/income_tax/countries/mauritania.rb +12 -0
- data/lib/income_tax/countries/mauritius.rb +9 -0
- data/lib/income_tax/countries/mayotte.rb +8 -0
- data/lib/income_tax/countries/mexico.rb +20 -0
- data/lib/income_tax/countries/micronesia.rb +9 -0
- data/lib/income_tax/countries/moldova.rb +13 -0
- data/lib/income_tax/countries/monaco.rb +9 -0
- data/lib/income_tax/countries/mongolia.rb +9 -0
- data/lib/income_tax/countries/montenegro.rb +11 -0
- data/lib/income_tax/countries/montserrat.rb +14 -0
- data/lib/income_tax/countries/morocco.rb +15 -0
- data/lib/income_tax/countries/mozambique.rb +14 -0
- data/lib/income_tax/countries/myanmar.rb +15 -0
- data/lib/income_tax/countries/namibia.rb +16 -0
- data/lib/income_tax/countries/nauru.rb +8 -0
- data/lib/income_tax/countries/nepal.rb +28 -0
- data/lib/income_tax/countries/netherlands.rb +13 -0
- data/lib/income_tax/countries/netherlands_antilles.rb +15 -0
- data/lib/income_tax/countries/new_caledonia.rb +14 -0
- data/lib/income_tax/countries/new_zealand.rb +13 -0
- data/lib/income_tax/countries/nicaragua.rb +32 -0
- data/lib/income_tax/countries/niger.rb +16 -0
- data/lib/income_tax/countries/nigeria.rb +15 -0
- data/lib/income_tax/countries/niue.rb +13 -0
- data/lib/income_tax/countries/norfolk_island.rb +9 -0
- data/lib/income_tax/countries/north_korea.rb +8 -0
- data/lib/income_tax/countries/northern_mariana_islands.rb +10 -0
- data/lib/income_tax/countries/norway.rb +13 -0
- data/lib/income_tax/countries/oman.rb +8 -0
- data/lib/income_tax/countries/pakistan.rb +21 -0
- data/lib/income_tax/countries/palau.rb +12 -0
- data/lib/income_tax/countries/palestinian_territory.rb +15 -0
- data/lib/income_tax/countries/panama.rb +12 -0
- data/lib/income_tax/countries/papua_new_guinea.rb +15 -0
- data/lib/income_tax/countries/paraguay.rb +9 -0
- data/lib/income_tax/countries/peru.rb +11 -0
- data/lib/income_tax/countries/philippines.rb +16 -0
- data/lib/income_tax/countries/pitcairn.rb +12 -0
- data/lib/income_tax/countries/poland.rb +12 -0
- data/lib/income_tax/countries/portugal.rb +14 -0
- data/lib/income_tax/countries/puerto_rico.rb +9 -0
- data/lib/income_tax/countries/qatar.rb +8 -0
- data/lib/income_tax/countries/reunion.rb +8 -0
- data/lib/income_tax/countries/romania.rb +9 -0
- data/lib/income_tax/countries/russia.rb +9 -0
- data/lib/income_tax/countries/rwanda.rb +12 -0
- data/lib/income_tax/countries/saint_barthelemy.rb +8 -0
- data/lib/income_tax/countries/saint_helena.rb +9 -0
- data/lib/income_tax/countries/saint_kitts_and_nevis.rb +8 -0
- data/lib/income_tax/countries/saint_lucia.rb +14 -0
- data/lib/income_tax/countries/saint_martin.rb +14 -0
- data/lib/income_tax/countries/saint_pierre_and_miquelon.rb +21 -0
- data/lib/income_tax/countries/saint_vincent_and_the_grenedines.rb +13 -0
- data/lib/income_tax/countries/samoa.rb +13 -0
- data/lib/income_tax/countries/san_marino.rb +17 -0
- data/lib/income_tax/countries/sao_tome_and_principe.rb +9 -0
- data/lib/income_tax/countries/saudi_arabia.rb +8 -0
- data/lib/income_tax/countries/senegal.rb +19 -0
- data/lib/income_tax/countries/serbia.rb +13 -0
- data/lib/income_tax/countries/seychelles.rb +9 -0
- data/lib/income_tax/countries/sierra_leone.rb +13 -0
- data/lib/income_tax/countries/singapore.rb +43 -0
- data/lib/income_tax/countries/sint_maarten.rb +15 -0
- data/lib/income_tax/countries/slovakia.rb +11 -0
- data/lib/income_tax/countries/slovenia.rb +13 -0
- data/lib/income_tax/countries/solomon_islands.rb +16 -0
- data/lib/income_tax/countries/somalia.rb +15 -0
- data/lib/income_tax/countries/south_africa.rb +15 -0
- data/lib/income_tax/countries/south_georgia_and_the_south_sandwich_islands.rb +10 -0
- data/lib/income_tax/countries/south_korea.rb +13 -0
- data/lib/income_tax/countries/south_sudan.rb +12 -0
- data/lib/income_tax/countries/spain.rb +14 -0
- data/lib/income_tax/countries/sri_lanka.rb +9 -0
- data/lib/income_tax/countries/sudan.rb +9 -0
- data/lib/income_tax/countries/suriname.rb +14 -0
- data/lib/income_tax/countries/svalbard_and_jan_mayen.rb +9 -0
- data/lib/income_tax/countries/swaziland.rb +9 -0
- data/lib/income_tax/countries/sweden.rb +12 -0
- data/lib/income_tax/countries/switzerland/aargau.rb +12 -0
- data/lib/income_tax/countries/switzerland/appenzell_inner.rb +12 -0
- data/lib/income_tax/countries/switzerland/appenzell_outer.rb +11 -0
- data/lib/income_tax/countries/switzerland/basel_city.rb +11 -0
- data/lib/income_tax/countries/switzerland/basel_land.rb +11 -0
- data/lib/income_tax/countries/switzerland/bern.rb +10 -0
- data/lib/income_tax/countries/switzerland/canton.rb +36 -0
- data/lib/income_tax/countries/switzerland/data/aargau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_inner.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/appenzell_outer.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_city.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/basel_land.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/bern.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/fribourg.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/geneva.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/glarus.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/grisons.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/jura.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/lucerne.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/neuchatel.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/nidwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/obwalden.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schaffhausen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/schwyz.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/solothurn.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/st_gallen.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/thurgau.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/ticino.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/uri.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/valais.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/vaud.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zug.dat +0 -0
- data/lib/income_tax/countries/switzerland/data/zurich.dat +0 -0
- data/lib/income_tax/countries/switzerland/federal.rb +46 -0
- data/lib/income_tax/countries/switzerland/fribourg.rb +11 -0
- data/lib/income_tax/countries/switzerland/geneva.rb +12 -0
- data/lib/income_tax/countries/switzerland/glarus.rb +12 -0
- data/lib/income_tax/countries/switzerland/grisons.rb +11 -0
- data/lib/income_tax/countries/switzerland/jura.rb +11 -0
- data/lib/income_tax/countries/switzerland/lucerne.rb +11 -0
- data/lib/income_tax/countries/switzerland/neuchatel.rb +12 -0
- data/lib/income_tax/countries/switzerland/nidwalden.rb +11 -0
- data/lib/income_tax/countries/switzerland/obwalden.rb +11 -0
- data/lib/income_tax/countries/switzerland/schaffhausen.rb +12 -0
- data/lib/income_tax/countries/switzerland/schwyz.rb +11 -0
- data/lib/income_tax/countries/switzerland/solothurn.rb +12 -0
- data/lib/income_tax/countries/switzerland/st_gallen.rb +12 -0
- data/lib/income_tax/countries/switzerland/thurgau.rb +12 -0
- data/lib/income_tax/countries/switzerland/ticino.rb +11 -0
- data/lib/income_tax/countries/switzerland/uri.rb +11 -0
- data/lib/income_tax/countries/switzerland/valais.rb +10 -0
- data/lib/income_tax/countries/switzerland/vaud.rb +11 -0
- data/lib/income_tax/countries/switzerland/zug.rb +12 -0
- data/lib/income_tax/countries/switzerland/zurich.rb +12 -0
- data/lib/income_tax/countries/switzerland.rb +62 -0
- data/lib/income_tax/countries/syria.rb +12 -0
- data/lib/income_tax/countries/taiwan.rb +14 -0
- data/lib/income_tax/countries/tajikistan.rb +13 -0
- data/lib/income_tax/countries/tanzania.rb +53 -0
- data/lib/income_tax/countries/thailand.rb +17 -0
- data/lib/income_tax/countries/timor_leste.rb +11 -0
- data/lib/income_tax/countries/togo.rb +9 -0
- data/lib/income_tax/countries/tokelau.rb +15 -0
- data/lib/income_tax/countries/tonga.rb +12 -0
- data/lib/income_tax/countries/trinidad_and_tobago.rb +11 -0
- data/lib/income_tax/countries/tunisia.rb +15 -0
- data/lib/income_tax/countries/turkey.rb +13 -0
- data/lib/income_tax/countries/turkmenistan.rb +9 -0
- data/lib/income_tax/countries/turks_and_caicos_islands.rb +8 -0
- data/lib/income_tax/countries/tuvalu.rb +9 -0
- data/lib/income_tax/countries/uganda.rb +13 -0
- data/lib/income_tax/countries/ukraine.rb +9 -0
- data/lib/income_tax/countries/united_arab_emirates.rb +8 -0
- data/lib/income_tax/countries/united_kingdom.rb +13 -0
- data/lib/income_tax/countries/united_states/alabama.rb +24 -0
- data/lib/income_tax/countries/united_states/alaska.rb +10 -0
- data/lib/income_tax/countries/united_states/arizona.rb +29 -0
- data/lib/income_tax/countries/united_states/arkansas.rb +29 -0
- data/lib/income_tax/countries/united_states/california.rb +39 -0
- data/lib/income_tax/countries/united_states/colorado.rb +10 -0
- data/lib/income_tax/countries/united_states/connecticut.rb +31 -0
- data/lib/income_tax/countries/united_states/dc.rb +16 -0
- data/lib/income_tax/countries/united_states/delaware.rb +31 -0
- data/lib/income_tax/countries/united_states/federal.rb +40 -0
- data/lib/income_tax/countries/united_states/florida.rb +10 -0
- data/lib/income_tax/countries/united_states/georgia.rb +32 -0
- data/lib/income_tax/countries/united_states/hawaii.rb +43 -0
- data/lib/income_tax/countries/united_states/idaho.rb +34 -0
- data/lib/income_tax/countries/united_states/illinois.rb +10 -0
- data/lib/income_tax/countries/united_states/indiana.rb +10 -0
- data/lib/income_tax/countries/united_states/iowa.rb +39 -0
- data/lib/income_tax/countries/united_states/kansas.rb +23 -0
- data/lib/income_tax/countries/united_states/kentucky.rb +31 -0
- data/lib/income_tax/countries/united_states/louisiana.rb +26 -0
- data/lib/income_tax/countries/united_states/maine.rb +23 -0
- data/lib/income_tax/countries/united_states/maryland.rb +35 -0
- data/lib/income_tax/countries/united_states/massachusetts.rb +10 -0
- data/lib/income_tax/countries/united_states/michigan.rb +10 -0
- data/lib/income_tax/countries/united_states/minnesota.rb +27 -0
- data/lib/income_tax/countries/united_states/mississippi.rb +25 -0
- data/lib/income_tax/countries/united_states/missouri.rb +40 -0
- data/lib/income_tax/countries/united_states/montana.rb +34 -0
- data/lib/income_tax/countries/united_states/nebraska.rb +27 -0
- data/lib/income_tax/countries/united_states/nevada.rb +10 -0
- data/lib/income_tax/countries/united_states/new_hampshire.rb +10 -0
- data/lib/income_tax/countries/united_states/new_jersey.rb +32 -0
- data/lib/income_tax/countries/united_states/new_mexico.rb +27 -0
- data/lib/income_tax/countries/united_states/new_york.rb +35 -0
- data/lib/income_tax/countries/united_states/north_carolina.rb +10 -0
- data/lib/income_tax/countries/united_states/north_dakota.rb +17 -0
- data/lib/income_tax/countries/united_states/ohio.rb +37 -0
- data/lib/income_tax/countries/united_states/oklahoma.rb +33 -0
- data/lib/income_tax/countries/united_states/oregon.rb +28 -0
- data/lib/income_tax/countries/united_states/pennsylvania.rb +10 -0
- data/lib/income_tax/countries/united_states/rhode_island.rb +25 -0
- data/lib/income_tax/countries/united_states/south_carolina.rb +17 -0
- data/lib/income_tax/countries/united_states/south_dakota.rb +10 -0
- data/lib/income_tax/countries/united_states/state.rb +34 -0
- data/lib/income_tax/countries/united_states/tennessee.rb +10 -0
- data/lib/income_tax/countries/united_states/texas.rb +10 -0
- data/lib/income_tax/countries/united_states/utah.rb +10 -0
- data/lib/income_tax/countries/united_states/vermont.rb +29 -0
- data/lib/income_tax/countries/united_states/virginia.rb +16 -0
- data/lib/income_tax/countries/united_states/washington.rb +10 -0
- data/lib/income_tax/countries/united_states/west_virginia.rb +29 -0
- data/lib/income_tax/countries/united_states/wisconsin.rb +27 -0
- data/lib/income_tax/countries/united_states/wyoming.rb +10 -0
- data/lib/income_tax/countries/united_states.rb +93 -0
- data/lib/income_tax/countries/united_states_minor_outlying_islands.rb +8 -0
- data/lib/income_tax/countries/uruguay.rb +16 -0
- data/lib/income_tax/countries/uzbekistan.rb +15 -0
- data/lib/income_tax/countries/vanuatu.rb +8 -0
- data/lib/income_tax/countries/vatican.rb +8 -0
- data/lib/income_tax/countries/venezuela.rb +20 -0
- data/lib/income_tax/countries/vietnam.rb +17 -0
- data/lib/income_tax/countries/virgin_islands_british.rb +9 -0
- data/lib/income_tax/countries/virgin_islands_us.rb +8 -0
- data/lib/income_tax/countries/wallis_and_futuna.rb +8 -0
- data/lib/income_tax/countries/western_sahara.rb +8 -0
- data/lib/income_tax/countries/yemen.rb +11 -0
- data/lib/income_tax/countries/zambia.rb +13 -0
- data/lib/income_tax/countries/zimbabwe.rb +17 -0
- data/lib/income_tax/countries.rb +5 -0
- data/lib/income_tax/factory.rb +66 -0
- data/lib/income_tax/helpers.rb +25 -0
- data/lib/income_tax/models/delegate.rb +30 -0
- data/lib/income_tax/models/fixed_rate.rb +14 -0
- data/lib/income_tax/models/generic.rb +212 -0
- data/lib/income_tax/models/no_taxes.rb +7 -0
- data/lib/income_tax/models/not_implemented.rb +6 -0
- data/lib/income_tax/models/progressive.rb +103 -0
- data/lib/income_tax/models.rb +10 -0
- data/lib/income_tax/rate.rb +152 -0
- data/lib/income_tax/register.rb +35 -0
- data/lib/income_tax/version.rb +3 -0
- data/lib/income_tax.rb +17 -0
- data/locations.md +1763 -0
- data/readme.md +137 -0
- data/script/generate_switzerland.rb +87 -0
- data/spec/income_tax/countries/afghanistan_spec.rb +89 -0
- data/spec/income_tax/countries/aland_spec.rb +89 -0
- data/spec/income_tax/countries/albania_spec.rb +89 -0
- data/spec/income_tax/countries/algeria_spec.rb +89 -0
- data/spec/income_tax/countries/american_samoa_spec.rb +89 -0
- data/spec/income_tax/countries/andorra_spec.rb +89 -0
- data/spec/income_tax/countries/angola_spec.rb +89 -0
- data/spec/income_tax/countries/anguilla_spec.rb +89 -0
- data/spec/income_tax/countries/antigua_and_barbuda_spec.rb +89 -0
- data/spec/income_tax/countries/argentina_spec.rb +89 -0
- data/spec/income_tax/countries/armenia_spec.rb +89 -0
- data/spec/income_tax/countries/aruba_spec.rb +89 -0
- data/spec/income_tax/countries/australia_spec.rb +89 -0
- data/spec/income_tax/countries/austria_spec.rb +89 -0
- data/spec/income_tax/countries/azerbaijan_spec.rb +89 -0
- data/spec/income_tax/countries/bahamas_spec.rb +89 -0
- data/spec/income_tax/countries/bahrain_spec.rb +89 -0
- data/spec/income_tax/countries/bangladesh_spec.rb +89 -0
- data/spec/income_tax/countries/barbados_spec.rb +89 -0
- data/spec/income_tax/countries/belarus_spec.rb +89 -0
- data/spec/income_tax/countries/belgium_spec.rb +89 -0
- data/spec/income_tax/countries/belize_spec.rb +89 -0
- data/spec/income_tax/countries/benin_spec.rb +89 -0
- data/spec/income_tax/countries/bermuda_spec.rb +89 -0
- data/spec/income_tax/countries/bhutan_spec.rb +89 -0
- data/spec/income_tax/countries/bolivia_spec.rb +89 -0
- data/spec/income_tax/countries/bosnia_and_herzegovina_spec.rb +89 -0
- data/spec/income_tax/countries/botswana_spec.rb +89 -0
- data/spec/income_tax/countries/bouvet_island_spec.rb +89 -0
- data/spec/income_tax/countries/brazil_spec.rb +89 -0
- data/spec/income_tax/countries/british_indian_ocean_territory_spec.rb +89 -0
- data/spec/income_tax/countries/brunei_spec.rb +89 -0
- data/spec/income_tax/countries/bulgaria_spec.rb +89 -0
- data/spec/income_tax/countries/burkina_faso_spec.rb +89 -0
- data/spec/income_tax/countries/burundi_spec.rb +89 -0
- data/spec/income_tax/countries/cambodia_spec.rb +89 -0
- data/spec/income_tax/countries/cameroon_spec.rb +89 -0
- data/spec/income_tax/countries/canada_spec.rb +89 -0
- data/spec/income_tax/countries/cape_verde_spec.rb +89 -0
- data/spec/income_tax/countries/caribbean_netherlands_spec.rb +89 -0
- data/spec/income_tax/countries/cayman_islands_spec.rb +89 -0
- data/spec/income_tax/countries/central_african_republic_spec.rb +89 -0
- data/spec/income_tax/countries/chad_spec.rb +89 -0
- data/spec/income_tax/countries/chile_spec.rb +89 -0
- data/spec/income_tax/countries/china_spec.rb +89 -0
- data/spec/income_tax/countries/christmas_island_spec.rb +89 -0
- data/spec/income_tax/countries/cocos_keeling_islands_spec.rb +89 -0
- data/spec/income_tax/countries/colombia_spec.rb +89 -0
- data/spec/income_tax/countries/comoros_spec.rb +89 -0
- data/spec/income_tax/countries/congo_republic_spec.rb +89 -0
- data/spec/income_tax/countries/congo_spec.rb +89 -0
- data/spec/income_tax/countries/cook_islands_spec.rb +89 -0
- data/spec/income_tax/countries/costa_rica_spec.rb +89 -0
- data/spec/income_tax/countries/croatia_spec.rb +89 -0
- data/spec/income_tax/countries/cuba_spec.rb +89 -0
- data/spec/income_tax/countries/curacao_spec.rb +89 -0
- data/spec/income_tax/countries/cyprus_spec.rb +89 -0
- data/spec/income_tax/countries/czech_republic_spec.rb +89 -0
- data/spec/income_tax/countries/denmark_spec.rb +89 -0
- data/spec/income_tax/countries/djibouti_spec.rb +89 -0
- data/spec/income_tax/countries/dominica_spec.rb +89 -0
- data/spec/income_tax/countries/dominican_republic_spec.rb +89 -0
- data/spec/income_tax/countries/ecuador_spec.rb +89 -0
- data/spec/income_tax/countries/egypt_spec.rb +89 -0
- data/spec/income_tax/countries/el_salvador_spec.rb +89 -0
- data/spec/income_tax/countries/equatorial_guinea_spec.rb +89 -0
- data/spec/income_tax/countries/eritrea_spec.rb +89 -0
- data/spec/income_tax/countries/estonia_spec.rb +89 -0
- data/spec/income_tax/countries/ethiopia_spec.rb +89 -0
- data/spec/income_tax/countries/falkland_islands_spec.rb +89 -0
- data/spec/income_tax/countries/faroe_islands_spec.rb +89 -0
- data/spec/income_tax/countries/fiji_spec.rb +89 -0
- data/spec/income_tax/countries/finland_spec.rb +89 -0
- data/spec/income_tax/countries/france_spec.rb +89 -0
- data/spec/income_tax/countries/french_guiana_spec.rb +89 -0
- data/spec/income_tax/countries/french_polynesia_spec.rb +89 -0
- data/spec/income_tax/countries/french_southern_territories_spec.rb +89 -0
- data/spec/income_tax/countries/gabon_spec.rb +89 -0
- data/spec/income_tax/countries/gambia_spec.rb +89 -0
- data/spec/income_tax/countries/georgia_spec.rb +89 -0
- data/spec/income_tax/countries/germany_spec.rb +89 -0
- data/spec/income_tax/countries/ghana_spec.rb +89 -0
- data/spec/income_tax/countries/gibraltar_spec.rb +89 -0
- data/spec/income_tax/countries/greece_spec.rb +89 -0
- data/spec/income_tax/countries/greenland_spec.rb +89 -0
- data/spec/income_tax/countries/grenada_spec.rb +89 -0
- data/spec/income_tax/countries/guadeloupe_spec.rb +89 -0
- data/spec/income_tax/countries/guam_spec.rb +89 -0
- data/spec/income_tax/countries/guatemala_spec.rb +89 -0
- data/spec/income_tax/countries/guernsey_spec.rb +89 -0
- data/spec/income_tax/countries/guinea_bissau_spec.rb +89 -0
- data/spec/income_tax/countries/guinea_spec.rb +89 -0
- data/spec/income_tax/countries/guyana_spec.rb +89 -0
- data/spec/income_tax/countries/haiti_spec.rb +89 -0
- data/spec/income_tax/countries/heard_and_mcdonald_islands_spec.rb +89 -0
- data/spec/income_tax/countries/honduras_spec.rb +89 -0
- data/spec/income_tax/countries/hong_kong_spec.rb +89 -0
- data/spec/income_tax/countries/hungary_spec.rb +89 -0
- data/spec/income_tax/countries/iceland_spec.rb +89 -0
- data/spec/income_tax/countries/india_spec.rb +89 -0
- data/spec/income_tax/countries/indonesia_spec.rb +89 -0
- data/spec/income_tax/countries/iran_spec.rb +89 -0
- data/spec/income_tax/countries/iraq_spec.rb +89 -0
- data/spec/income_tax/countries/ireland_spec.rb +89 -0
- data/spec/income_tax/countries/isle_of_man_spec.rb +89 -0
- data/spec/income_tax/countries/israel_spec.rb +89 -0
- data/spec/income_tax/countries/italy_spec.rb +89 -0
- data/spec/income_tax/countries/ivory_coast_spec.rb +89 -0
- data/spec/income_tax/countries/jamaica_spec.rb +89 -0
- data/spec/income_tax/countries/japan_spec.rb +89 -0
- data/spec/income_tax/countries/jersey_spec.rb +89 -0
- data/spec/income_tax/countries/jordan_spec.rb +89 -0
- data/spec/income_tax/countries/kazakhstan_spec.rb +89 -0
- data/spec/income_tax/countries/kenya_spec.rb +89 -0
- data/spec/income_tax/countries/kiribati_spec.rb +89 -0
- data/spec/income_tax/countries/kosovo_spec.rb +89 -0
- data/spec/income_tax/countries/kuwait_spec.rb +89 -0
- data/spec/income_tax/countries/kyrgyzstan_spec.rb +89 -0
- data/spec/income_tax/countries/laos_spec.rb +89 -0
- data/spec/income_tax/countries/latvia_spec.rb +89 -0
- data/spec/income_tax/countries/lebanon_spec.rb +89 -0
- data/spec/income_tax/countries/lesotho_spec.rb +89 -0
- data/spec/income_tax/countries/liberia_spec.rb +89 -0
- data/spec/income_tax/countries/libya_spec.rb +89 -0
- data/spec/income_tax/countries/liechtenstein_spec.rb +89 -0
- data/spec/income_tax/countries/lithuania_spec.rb +89 -0
- data/spec/income_tax/countries/luxembourg_spec.rb +89 -0
- data/spec/income_tax/countries/macao_spec.rb +89 -0
- data/spec/income_tax/countries/macedonia_spec.rb +89 -0
- data/spec/income_tax/countries/madagascar_spec.rb +89 -0
- data/spec/income_tax/countries/malawi_spec.rb +89 -0
- data/spec/income_tax/countries/malaysia_spec.rb +89 -0
- data/spec/income_tax/countries/maldives_spec.rb +89 -0
- data/spec/income_tax/countries/mali_spec.rb +89 -0
- data/spec/income_tax/countries/malta_spec.rb +89 -0
- data/spec/income_tax/countries/marshall_islands_spec.rb +89 -0
- data/spec/income_tax/countries/martinique_spec.rb +89 -0
- data/spec/income_tax/countries/mauritania_spec.rb +89 -0
- data/spec/income_tax/countries/mauritius_spec.rb +89 -0
- data/spec/income_tax/countries/mayotte_spec.rb +89 -0
- data/spec/income_tax/countries/mexico_spec.rb +89 -0
- data/spec/income_tax/countries/micronesia_spec.rb +89 -0
- data/spec/income_tax/countries/moldova_spec.rb +89 -0
- data/spec/income_tax/countries/monaco_spec.rb +89 -0
- data/spec/income_tax/countries/mongolia_spec.rb +89 -0
- data/spec/income_tax/countries/montenegro_spec.rb +89 -0
- data/spec/income_tax/countries/montserrat_spec.rb +89 -0
- data/spec/income_tax/countries/morocco_spec.rb +89 -0
- data/spec/income_tax/countries/mozambique_spec.rb +89 -0
- data/spec/income_tax/countries/myanmar_spec.rb +89 -0
- data/spec/income_tax/countries/namibia_spec.rb +89 -0
- data/spec/income_tax/countries/nauru_spec.rb +89 -0
- data/spec/income_tax/countries/nepal_spec.rb +89 -0
- data/spec/income_tax/countries/netherlands_antilles_spec.rb +89 -0
- data/spec/income_tax/countries/netherlands_spec.rb +89 -0
- data/spec/income_tax/countries/new_caledonia_spec.rb +89 -0
- data/spec/income_tax/countries/new_zealand_spec.rb +89 -0
- data/spec/income_tax/countries/nicaragua_spec.rb +89 -0
- data/spec/income_tax/countries/niger_spec.rb +89 -0
- data/spec/income_tax/countries/nigeria_spec.rb +89 -0
- data/spec/income_tax/countries/niue_spec.rb +89 -0
- data/spec/income_tax/countries/norfolk_island_spec.rb +89 -0
- data/spec/income_tax/countries/north_korea_spec.rb +89 -0
- data/spec/income_tax/countries/northern_mariana_islands_spec.rb +89 -0
- data/spec/income_tax/countries/norway_spec.rb +89 -0
- data/spec/income_tax/countries/oman_spec.rb +89 -0
- data/spec/income_tax/countries/pakistan_spec.rb +89 -0
- data/spec/income_tax/countries/palau_spec.rb +89 -0
- data/spec/income_tax/countries/palestinian_territory_spec.rb +89 -0
- data/spec/income_tax/countries/panama_spec.rb +89 -0
- data/spec/income_tax/countries/papua_new_guinea_spec.rb +89 -0
- data/spec/income_tax/countries/paraguay_spec.rb +89 -0
- data/spec/income_tax/countries/peru_spec.rb +89 -0
- data/spec/income_tax/countries/philippines_spec.rb +89 -0
- data/spec/income_tax/countries/pitcairn_spec.rb +89 -0
- data/spec/income_tax/countries/poland_spec.rb +89 -0
- data/spec/income_tax/countries/portugal_spec.rb +89 -0
- data/spec/income_tax/countries/puerto_rico_spec.rb +89 -0
- data/spec/income_tax/countries/qatar_spec.rb +89 -0
- data/spec/income_tax/countries/reunion_spec.rb +89 -0
- data/spec/income_tax/countries/romania_spec.rb +89 -0
- data/spec/income_tax/countries/russia_spec.rb +89 -0
- data/spec/income_tax/countries/rwanda_spec.rb +89 -0
- data/spec/income_tax/countries/saint_barthelemy_spec.rb +89 -0
- data/spec/income_tax/countries/saint_helena_spec.rb +89 -0
- data/spec/income_tax/countries/saint_kitts_and_nevis_spec.rb +89 -0
- data/spec/income_tax/countries/saint_lucia_spec.rb +89 -0
- data/spec/income_tax/countries/saint_martin_spec.rb +89 -0
- data/spec/income_tax/countries/saint_pierre_and_miquelon_spec.rb +89 -0
- data/spec/income_tax/countries/saint_vincent_and_the_grenedines_spec.rb +89 -0
- data/spec/income_tax/countries/samoa_spec.rb +89 -0
- data/spec/income_tax/countries/san_marino_spec.rb +89 -0
- data/spec/income_tax/countries/sao_tome_and_principe_spec.rb +89 -0
- data/spec/income_tax/countries/saudi_arabia_spec.rb +89 -0
- data/spec/income_tax/countries/senegal_spec.rb +89 -0
- data/spec/income_tax/countries/serbia_spec.rb +89 -0
- data/spec/income_tax/countries/seychelles_spec.rb +89 -0
- data/spec/income_tax/countries/sierra_leone_spec.rb +89 -0
- data/spec/income_tax/countries/singapore_spec.rb +89 -0
- data/spec/income_tax/countries/sint_maarten_spec.rb +89 -0
- data/spec/income_tax/countries/slovakia_spec.rb +89 -0
- data/spec/income_tax/countries/slovenia_spec.rb +89 -0
- data/spec/income_tax/countries/solomon_islands_spec.rb +89 -0
- data/spec/income_tax/countries/somalia_spec.rb +89 -0
- data/spec/income_tax/countries/south_africa_spec.rb +89 -0
- data/spec/income_tax/countries/south_georgia_and_the_south_sandwich_islands_spec.rb +89 -0
- data/spec/income_tax/countries/south_korea_spec.rb +89 -0
- data/spec/income_tax/countries/south_sudan_spec.rb +89 -0
- data/spec/income_tax/countries/spain_spec.rb +89 -0
- data/spec/income_tax/countries/sri_lanka_spec.rb +89 -0
- data/spec/income_tax/countries/sudan_spec.rb +89 -0
- data/spec/income_tax/countries/suriname_spec.rb +89 -0
- data/spec/income_tax/countries/svalbard_and_jan_mayen_spec.rb +89 -0
- data/spec/income_tax/countries/swaziland_spec.rb +89 -0
- data/spec/income_tax/countries/sweden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/aargau_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/appenzell_inner_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/appenzell_outer_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/basel_city_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/basel_land_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/bern_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/fribourg_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/geneva_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/glarus_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/grisons_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/jura_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/lucerne_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/neuchatel_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/nidwalden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/obwalden_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/schaffhausen_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/schwyz_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/solothurn_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/st_gallen_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/thurgau_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/ticino_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/uri_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/valais_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/vaud_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/zug_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland/zurich_spec.rb +89 -0
- data/spec/income_tax/countries/switzerland_spec.rb +89 -0
- data/spec/income_tax/countries/syria_spec.rb +89 -0
- data/spec/income_tax/countries/taiwan_spec.rb +89 -0
- data/spec/income_tax/countries/tajikistan_spec.rb +89 -0
- data/spec/income_tax/countries/tanzania_spec.rb +89 -0
- data/spec/income_tax/countries/thailand_spec.rb +89 -0
- data/spec/income_tax/countries/timor_leste_spec.rb +89 -0
- data/spec/income_tax/countries/togo_spec.rb +89 -0
- data/spec/income_tax/countries/tokelau_spec.rb +89 -0
- data/spec/income_tax/countries/tonga_spec.rb +89 -0
- data/spec/income_tax/countries/trinidad_and_tobago_spec.rb +89 -0
- data/spec/income_tax/countries/tunisia_spec.rb +89 -0
- data/spec/income_tax/countries/turkey_spec.rb +89 -0
- data/spec/income_tax/countries/turkmenistan_spec.rb +89 -0
- data/spec/income_tax/countries/turks_and_caicos_islands_spec.rb +89 -0
- data/spec/income_tax/countries/tuvalu_spec.rb +89 -0
- data/spec/income_tax/countries/uganda_spec.rb +89 -0
- data/spec/income_tax/countries/ukraine_spec.rb +89 -0
- data/spec/income_tax/countries/united_arab_emirates_spec.rb +89 -0
- data/spec/income_tax/countries/united_kingdom_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/alabama_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/alaska_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/arizona_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/arkansas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/california_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/colorado_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/connecticut_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/dc_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/delaware_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/florida_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/georgia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/hawaii_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/idaho_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/illinois_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/indiana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/iowa_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/kansas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/kentucky_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/louisiana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/maine_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/maryland_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/massachusetts_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/michigan_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/minnesota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/mississippi_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/missouri_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/montana_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/nebraska_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/nevada_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_hampshire_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_jersey_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_mexico_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/new_york_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/north_carolina_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/north_dakota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/ohio_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/oklahoma_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/oregon_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/pennsylvania_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/rhode_island_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/south_carolina_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/south_dakota_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/tennessee_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/texas_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/utah_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/vermont_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/virginia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/washington_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/west_virginia_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/wisconsin_spec.rb +89 -0
- data/spec/income_tax/countries/united_states/wyoming_spec.rb +89 -0
- data/spec/income_tax/countries/united_states_minor_outlying_islands_spec.rb +89 -0
- data/spec/income_tax/countries/united_states_spec.rb +89 -0
- data/spec/income_tax/countries/uruguay_spec.rb +89 -0
- data/spec/income_tax/countries/uzbekistan_spec.rb +89 -0
- data/spec/income_tax/countries/vanuatu_spec.rb +89 -0
- data/spec/income_tax/countries/vatican_spec.rb +89 -0
- data/spec/income_tax/countries/venezuela_spec.rb +89 -0
- data/spec/income_tax/countries/vietnam_spec.rb +89 -0
- data/spec/income_tax/countries/virgin_islands_british_spec.rb +89 -0
- data/spec/income_tax/countries/virgin_islands_us_spec.rb +89 -0
- data/spec/income_tax/countries/wallis_and_futuna_spec.rb +89 -0
- data/spec/income_tax/countries/western_sahara_spec.rb +89 -0
- data/spec/income_tax/countries/yemen_spec.rb +89 -0
- data/spec/income_tax/countries/zambia_spec.rb +89 -0
- data/spec/income_tax/countries/zimbabwe_spec.rb +89 -0
- data/spec/income_tax/models/fixed_rate_spec.rb +24 -0
- data/spec/income_tax/models/no_taxes_spec.rb +20 -0
- data/spec/income_tax/models/progressive_spec.rb +98 -0
- data/spec/income_tax/rate_spec.rb +257 -0
- data/spec/income_tax/register_spec.rb +14 -0
- data/spec/income_tax_spec.rb +9 -0
- data/spec/support/coverage.rb +16 -0
- data/spec/support/env.rb +12 -0
- data/spec/support.rb +3 -0
- metadata +760 -0
data/readme.md
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
# Income Tax Estimation
|
2
|
+
|
3
|
+
Given a country and either the gross or net income, this library can estimate
|
4
|
+
the personal income tax. These are very rough estimates, mostly ignoring any
|
5
|
+
potential tax deductions.
|
6
|
+
|
7
|
+
It has the following goals:
|
8
|
+
|
9
|
+
* Zero external dependencies.
|
10
|
+
* Compatible with the [money gem](http://rubymoney.github.io/money/).
|
11
|
+
* Full test coverage.
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
``` ruby
|
16
|
+
require 'income_tax'
|
17
|
+
|
18
|
+
# €4k per month before taxes in Estonia, which has a fixed 20% tax rate
|
19
|
+
tax_info = IncomeTax.new("Estonia", "4k/mo")
|
20
|
+
tax_info.gross_income # => 48000
|
21
|
+
tax_info.net_income # => 38400
|
22
|
+
tax_info.taxes # => 9600
|
23
|
+
tax_info.rate # => "20%"
|
24
|
+
tax_info.to_f # => 0.2
|
25
|
+
tax_info.to_r # => (1/5)
|
26
|
+
|
27
|
+
# Making €4k after taxes
|
28
|
+
tax_info = IncomeTax.new("Estonia", "4k/mo", :net)
|
29
|
+
tax_info.gross_income # => 60000
|
30
|
+
tax_info.net_income # => 48000
|
31
|
+
|
32
|
+
# Using the money gem (will automatically convert to appropriate currency)
|
33
|
+
require "money"
|
34
|
+
tax_info = IncomeTax.new("Estonia", Money.new(100_000, "USD"))
|
35
|
+
tax_info.gross_income # => 89000 (depending on exchange rate)
|
36
|
+
```
|
37
|
+
|
38
|
+
Unless handed in as [money](http://rubymoney.github.io/money/) object, values
|
39
|
+
are assumed to be in the local currency, with the notable exception of Zimbabwe,
|
40
|
+
for which USD is used.
|
41
|
+
|
42
|
+
## Supported Locations
|
43
|
+
|
44
|
+
### Countries
|
45
|
+
|
46
|
+
This gem uses a very broad definition of countries, whereby the following are counted as separate entities:
|
47
|
+
|
48
|
+
* UN member states.
|
49
|
+
* Overseas territories, outermost regions and colonies.
|
50
|
+
* Some autonomous regions enjoying partial sovereignty, esp. if they have full autonomy over tax regime and collection (like Hong Kong).
|
51
|
+
* States with limited but widespread recognition (like Taiwan, Kosovo, Palest.ine)
|
52
|
+
|
53
|
+
Things not considered separate countries:
|
54
|
+
|
55
|
+
* Sovereign entities without any actual territory (The Holy See, Sovereign Military Order of Malta).
|
56
|
+
* States with very limited recognition (like Northern Cyprus, South Ossetia).
|
57
|
+
* Scotland, Wales, England and Northern Island (they are collectively treated as one country).
|
58
|
+
* Unclaimed or heavily disputed territories.
|
59
|
+
* Antartica.
|
60
|
+
|
61
|
+
These decisions and differentiations are made to best model international income taxes and are not meant to convey any political opinion.
|
62
|
+
|
63
|
+
Of course, suggestions and patches are always welcome.
|
64
|
+
|
65
|
+
There is also a [full list of countries](locations.md).
|
66
|
+
|
67
|
+
### Country Divisions
|
68
|
+
|
69
|
+
#### United States
|
70
|
+
|
71
|
+
* **Federal only:** By default only federal taxes are calculated.
|
72
|
+
* **State taxes:** Passing in the `state` option with either the full name of the state of the two letter abbreviation will also take state taxes into account.
|
73
|
+
* **Washington, D.C.:** Use the state option as if it was a state, which by the way it should be.
|
74
|
+
* **Guam, Puerto Rico, and other territories:** Treat them like separate countries.
|
75
|
+
|
76
|
+
``` ruby
|
77
|
+
IncomeTax.new("US", "100k")
|
78
|
+
IncomeTax.new("US", "100k", state: "California")
|
79
|
+
|
80
|
+
IncomeTax.new("Guam", "100k")
|
81
|
+
```
|
82
|
+
|
83
|
+
#### Switzerland
|
84
|
+
|
85
|
+
You can use the `canton` option with either the full canton name or the two letter abbreviation.
|
86
|
+
If not passed in, it will default to `ZH` (Zurich).
|
87
|
+
|
88
|
+
``` ruby
|
89
|
+
IncomeTax.new("CH", "100k", canton: "Bern")
|
90
|
+
```
|
91
|
+
|
92
|
+
#### Tanzania
|
93
|
+
|
94
|
+
You can set the `location` option to Mainland (default) or Zanzibar.
|
95
|
+
|
96
|
+
``` ruby
|
97
|
+
IncomeTax.new("TZ", "16m", location: "Zanzibar")
|
98
|
+
```
|
99
|
+
|
100
|
+
## Other Options
|
101
|
+
|
102
|
+
* **`married`:** Whether or not the tax payer is married. Respected by the French, German, Irish, Maltese, Nepali, Nicaraguan, Swiss and U.S. American tax model.
|
103
|
+
* **`children`:** Number of children the tax payer has to provide for. Respected by the French, Maltese and Swiss tax model.
|
104
|
+
* **`joint_statement`:** If married, whether or not both spouses file a joint statement. Respected by the U.S. American tax model.
|
105
|
+
* **`head_of_household`:** Whether or not the tax payer is the head of the household. Respected by the U.S. American tax model.
|
106
|
+
* **`self_employed`:** Whether the tax payer is employed or freelancing. Respected by the Costa Rican and Nicaraguan tax model.
|
107
|
+
* **`age` or `birhtday`:** To determine age depended taxes. Respected by the Australian, Bangladeshi and Barbadian tax model.
|
108
|
+
* **`gender`:** `male` or `female`, respected by the Bangladeshi tax model.
|
109
|
+
* **`disabled`:** Whether or not the tax payer has a physical or psychological disability, respected by the Bangladeshi tax model.
|
110
|
+
* **`wounded_freedom_fighter`:** Whether or not the tax payer is a war-wounded freedom fighter, respected by the Bangladeshi tax model.
|
111
|
+
* **`presumptive`:** Whether or not presumptive taxes are paid. Respected by the Tanzanian tax model. This value has a smart default.
|
112
|
+
|
113
|
+
## Limitations
|
114
|
+
|
115
|
+
General limitations:
|
116
|
+
|
117
|
+
* It only calculates personal income tax (ie, the tax the employee has to pay).
|
118
|
+
* Religious taxes (like church taxes in Germany or Khums in Iran) are currently
|
119
|
+
not taken into account.
|
120
|
+
* Tax deductions are largely not taken into account.
|
121
|
+
* Double taxation is not taken into account.
|
122
|
+
* Rules around multiple tax regimes based on citizenship are not taken into account.
|
123
|
+
* Differentiation between domestic and foreign income.
|
124
|
+
* It does not differentiate on tax year. Wherever possible, rates for the current or even upcoming year have been used.
|
125
|
+
|
126
|
+
Specific examples of what is not taken into account:
|
127
|
+
|
128
|
+
* French citizens (or in some cases, any new citizens) living in overseas territories often have to pay French income tax for the first five years.
|
129
|
+
* French citizens living or working in Monaco have to pay French income tax instead.
|
130
|
+
* German citizens living in Switzerland may have to pay German income tax for the first five years depending on the source of income.
|
131
|
+
* Employees in the West Bank have a high likelihood of paying Israeli income tax instead of Palestinian income tax.
|
132
|
+
* For people living in Puerto Rico and Guam, there is a chance that they may have to pay US federal income tax instead.
|
133
|
+
* Mali has a [choose your own tax adventure](http://www.bbc.co.uk/news/magazine-31907670), and livestock is acceptable currency when paying taxes.
|
134
|
+
|
135
|
+
These lists are very much incomplete.
|
136
|
+
|
137
|
+
Suggestions and patches on addressing any of these are, of course, more than welcome.
|
@@ -0,0 +1,87 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# go to https://www.estv.admin.ch/estv/de/home/direkte-bundessteuer/dienstleistungen/quellensteuer/tarife-herunterladen.html
|
3
|
+
# download "20xx Schweiz TXT"
|
4
|
+
# unpack and place text files in tmp/switzerland
|
5
|
+
|
6
|
+
$:.unshift 'lib'
|
7
|
+
require 'income_tax'
|
8
|
+
|
9
|
+
cantons = {
|
10
|
+
Aargau: ["AG", "Aargau", "Argovia"],
|
11
|
+
AppenzellInner: ["AI", "Appenzell Inner Rhodes", "Appenzell Innerrhoden"],
|
12
|
+
AppenzellOuter: ["AR", "Appenzell Outer Rhodes", "Appenzell Ausserrhoden"],
|
13
|
+
BaselLand: ["BL", "Basel-Landschaft", "Baselland", "Baselbiet", "Basel-Country"],
|
14
|
+
BaselCity: ["BS", "Basel-Stadt", "Basel-City", "Basel"],
|
15
|
+
Bern: ["BE", "Bern", "Berne"],
|
16
|
+
Fribourg: ["FR", "Fribourg", "Freiburg"],
|
17
|
+
Geneva: ["GE", "Geneva"],
|
18
|
+
Glarus: ["GL", "Glarus"],
|
19
|
+
Grisons: ["GR", "Grisons", "Graubünden", "Grigioni", "Grischun"],
|
20
|
+
Jura: ["JU", "Jura"],
|
21
|
+
Lucerne: ["LU", "Lucerne", "Luzern"],
|
22
|
+
Neuchatel: ["NE", "Neuchâtel", "Neuchatel"],
|
23
|
+
Nidwalden: ["NW", "Nidwalden"],
|
24
|
+
Obwalden: ["OW", "Obwalden"],
|
25
|
+
Schaffhausen: ["SH", "Schaffhausen"],
|
26
|
+
Schwyz: ["SZ", "Schwyz"],
|
27
|
+
Solothurn: ["SO", "Solothurn"],
|
28
|
+
StGallen: ["SG", "St. Gallen"],
|
29
|
+
Thurgau: ["TG", "Thurgau"],
|
30
|
+
Ticino: ["TI", "Ticino"],
|
31
|
+
Uri: ["UR", "Uri"],
|
32
|
+
Valais: ["VS", "Valais", "Wallis"],
|
33
|
+
Vaud: ["VD", "Vaud"],
|
34
|
+
Zug: ["ZG", "Zug"],
|
35
|
+
Zurich: ["ZH", "Zurich", "Zürich"]
|
36
|
+
}
|
37
|
+
|
38
|
+
print "Loading cantons "
|
39
|
+
cantons = cantons.map do |class_name, names|
|
40
|
+
print ?.
|
41
|
+
code = names.shift
|
42
|
+
[code, {class_name: class_name, names: [*names, code], levels: {}}]
|
43
|
+
end.to_h
|
44
|
+
puts
|
45
|
+
|
46
|
+
print "Loading raw data "
|
47
|
+
source = ""
|
48
|
+
Dir.glob("#{__dir__}/../tmp/switzerland/*.txt") do |file|
|
49
|
+
print ?.
|
50
|
+
source << File.read(file)
|
51
|
+
end
|
52
|
+
puts
|
53
|
+
|
54
|
+
if source.empty?
|
55
|
+
puts "!!! No data found. Please download an place in tmp/switzerland !!!"
|
56
|
+
exit 1
|
57
|
+
end
|
58
|
+
|
59
|
+
print "Scanning lines (x10.000) "
|
60
|
+
counter = 0
|
61
|
+
source.scan(/^0601(.{2})([AB].)N {7}\d{08}(\d{9})(\d{9}) \d{2}\d{9}0(\d{4})/) do |canton, code, lower_boundry, interval, rate_digits|
|
62
|
+
counter += 1
|
63
|
+
print ?. if counter % 10_000 == 0
|
64
|
+
boundry = lower_boundry.to_i + interval.to_i
|
65
|
+
levels = cantons.fetch(canton)[:levels][code.to_sym] ||= IncomeTax::Models::Progressive::Levels.new
|
66
|
+
levels.level(boundry * 0.12r - 1, "0.#{rate_digits}".to_r)
|
67
|
+
end
|
68
|
+
puts
|
69
|
+
|
70
|
+
|
71
|
+
print "Setting remainder "
|
72
|
+
cantons.each_value do |canton|
|
73
|
+
print ?.
|
74
|
+
canton[:levels].each_value do |level|
|
75
|
+
levels = level.instance_variable_get("@levels")
|
76
|
+
level.remainder levels.last.last
|
77
|
+
end
|
78
|
+
end
|
79
|
+
puts
|
80
|
+
|
81
|
+
print "Generating files "
|
82
|
+
cantons.each_value do |data|
|
83
|
+
file_name = data[:class_name].to_s.gsub(/(\w)([A-Z])/, '\1_\2').downcase
|
84
|
+
print ?.
|
85
|
+
File.write("lib/income_tax/countries/switzerland/data/#{file_name}.dat", Marshal.dump(data[:levels]))
|
86
|
+
end
|
87
|
+
puts
|
@@ -0,0 +1,89 @@
|
|
1
|
+
describe IncomeTax::Countries::Afghanistan do
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type) }
|
3
|
+
let(:type) { :gross }
|
4
|
+
|
5
|
+
describe "from gross income of 0" do
|
6
|
+
let(:income) { 0 }
|
7
|
+
its(:rate) { should be == Rational(0, 1) }
|
8
|
+
its(:gross_income) { should be == 0 }
|
9
|
+
its(:net_income) { should be == 0 }
|
10
|
+
its(:taxes) { should be == 0 }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "from gross income of 1000" do
|
14
|
+
let(:income) { 1000 }
|
15
|
+
its(:rate) { should be == Rational(0, 1) }
|
16
|
+
its(:gross_income) { should be == 1000 }
|
17
|
+
its(:net_income) { should be == 1000 }
|
18
|
+
its(:taxes) { should be == 0 }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "from gross income of 10000" do
|
22
|
+
let(:income) { 10000 }
|
23
|
+
its(:rate) { should be == Rational(0, 1) }
|
24
|
+
its(:gross_income) { should be == 10000 }
|
25
|
+
its(:net_income) { should be == 10000 }
|
26
|
+
its(:taxes) { should be == 0 }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "from gross income of 100000" do
|
30
|
+
let(:income) { 100000 }
|
31
|
+
its(:rate) { should be == Rational(0, 1) }
|
32
|
+
its(:gross_income) { should be == 100000 }
|
33
|
+
its(:net_income) { should be == 100000 }
|
34
|
+
its(:taxes) { should be == 0 }
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "from gross income of 100000000" do
|
38
|
+
let(:income) { 100000000 }
|
39
|
+
its(:rate) { should be == Rational(0, 1) }
|
40
|
+
its(:gross_income) { should be == 100000000 }
|
41
|
+
its(:net_income) { should be == 100000000 }
|
42
|
+
its(:taxes) { should be == 0 }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "from net income of 0" do
|
46
|
+
let(:type) { :net }
|
47
|
+
let(:income) { 0 }
|
48
|
+
its(:rate) { should be == Rational(0, 1) }
|
49
|
+
its(:gross_income) { should be == 0 }
|
50
|
+
its(:net_income) { should be == 0 }
|
51
|
+
its(:taxes) { should be == 0 }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "from net income of 1000" do
|
55
|
+
let(:type) { :net }
|
56
|
+
let(:income) { 1000 }
|
57
|
+
its(:rate) { should be == Rational(0, 1) }
|
58
|
+
its(:gross_income) { should be == 1000 }
|
59
|
+
its(:net_income) { should be == 1000 }
|
60
|
+
its(:taxes) { should be == 0 }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "from net income of 10000" do
|
64
|
+
let(:type) { :net }
|
65
|
+
let(:income) { 10000 }
|
66
|
+
its(:rate) { should be == Rational(0, 1) }
|
67
|
+
its(:gross_income) { should be == 10000 }
|
68
|
+
its(:net_income) { should be == 10000 }
|
69
|
+
its(:taxes) { should be == 0 }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 100000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:income) { 100000 }
|
75
|
+
its(:rate) { should be == Rational(0, 1) }
|
76
|
+
its(:gross_income) { should be == 100000 }
|
77
|
+
its(:net_income) { should be == 100000 }
|
78
|
+
its(:taxes) { should be == 0 }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "from net income of 100000000" do
|
82
|
+
let(:type) { :net }
|
83
|
+
let(:income) { 100000000 }
|
84
|
+
its(:rate) { should be == Rational(0, 1) }
|
85
|
+
its(:gross_income) { should be == 100000000 }
|
86
|
+
its(:net_income) { should be == 100000000 }
|
87
|
+
its(:taxes) { should be == 0 }
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
describe IncomeTax::Countries::Aland do
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type) }
|
3
|
+
let(:type) { :gross }
|
4
|
+
|
5
|
+
describe "from gross income of 0" do
|
6
|
+
let(:income) { 0 }
|
7
|
+
its(:rate) { should be == Rational(0, 1) }
|
8
|
+
its(:gross_income) { should be == 0 }
|
9
|
+
its(:net_income) { should be == 0 }
|
10
|
+
its(:taxes) { should be == 0 }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "from gross income of 1000" do
|
14
|
+
let(:income) { 1000 }
|
15
|
+
its(:rate) { should be == Rational(0, 1) }
|
16
|
+
its(:gross_income) { should be == 1000 }
|
17
|
+
its(:net_income) { should be == 1000 }
|
18
|
+
its(:taxes) { should be == 0 }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "from gross income of 10000" do
|
22
|
+
let(:income) { 10000 }
|
23
|
+
its(:rate) { should be == Rational(0, 1) }
|
24
|
+
its(:gross_income) { should be == 10000 }
|
25
|
+
its(:net_income) { should be == 10000 }
|
26
|
+
its(:taxes) { should be == 0 }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "from gross income of 100000" do
|
30
|
+
let(:income) { 100000 }
|
31
|
+
its(:rate) { should be == Rational(35, 183) }
|
32
|
+
its(:gross_income) { should be == 100000 }
|
33
|
+
its(:net_income) { should be == 80875 }
|
34
|
+
its(:taxes) { should be == 19125 }
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "from gross income of 100000000" do
|
38
|
+
let(:income) { 100000000 }
|
39
|
+
its(:rate) { should be == Rational(254, 847) }
|
40
|
+
its(:gross_income) { should be == 100000000 }
|
41
|
+
its(:net_income) { should be == 70010875 }
|
42
|
+
its(:taxes) { should be == 29989125 }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "from net income of 0" do
|
46
|
+
let(:type) { :net }
|
47
|
+
let(:income) { 0 }
|
48
|
+
its(:rate) { should be == Rational(0, 1) }
|
49
|
+
its(:gross_income) { should be == 0 }
|
50
|
+
its(:net_income) { should be == 0 }
|
51
|
+
its(:taxes) { should be == 0 }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "from net income of 1000" do
|
55
|
+
let(:type) { :net }
|
56
|
+
let(:income) { 1000 }
|
57
|
+
its(:rate) { should be == Rational(0, 1) }
|
58
|
+
its(:gross_income) { should be == 1000 }
|
59
|
+
its(:net_income) { should be == 1000 }
|
60
|
+
its(:taxes) { should be == 0 }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "from net income of 10000" do
|
64
|
+
let(:type) { :net }
|
65
|
+
let(:income) { 10000 }
|
66
|
+
its(:rate) { should be == Rational(0, 1) }
|
67
|
+
its(:gross_income) { should be == 10000 }
|
68
|
+
its(:net_income) { should be == 10000 }
|
69
|
+
its(:taxes) { should be == 0 }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 100000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:income) { 100000 }
|
75
|
+
its(:rate) { should be == Rational(50, 233) }
|
76
|
+
its(:gross_income) { should be == "127321.428571428571".to_d }
|
77
|
+
its(:net_income) { should be == 100000 }
|
78
|
+
its(:taxes) { should be == "27321.4285714285714".to_d }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "from net income of 100000000" do
|
82
|
+
let(:type) { :net }
|
83
|
+
let(:income) { 100000000 }
|
84
|
+
its(:rate) { should be == Rational(350, 1167) }
|
85
|
+
its(:gross_income) { should be == "142841607.142857143".to_d }
|
86
|
+
its(:net_income) { should be == 100000000 }
|
87
|
+
its(:taxes) { should be == "42841607.142857143".to_d }
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
describe IncomeTax::Countries::Albania do
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type) }
|
3
|
+
let(:type) { :gross }
|
4
|
+
|
5
|
+
describe "from gross income of 0" do
|
6
|
+
let(:income) { 0 }
|
7
|
+
its(:rate) { should be == Rational(0, 1) }
|
8
|
+
its(:gross_income) { should be == 0 }
|
9
|
+
its(:net_income) { should be == 0 }
|
10
|
+
its(:taxes) { should be == 0 }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "from gross income of 1000" do
|
14
|
+
let(:income) { 1000 }
|
15
|
+
its(:rate) { should be == Rational(0, 1) }
|
16
|
+
its(:gross_income) { should be == 1000 }
|
17
|
+
its(:net_income) { should be == 1000 }
|
18
|
+
its(:taxes) { should be == 0 }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "from gross income of 10000" do
|
22
|
+
let(:income) { 10000 }
|
23
|
+
its(:rate) { should be == Rational(0, 1) }
|
24
|
+
its(:gross_income) { should be == 10000 }
|
25
|
+
its(:net_income) { should be == 10000 }
|
26
|
+
its(:taxes) { should be == 0 }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "from gross income of 100000" do
|
30
|
+
let(:income) { 100000 }
|
31
|
+
its(:rate) { should be == Rational(82, 901) }
|
32
|
+
its(:gross_income) { should be == 100000 }
|
33
|
+
its(:net_income) { should be == 90900 }
|
34
|
+
its(:taxes) { should be == 9100 }
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "from gross income of 100000000" do
|
38
|
+
let(:income) { 100000000 }
|
39
|
+
its(:rate) { should be == Rational(57, 248) }
|
40
|
+
its(:gross_income) { should be == 100000000 }
|
41
|
+
its(:net_income) { should be == 77016900 }
|
42
|
+
its(:taxes) { should be == 22983100 }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "from net income of 0" do
|
46
|
+
let(:type) { :net }
|
47
|
+
let(:income) { 0 }
|
48
|
+
its(:rate) { should be == Rational(0, 1) }
|
49
|
+
its(:gross_income) { should be == 0 }
|
50
|
+
its(:net_income) { should be == 0 }
|
51
|
+
its(:taxes) { should be == 0 }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "from net income of 1000" do
|
55
|
+
let(:type) { :net }
|
56
|
+
let(:income) { 1000 }
|
57
|
+
its(:rate) { should be == Rational(0, 1) }
|
58
|
+
its(:gross_income) { should be == 1000 }
|
59
|
+
its(:net_income) { should be == 1000 }
|
60
|
+
its(:taxes) { should be == 0 }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "from net income of 10000" do
|
64
|
+
let(:type) { :net }
|
65
|
+
let(:income) { 10000 }
|
66
|
+
its(:rate) { should be == Rational(0, 1) }
|
67
|
+
its(:gross_income) { should be == 10000 }
|
68
|
+
its(:net_income) { should be == 10000 }
|
69
|
+
its(:taxes) { should be == 0 }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 100000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:income) { 100000 }
|
75
|
+
its(:rate) { should be == Rational(25, 264) }
|
76
|
+
its(:gross_income) { should be == "110459.770114942529".to_d }
|
77
|
+
its(:net_income) { should be == 100000 }
|
78
|
+
its(:taxes) { should be == "10459.7701149425287".to_d }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "from net income of 100000000" do
|
82
|
+
let(:type) { :net }
|
83
|
+
let(:income) { 100000000 }
|
84
|
+
its(:rate) { should be == Rational(117, 509) }
|
85
|
+
its(:gross_income) { should be == "129848181.818181818".to_d }
|
86
|
+
its(:net_income) { should be == 100000000 }
|
87
|
+
its(:taxes) { should be == "29848181.8181818182".to_d }
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
describe IncomeTax::Countries::Algeria do
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type) }
|
3
|
+
let(:type) { :gross }
|
4
|
+
|
5
|
+
describe "from gross income of 0" do
|
6
|
+
let(:income) { 0 }
|
7
|
+
its(:rate) { should be == Rational(0, 1) }
|
8
|
+
its(:gross_income) { should be == 0 }
|
9
|
+
its(:net_income) { should be == 0 }
|
10
|
+
its(:taxes) { should be == 0 }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "from gross income of 1000" do
|
14
|
+
let(:income) { 1000 }
|
15
|
+
its(:rate) { should be == Rational(0, 1) }
|
16
|
+
its(:gross_income) { should be == 1000 }
|
17
|
+
its(:net_income) { should be == 1000 }
|
18
|
+
its(:taxes) { should be == 0 }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "from gross income of 10000" do
|
22
|
+
let(:income) { 10000 }
|
23
|
+
its(:rate) { should be == Rational(0, 1) }
|
24
|
+
its(:gross_income) { should be == 10000 }
|
25
|
+
its(:net_income) { should be == 10000 }
|
26
|
+
its(:taxes) { should be == 0 }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "from gross income of 100000" do
|
30
|
+
let(:income) { 100000 }
|
31
|
+
its(:rate) { should be == Rational(0, 1) }
|
32
|
+
its(:gross_income) { should be == 100000 }
|
33
|
+
its(:net_income) { should be == 100000 }
|
34
|
+
its(:taxes) { should be == 0 }
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "from gross income of 100000000" do
|
38
|
+
let(:income) { 100000000 }
|
39
|
+
its(:rate) { should be == Rational(53, 152) }
|
40
|
+
its(:gross_income) { should be == 100000000 }
|
41
|
+
its(:net_income) { should be == 65132000 }
|
42
|
+
its(:taxes) { should be == 34868000 }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "from net income of 0" do
|
46
|
+
let(:type) { :net }
|
47
|
+
let(:income) { 0 }
|
48
|
+
its(:rate) { should be == Rational(0, 1) }
|
49
|
+
its(:gross_income) { should be == 0 }
|
50
|
+
its(:net_income) { should be == 0 }
|
51
|
+
its(:taxes) { should be == 0 }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "from net income of 1000" do
|
55
|
+
let(:type) { :net }
|
56
|
+
let(:income) { 1000 }
|
57
|
+
its(:rate) { should be == Rational(0, 1) }
|
58
|
+
its(:gross_income) { should be == 1000 }
|
59
|
+
its(:net_income) { should be == 1000 }
|
60
|
+
its(:taxes) { should be == 0 }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "from net income of 10000" do
|
64
|
+
let(:type) { :net }
|
65
|
+
let(:income) { 10000 }
|
66
|
+
its(:rate) { should be == Rational(0, 1) }
|
67
|
+
its(:gross_income) { should be == 10000 }
|
68
|
+
its(:net_income) { should be == 10000 }
|
69
|
+
its(:taxes) { should be == 0 }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 100000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:income) { 100000 }
|
75
|
+
its(:rate) { should be == Rational(0, 1) }
|
76
|
+
its(:gross_income) { should be == 100000 }
|
77
|
+
its(:net_income) { should be == 100000 }
|
78
|
+
its(:taxes) { should be == 0 }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "from net income of 100000000" do
|
82
|
+
let(:type) { :net }
|
83
|
+
let(:income) { 100000000 }
|
84
|
+
its(:rate) { should be == Rational(81, 232) }
|
85
|
+
its(:gross_income) { should be == "153643076.923076923".to_d }
|
86
|
+
its(:net_income) { should be == 100000000 }
|
87
|
+
its(:taxes) { should be == "53643076.923076923".to_d }
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
describe IncomeTax::Countries::AmericanSamoa do
|
2
|
+
subject(:result) { described_class.new(income: income, income_type: type) }
|
3
|
+
let(:type) { :gross }
|
4
|
+
|
5
|
+
describe "from gross income of 0" do
|
6
|
+
let(:income) { 0 }
|
7
|
+
its(:rate) { should be == Rational(0, 1) }
|
8
|
+
its(:gross_income) { should be == 0 }
|
9
|
+
its(:net_income) { should be == 0 }
|
10
|
+
its(:taxes) { should be == 0 }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "from gross income of 1000" do
|
14
|
+
let(:income) { 1000 }
|
15
|
+
its(:rate) { should be == Rational(1, 10) }
|
16
|
+
its(:gross_income) { should be == 1000 }
|
17
|
+
its(:net_income) { should be == 900 }
|
18
|
+
its(:taxes) { should be == 100 }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "from gross income of 10000" do
|
22
|
+
let(:income) { 10000 }
|
23
|
+
its(:rate) { should be == Rational(1, 10) }
|
24
|
+
its(:gross_income) { should be == 10000 }
|
25
|
+
its(:net_income) { should be == 9000 }
|
26
|
+
its(:taxes) { should be == 1000 }
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "from gross income of 100000" do
|
30
|
+
let(:income) { 100000 }
|
31
|
+
its(:rate) { should be == Rational(63, 316) }
|
32
|
+
its(:gross_income) { should be == 100000 }
|
33
|
+
its(:net_income) { should be == "80062.75".to_d }
|
34
|
+
its(:taxes) { should be == "19937.25".to_d }
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "from gross income of 100000000" do
|
38
|
+
let(:income) { 100000000 }
|
39
|
+
its(:rate) { should be == Rational(142, 359) }
|
40
|
+
its(:gross_income) { should be == 100000000 }
|
41
|
+
its(:net_income) { should be == "60445495.75".to_d }
|
42
|
+
its(:taxes) { should be == "39554504.25".to_d }
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "from net income of 0" do
|
46
|
+
let(:type) { :net }
|
47
|
+
let(:income) { 0 }
|
48
|
+
its(:rate) { should be == Rational(0, 1) }
|
49
|
+
its(:gross_income) { should be == 0 }
|
50
|
+
its(:net_income) { should be == 0 }
|
51
|
+
its(:taxes) { should be == 0 }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "from net income of 1000" do
|
55
|
+
let(:type) { :net }
|
56
|
+
let(:income) { 1000 }
|
57
|
+
its(:rate) { should be == Rational(1, 10) }
|
58
|
+
its(:gross_income) { should be == "1111.111111111111111".to_d }
|
59
|
+
its(:net_income) { should be == 1000 }
|
60
|
+
its(:taxes) { should be == "111.111111111111111".to_d }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "from net income of 10000" do
|
64
|
+
let(:type) { :net }
|
65
|
+
let(:income) { 10000 }
|
66
|
+
its(:rate) { should be == Rational(1, 10) }
|
67
|
+
its(:gross_income) { should be == "11111.1111111111111".to_d }
|
68
|
+
its(:net_income) { should be == 10000 }
|
69
|
+
its(:taxes) { should be == "1111.1111111111111".to_d }
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "from net income of 100000" do
|
73
|
+
let(:type) { :net }
|
74
|
+
let(:income) { 100000 }
|
75
|
+
its(:rate) { should be == Rational(139, 641) }
|
76
|
+
its(:gross_income) { should be == "127690.625".to_d }
|
77
|
+
its(:net_income) { should be == 100000 }
|
78
|
+
its(:taxes) { should be == "27690.625".to_d }
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "from net income of 100000000" do
|
82
|
+
let(:type) { :net }
|
83
|
+
let(:income) { 100000000 }
|
84
|
+
its(:rate) { should be == Rational(74, 187) }
|
85
|
+
its(:gross_income) { should be == "165487589.817880794".to_d }
|
86
|
+
its(:net_income) { should be == 100000000 }
|
87
|
+
its(:taxes) { should be == "65487589.817880794".to_d }
|
88
|
+
end
|
89
|
+
end
|