class MarketsRequest extends PageablePricesRequest {

    @Override
    public Map<String, String> parameters() {
        Map<String, String> parameters = new HashMap<>();
        if (Objects.nonNull(types) && !types.isEmpty()) {
            List<String> marketTypes = types.stream()
                    .map(MarketType::name)
                    .collect(Collectors.toList());
            parameters.put("types", String.join(",", marketTypes));
        }
        if (Objects.nonNull(statuses) && !statuses.isEmpty()) {
            List<String> states = statuses.stream()
                    .map(MarketStatus::name)
                    .collect(Collectors.toList());
            parameters.put("states", String.join(",", states));
        }
        if (includePrices) {
            parameters.put("include-prices", "true");
            parameters.putAll(pricesParameters());
        }
        return parameters;
    }

    private  MarketsRequest(Init<?> init);

}