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

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

There is a newer version: 3.26.0
Show newest version
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);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy