com.chargebee.internal.ParamsV2 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
package com.chargebee.internal;
import java.util.ArrayList;
import java.util.List;
public class ParamsV2 {
private List parameters = new ArrayList();
public List getParameters() {
return parameters;
}
public void add(Parameter p, Object value) {
if(value == null) {
throw new RuntimeException("The param {" + p.name + "} cannot be null");
}
p.setValue(Params.toValStr(value));
parameters.add(p);
}
public void addOpt(Parameter p, Object value) {
p.setValue(value == null ? "" : Params.toValStr(value));
parameters.add(p);
}
}