public class QuoteBuilder extends CalculableLineItemCollectionBuilder<QuoteBuilder>
isPrePhase()
and isPostPhase()
methods to detect current phase. def builder = quoteProcessor
METHOD_ADD_LINE_ITEM, METHOD_ADD_OR_UPDATE_INPUT, METHOD_ADD_OR_UPDATE_OUTPUT, METHOD_UPDATE_FIELD, phase, ROOT_LINE_ID
Modifier and Type | Method and Description |
---|---|
void |
addFolder(String label)
Creates and adds a new root folder
This is only a shortcut as when doing it via QuoteStructure
If you intend to add many folders and items, please use the QuoteStructure approach instead!
|
void |
addPart(String sku)
Creates and adds a new part
This is only a shortcut as when doing it via QuoteStructure
If you intend to add many folders and items, please use the QuoteStructure approach instead!
|
QuoteBuilder |
addQuoteStructure(QuoteStructure structure)
Apply a quote structure.
|
QuoteBuilderResult |
build() |
QuoteHelper |
getHelper()
Gets a helper class that assists in manipulating the quote object
|
Object |
getQuoteView()
Gets the full quote object as a nested map
|
addLineItem, addLineItem, addLineItem, addOrUpdateInput, addOrUpdateInput, addOrUpdateOutput, addOrUpdateOutput, clearRenderInfo, deleteItem, isPostPhase, isPrePhase, moveItem, renameFolder, setRenderInfo, updateField, updateField
public Object getQuoteView()
public QuoteHelper getHelper()
public QuoteBuilder addQuoteStructure(QuoteStructure structure)
structure
- The structurepublic void addFolder(String label)
label
- The folder labelpublic void addPart(String sku)
label
- The SKU of the new partpublic QuoteBuilderResult build()
build
in class AbstractBuilder
Copyright © 2019. All rights reserved.