Class ModifiedByBuilder

java.lang.Object
com.commercetools.history.models.change_history.ModifiedByBuilder
All Implemented Interfaces:
Builder<ModifiedBy>

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

     ModifiedBy modifiedBy = ModifiedBy.builder()
             .id("{id}")
             .type("{type}")
             .isPlatformClient(true)
             .build()
 
  • Constructor Details

    • ModifiedByBuilder

      public ModifiedByBuilder()
  • Method Details

    • id

      public ModifiedByBuilder id(String id)

      ID of the Merchant Center user who made the change.

      Present only if the change was made in the Merchant Center.

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

      public ModifiedByBuilder type(String type)

      Indicates who performed the change.

      • If the change was made by a user, the value is "user".
      • If the change was made by an API Client with or without an external user ID, the value is "external-user".
      • If the change was made by an Associate, the value is "associate".
      Parameters:
      type - value to be set
      Returns:
      Builder
    • clientId

      public ModifiedByBuilder clientId(@Nullable String clientId)

      ID of the API Client that made the change.

      Present only if the change was made using an API Client.

      Parameters:
      clientId - value to be set
      Returns:
      Builder
    • anonymousId

      public ModifiedByBuilder anonymousId(@Nullable String anonymousId)

      Present only if the change was made using a token from an anonymous session.

      Parameters:
      anonymousId - value to be set
      Returns:
      Builder
    • customer

      The Customer who made the change.

      Present only if the change was made using a token from the password flow.

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

      public ModifiedByBuilder withCustomer(Function<ReferenceBuilder,Reference> builder)

      The Customer who made the change.

      Present only if the change was made using a token from the password flow.

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

      public ModifiedByBuilder customer(@Nullable Reference customer)

      The Customer who made the change.

      Present only if the change was made using a token from the password flow.

      Parameters:
      customer - value to be set
      Returns:
      Builder
    • associate

      The Associate who made the change in the context of a Business Unit. Present only if the Associate acts on behalf of a company using the associate endpoints.

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

      public ModifiedByBuilder withAssociate(Function<ReferenceBuilder,Reference> builder)

      The Associate who made the change in the context of a Business Unit. Present only if the Associate acts on behalf of a company using the associate endpoints.

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

      public ModifiedByBuilder associate(@Nullable Reference associate)

      The Associate who made the change in the context of a Business Unit. Present only if the Associate acts on behalf of a company using the associate endpoints.

      Parameters:
      associate - value to be set
      Returns:
      Builder
    • isPlatformClient

      public ModifiedByBuilder isPlatformClient(Boolean isPlatformClient)

      true if the change was made using the Merchant Center or ImpEx.

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

      public String getId()

      ID of the Merchant Center user who made the change.

      Present only if the change was made in the Merchant Center.

      Returns:
      id
    • getType

      public String getType()

      Indicates who performed the change.

      • If the change was made by a user, the value is "user".
      • If the change was made by an API Client with or without an external user ID, the value is "external-user".
      • If the change was made by an Associate, the value is "associate".
      Returns:
      type
    • getClientId

      @Nullable public String getClientId()

      ID of the API Client that made the change.

      Present only if the change was made using an API Client.

      Returns:
      clientId
    • getAnonymousId

      @Nullable public String getAnonymousId()

      Present only if the change was made using a token from an anonymous session.

      Returns:
      anonymousId
    • getCustomer

      @Nullable public Reference getCustomer()

      The Customer who made the change.

      Present only if the change was made using a token from the password flow.

      Returns:
      customer
    • getAssociate

      @Nullable public Reference getAssociate()

      The Associate who made the change in the context of a Business Unit. Present only if the Associate acts on behalf of a company using the associate endpoints.

      Returns:
      associate
    • getIsPlatformClient

      public Boolean getIsPlatformClient()

      true if the change was made using the Merchant Center or ImpEx.

      Returns:
      isPlatformClient
    • build

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

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

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

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