com.logicommerce.sdk.builders.order.OrderAdditionalInformationBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
SDK for developing Logicommerce plugins.
package com.logicommerce.sdk.builders.order;
import com.logicommerce.sdk.models.order.OrderAdditionalInformation;
import com.logicommerce.sdk.models.order.implementations.OrderAdditionalInformationImpl;
/**
* OrderAdditionalInformationBuilder class.
*
* @author Logicommerce
* @since 1.0.16
*/
public class OrderAdditionalInformationBuilder {
protected T parentBuilder;
protected String name;
protected String value;
/**
* Constructor for OrderAdditionalInformationBuilder.
*/
public OrderAdditionalInformationBuilder() {
}
/**
* Constructor for OrderAdditionalInformationBuilder.
*
* @param parentBuilder a T object
*/
public OrderAdditionalInformationBuilder(T parentBuilder) {
this();
this.parentBuilder = parentBuilder;
}
/**
* name.
*
* @param name a {@link java.lang.String} object
* @return a {@link com.logicommerce.sdk.builders.order.OrderAdditionalInformationBuilder} object
*/
public OrderAdditionalInformationBuilder name(String name) {
this.name = name;
return this;
}
/**
* value.
*
* @param value a {@link java.lang.String} object
* @return a {@link com.logicommerce.sdk.builders.order.OrderAdditionalInformationBuilder} object
*/
public OrderAdditionalInformationBuilder value(String value) {
this.value = value;
return this;
}
/**
* build.
*
* @return a {@link com.logicommerce.sdk.models.order.OrderAdditionalInformation} object
*/
public OrderAdditionalInformation build() {
OrderAdditionalInformationImpl information = new OrderAdditionalInformationImpl();
information.setName(name);
information.setValue(value);
return information;
}
/**
* done.
*
* @return a T object
*/
public T done() {
return parentBuilder;
}
}