The US president has repeatedly threatened to tax imports from two of the country's closest neighbours.