Class QuoteStructure

Object
QuoteStructure

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

    • items

      public List<QuoteStructure.Item> items
      The list of items to add in this level of the quote
    • parentId

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

    • QuoteStructure

      public QuoteStructure()
  • Method Details

    • 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
      Returns:
      The new folder
    • addFolder

      public QuoteStructure.Item addFolder(String label, List<Map<String,Object>> inputs)
      Creates and adds a new folder
      Parameters:
      label - The folder label
      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:
      sku - 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:
      sku - The SKU of the new part
      inputs - New inputs of the part
      Returns:
      The new item