Class QuoteReferenceBuilder

java.lang.Object
com.commercetools.api.models.quote.QuoteReferenceBuilder
All Implemented Interfaces:
Builder<QuoteReference>

public class QuoteReferenceBuilder extends Object implements Builder<QuoteReference>
QuoteReferenceBuilder
Example to create an instance using the builder pattern

     QuoteReference quoteReference = QuoteReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • QuoteReferenceBuilder

      public QuoteReferenceBuilder()
  • Method Details

    • id

      public QuoteReferenceBuilder id(String id)

      Unique ID of the referenced resource.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Quote. Only present in responses to requests with Reference Expansion for Quote.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • withObj

      public QuoteReferenceBuilder withObj(Function<QuoteBuilder,Quote> builder)

      Contains the representation of the expanded Quote. Only present in responses to requests with Reference Expansion for Quote.

      Parameters:
      builder - function to build the obj value
      Returns:
      Builder
    • obj

      Contains the representation of the expanded Quote. Only present in responses to requests with Reference Expansion for Quote.

      Parameters:
      obj - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique ID of the referenced resource.

      Returns:
      id
    • getObj

      @Nullable public Quote getObj()

      Contains the representation of the expanded Quote. Only present in responses to requests with Reference Expansion for Quote.

      Returns:
      obj
    • build

      public QuoteReference build()
      builds QuoteReference with checking for non-null required values
      Specified by:
      build in interface Builder<QuoteReference>
      Returns:
      QuoteReference
    • buildUnchecked

      public QuoteReference buildUnchecked()
      builds QuoteReference without checking for non-null required values
      Returns:
      QuoteReference
    • of

      public static QuoteReferenceBuilder of()
      factory method for an instance of QuoteReferenceBuilder
      Returns:
      builder
    • of

      public static QuoteReferenceBuilder of(QuoteReference template)
      create builder for QuoteReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder