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

com.logicommerce.sdk.builders.order.OrderItemPricesBuilder Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package com.logicommerce.sdk.builders.order;

import com.logicommerce.sdk.models.order.OrderItemPrices;
import com.logicommerce.sdk.models.order.implementations.OrderItemPricesImpl;

/**
 * 

OrderItemPricesBuilder class.

* * @author Logicommerce * @since 1.0.16 */ public class OrderItemPricesBuilder { private T parentBuilder; protected double productPrice; protected double optionsPrice; protected double previousPrice; protected double price; protected double totalTaxes; protected double total; /** *

Constructor for OrderItemPricesBuilder.

*/ public OrderItemPricesBuilder() { } /** *

Constructor for OrderItemPricesBuilder.

* * @param parentBuilder a T object */ public OrderItemPricesBuilder(T parentBuilder) { this(); this.parentBuilder = parentBuilder; } /** *

productPrice.

* * @param productPrice a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder productPrice(double productPrice) { this.productPrice = productPrice; return this; } /** *

optionsPrice.

* * @param optionsPrice a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder optionsPrice(double optionsPrice) { this.optionsPrice = optionsPrice; return this; } /** *

previousPrice.

* * @param previousPrice a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder previousPrice(double previousPrice) { this.previousPrice = previousPrice; return this; } /** *

price.

* * @param price a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder price(double price) { this.price = price; return this; } /** *

totalTaxes.

* * @param totalTaxes a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder totalTaxes(double totalTaxes) { this.totalTaxes = totalTaxes; return this; } /** *

total.

* * @param total a double * @return a {@link com.logicommerce.sdk.builders.order.OrderItemPricesBuilder} object */ public OrderItemPricesBuilder total(double total) { this.total = total; return this; } /** *

build.

* * @return a {@link com.logicommerce.sdk.models.order.OrderItemPrices} object */ public OrderItemPrices build() { OrderItemPricesImpl prices = new OrderItemPricesImpl(); prices.setProductPrice(productPrice); prices.setOptionsPrice(optionsPrice); prices.setPreviousPrice(previousPrice); prices.setPrice(price); prices.setTotalTaxes(totalTaxes); prices.setTotal(total); return prices; } /** *

done.

* * @return a T object */ public T done() { return parentBuilder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy