All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chargebee.internal.RequestBase Maven / Gradle / Ivy

There is a newer version: 3.26.0
Show newest version
/*
 * Copyright (c) 2011 chargebee.com
 * All Rights Reserved.
 */

package com.chargebee.internal;


import java.util.*;

import static com.chargebee.IdempotencyConstants.IDEMPOTENCY_HEADER;

public class RequestBase {

    protected String uri;
    protected Params params = new Params();
    protected ParamsV2 paramsV2 = new ParamsV2();
    protected Map headers = new HashMap();

    public U setIdempotencyKey(String idempotencyKey){
        headers.put(IDEMPOTENCY_HEADER, idempotencyKey);
        return (U)this;
    }

    public Params params() {
        return params;
    }

    public ParamsV2 paramsV2() {
        return paramsV2;
    }

    public U header(String headerName,String headerValue){
        headers.put(headerName, headerValue);
        return (U)this;
    }

    public String uri() {
        return uri;
    }

    public Map headers() {
        return headers;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy