Interface QuoteDraft

All Superinterfaces:
CustomizableDraft<QuoteDraft>, Draft<QuoteDraft>, WithKey

public interface QuoteDraft extends CustomizableDraft<QuoteDraft>, WithKey, Draft<QuoteDraft>
QuoteDraft
Example to create an instance using the builder pattern

     QuoteDraft quoteDraft = QuoteDraft.builder()
             .stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
             .stagedQuoteVersion(0.3)
             .build()
 
  • Method Details

    • getKey

      String getKey()

      User-defined unique identifier for the Quote.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getStagedQuote

      @NotNull @Valid @NotNull @Valid StagedQuoteResourceIdentifier getStagedQuote()

      StagedQuote from which the Quote is created.

      Returns:
      stagedQuote
    • getStagedQuoteVersion

      @NotNull @NotNull Long getStagedQuoteVersion()

      Current version of the StagedQuote.

      Returns:
      stagedQuoteVersion
    • getStagedQuoteStateToSent

      Boolean getStagedQuoteStateToSent()

      If true, the stagedQuoteState of the referenced StagedQuote will be set to Sent.

      Returns:
      stagedQuoteStateToSent
    • getState

      @Valid @Valid StateReference getState()

      State of the Quote. This reference can point to a State in a custom workflow.

      Returns:
      state
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields to be added to the Quote.

      • If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
      • If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
      Specified by:
      getCustom in interface CustomizableDraft<QuoteDraft>
      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Quote.

      Parameters:
      key - value to be set
    • setStagedQuote

      void setStagedQuote(StagedQuoteResourceIdentifier stagedQuote)

      StagedQuote from which the Quote is created.

      Parameters:
      stagedQuote - value to be set
    • setStagedQuoteVersion

      void setStagedQuoteVersion(Long stagedQuoteVersion)

      Current version of the StagedQuote.

      Parameters:
      stagedQuoteVersion - value to be set
    • setStagedQuoteStateToSent

      void setStagedQuoteStateToSent(Boolean stagedQuoteStateToSent)

      If true, the stagedQuoteState of the referenced StagedQuote will be set to Sent.

      Parameters:
      stagedQuoteStateToSent - value to be set
    • setState

      void setState(StateReference state)

      State of the Quote. This reference can point to a State in a custom workflow.

      Parameters:
      state - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields to be added to the Quote.

      • If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
      • If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
      Specified by:
      setCustom in interface CustomizableDraft<QuoteDraft>
      Parameters:
      custom - value to be set
    • of

      static QuoteDraft of()
      factory method
      Returns:
      instance of QuoteDraft
    • of

      static QuoteDraft of(QuoteDraft template)
      factory method to create a shallow copy QuoteDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static QuoteDraft deepCopy(@Nullable QuoteDraft template)
      factory method to create a deep copy of QuoteDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static QuoteDraftBuilder builder()
      builder factory method for QuoteDraft
      Returns:
      builder
    • builder

      static QuoteDraftBuilder builder(QuoteDraft template)
      create builder for QuoteDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withQuoteDraft

      default <T> T withQuoteDraft(Function<QuoteDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<QuoteDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference