Class MessagesConfigurationDraftBuilder

java.lang.Object
com.commercetools.api.models.message.MessagesConfigurationDraftBuilder
All Implemented Interfaces:
Builder<MessagesConfigurationDraft>
Direct Known Subclasses:
MessageConfigurationDraftBuilder

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

     MessagesConfigurationDraft messagesConfigurationDraft = MessagesConfigurationDraft.builder()
             .enabled(true)
             .deleteDaysAfterCreation(0.3)
             .build()
 
  • Constructor Details

    • MessagesConfigurationDraftBuilder

      public MessagesConfigurationDraftBuilder()
  • Method Details

    • enabled

      public MessagesConfigurationDraftBuilder enabled(Boolean enabled)

      Setting to true activates the Messages Query feature.

      Parameters:
      enabled - value to be set
      Returns:
      Builder
    • deleteDaysAfterCreation

      public MessagesConfigurationDraftBuilder deleteDaysAfterCreation(Integer deleteDaysAfterCreation)

      Specifies the number of days each Message should be available via the Messages Query API. For Messages older than the specified period, it is not guaranteed that they are still accessible via the API.

      Parameters:
      deleteDaysAfterCreation - value to be set
      Returns:
      Builder
    • getEnabled

      public Boolean getEnabled()

      Setting to true activates the Messages Query feature.

      Returns:
      enabled
    • getDeleteDaysAfterCreation

      public Integer getDeleteDaysAfterCreation()

      Specifies the number of days each Message should be available via the Messages Query API. For Messages older than the specified period, it is not guaranteed that they are still accessible via the API.

      Returns:
      deleteDaysAfterCreation
    • build

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

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

      factory method for an instance of MessagesConfigurationDraftBuilder
      Returns:
      builder
    • of

      create builder for MessagesConfigurationDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder