Class ReturnInfoBuilder

java.lang.Object
com.commercetools.api.models.order.ReturnInfoBuilder
All Implemented Interfaces:
Builder<ReturnInfo>

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

     ReturnInfo returnInfo = ReturnInfo.builder()
             .plusItems(itemsBuilder -> itemsBuilder)
             .build()
 
  • Constructor Details

    • ReturnInfoBuilder

      public ReturnInfoBuilder()
  • Method Details

    • items

      public ReturnInfoBuilder items(ReturnItem... items)

      Information on the Line Items or Custom Line Items returned.

      Parameters:
      items - value to be set
      Returns:
      Builder
    • items

      public ReturnInfoBuilder items(List<ReturnItem> items)

      Information on the Line Items or Custom Line Items returned.

      Parameters:
      items - value to be set
      Returns:
      Builder
    • plusItems

      public ReturnInfoBuilder plusItems(ReturnItem... items)

      Information on the Line Items or Custom Line Items returned.

      Parameters:
      items - value to be set
      Returns:
      Builder
    • plusItems

      public ReturnInfoBuilder plusItems(Function<ReturnItemBuilder,Builder<? extends ReturnItem>> builder)

      Information on the Line Items or Custom Line Items returned.

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

      public ReturnInfoBuilder withItems(Function<ReturnItemBuilder,Builder<? extends ReturnItem>> builder)

      Information on the Line Items or Custom Line Items returned.

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

      public ReturnInfoBuilder returnTrackingId(@Nullable String returnTrackingId)

      User-defined identifier to track the return.

      Parameters:
      returnTrackingId - value to be set
      Returns:
      Builder
    • returnDate

      public ReturnInfoBuilder returnDate(@Nullable ZonedDateTime returnDate)

      Date and time (UTC) the return is initiated.

      Parameters:
      returnDate - value to be set
      Returns:
      Builder
    • getItems

      public List<ReturnItem> getItems()

      Information on the Line Items or Custom Line Items returned.

      Returns:
      items
    • getReturnTrackingId

      @Nullable public String getReturnTrackingId()

      User-defined identifier to track the return.

      Returns:
      returnTrackingId
    • getReturnDate

      @Nullable public ZonedDateTime getReturnDate()

      Date and time (UTC) the return is initiated.

      Returns:
      returnDate
    • build

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

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

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

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