package cz.moneta.test.dsl.cagw.api.v1.external.product.cloan.application;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.endpoints.cagw.CaGwEndpoint;
import cz.moneta.test.harness.support.rest.Builders;
import cz.moneta.test.harness.support.rest.RestRequest;

public class ApplicationBuilder {
    private final Harness harness;

    public ApplicationBuilder(Harness harness) {
        this.harness = harness;
    }

    public Application prepareApplicationRequest() {
        return getBuilder(Application.class);
    }

    private <RESP, B extends RestRequest<B, ?, RESP>> B getBuilder(Class<B> builderClass) {
        return Builders.newRestBuilder(builderClass, CaGwEndpoint.class, harness);
    }
}
