When does the Tax Collector's ability trigger for characters that have abilities that involve the end of their turn? My specific examples are as follows: The Alchemist builds a district with all of their gold. Does the gold he spent return and THEN he is taxed, or is the tax ineffective because there is no gold and only then he gets his gold back? The Diplomat's ability says that at the end of his turn, he may use the swap ability. Can he do this (and thus use up an remaining gold he has) or must he pay the Tax Collector first?
The alchemist description found in the rules, page 18, strongly suggest that first the tax collector taxes the alchemist, then the alchemist gets money back from his construction. Then, if the alchemist has no money after building something, the tax collector gets nothing. See also a similar question on BGG.
Applying the same rationale, the diplomat swapping ability will be effective in the end of the turn, after he pays the tax collector. Note that the diplomat's collection of coins from red districts may happen before or after building something (if the player wants it, of course), as stated in the rulebook, page 12. The end of turn happens after that.