Class PriceChangedErrorBuilder

java.lang.Object
com.commercetools.api.models.error.PriceChangedErrorBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<PriceChangedError>

public class PriceChangedErrorBuilder extends Object implements io.vrap.rmf.base.client.Builder<PriceChangedError>
PriceChangedErrorBuilder
Example to create an instance using the builder pattern

     PriceChangedError priceChangedError = PriceChangedError.builder()
             .message("{message}")
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .shipping(true)
             .build()
 
  • Constructor Details

  • Method Details

    • message

      Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

      Parameters:
      message - value to be set
      Returns:
      Builder
    • values

      Error-specific additional fields.

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • lineItems

      public PriceChangedErrorBuilder lineItems(String... lineItems)

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

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

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • plusLineItems

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • shipping

      true if the ShippingRate has changed.

      Parameters:
      shipping - value to be set
      Returns:
      Builder
    • getMessage

      public String getMessage()

      Plain text description of the reason for the Price change. For example, "The price or tax of some line items changed at the time of placing the order: $lineItems.".

      Returns:
      message
    • getValues

      Error-specific additional fields.

      Returns:
      pattern properties
    • getLineItems

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Returns:
      lineItems
    • getShipping

      public Boolean getShipping()

      true if the ShippingRate has changed.

      Returns:
      shipping
    • build

      builds PriceChangedError with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<PriceChangedError>
      Returns:
      PriceChangedError
    • buildUnchecked

      builds PriceChangedError without checking for non-null required values
      Returns:
      PriceChangedError
    • of

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

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