Class AttributionBuilder

java.lang.Object
com.commercetools.api.models.common.AttributionBuilder
All Implemented Interfaces:
Builder<Attribution>

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

     Attribution attribution = Attribution.builder()
             .source(AttributionSource.IMPORT)
             .build()
 
  • Constructor Details

    • AttributionBuilder

      public AttributionBuilder()
  • Method Details

    • clientId

      public AttributionBuilder clientId(@Nullable String clientId)

      id of the API Client that created or modified the resource.

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

      public AttributionBuilder source(AttributionSource source)

      Method used to initiate the creation or modification of the resource.

      Parameters:
      source - value to be set
      Returns:
      Builder
    • getClientId

      @Nullable public String getClientId()

      id of the API Client that created or modified the resource.

      Returns:
      clientId
    • getSource

      public AttributionSource getSource()

      Method used to initiate the creation or modification of the resource.

      Returns:
      source
    • build

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

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

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

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