com.paymentwall.java.WidgetBuilder Maven / Gradle / Ivy
package com.paymentwall.java;
import java.util.ArrayList;
import java.util.HashMap;
public class WidgetBuilder {
String userId;
String widgetCode;
ArrayList products = new ArrayList();
HashMap extraParams = new HashMap();
public WidgetBuilder(String userId_, String widgetCode_) {
userId = userId_;
widgetCode = widgetCode_;
}
public Widget build() { return new Widget(userId,widgetCode,products,extraParams); }
public void setProducts(ArrayList products_) { products = products_; }
public void setProduct(final Product products_) { products = new ArrayList(){{add(products_);}}; }
public void setExtraParams(HashMap extraParams_) { extraParams = extraParams_; }
}