Fix URL building for when the base URL already has query parameters, and add test.
Use Invoice.all instead of Invoice.upcoming for base query parameter tests.