Class MoneyOverflowErrorBuilder

java.lang.Object
com.commercetools.api.models.error.MoneyOverflowErrorBuilder
All Implemented Interfaces:
Builder<MoneyOverflowError>

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

     MoneyOverflowError moneyOverflowError = MoneyOverflowError.builder()
             .message("{message}")
             .build()
 
  • Constructor Details

    • MoneyOverflowErrorBuilder

      public MoneyOverflowErrorBuilder()
  • Method Details

    • message

      public MoneyOverflowErrorBuilder message(String message)

      "A Money operation resulted in an overflow."

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

      public MoneyOverflowErrorBuilder values(Map<String,Object> values)

      Error-specific additional fields.

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

      public MoneyOverflowErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

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

      public String getMessage()

      "A Money operation resulted in an overflow."

      Returns:
      message
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • build

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

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

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

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