Added `toParam` and `toQuery` methods