Class QuoteStructure


  • public class QuoteStructure
    extends Object
    This is a helper object that is used to build up code generated content of a quote. A single QuoteStructure object represents a specified level in the quote folder tree, i.e. it is not representing the full quote if you have multiple subfolder levels
    The level is defined by parentId of the structure object
    • Field Detail

      • parentId

        public String parentId
        The level of the quote. If parentId == null then the root level is used
    • Constructor Detail

      • QuoteStructure

        public QuoteStructure()
    • Method Detail

      • createFolder

        public QuoteStructure.Item createFolder​(String label)
        Creates a new folder item, but does not add it to the list
        Parameters:
        label - The folder label
        Returns:
        The new folder
      • addFolder

        public QuoteStructure.Item addFolder​(String label)
        Creates and adds a new folder
        Parameters:
        label - The folder label
        inputs - New inputs of the folder
        Returns:
        The new folder
      • createPart

        public QuoteStructure.Item createPart​(String sku)
        Creates a new "part" item but does not add it
        Parameters:
        sku - The SKU of the new part
        Returns:
        The new item
      • addPart

        public QuoteStructure.Item addPart​(String sku)
        Creates and adds a new part
        Parameters:
        label - The SKU of the new part
        Returns:
        The new item
      • addPart

        public QuoteStructure.Item addPart​(String sku,
                                           List<Map<String,​Object>> inputs)
        Creates and adds a new part
        Parameters:
        label - The SKU of the new part
        inputs - New inputs of the part
        Returns:
        The new item