Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
We thought it was confusing for this to return `true` if the address is
not in a nexus region. But that's what it does for all international
addresses. Hopefully this comment is instructive to anyone who needs to
understand this check in the future.

Co-Authored-By: Chris Todorov <chris@super.gd>
  • Loading branch information
benjaminwil and forkata committed Jan 16, 2023
1 parent aa6a078 commit 41ec909
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/super_good/solidus_taxjar/calculator_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def state_required?(country)

private

# Nexus regions are only a concept for US states. For non-US addresses
# we always want to defer to the configuration in TaxJar.
def address_in_nexus_region?(address)
return true unless address&.country&.iso == "US"

Expand Down

0 comments on commit 41ec909

Please sign in to comment.