com.chargebee.internal.RequestBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chargebee-java Show documentation
Show all versions of chargebee-java Show documentation
Java client library for ChargeBee API
/*
* 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;
}
}