Class BusinessUnitReferenceBuilder

java.lang.Object
com.commercetools.api.models.business_unit.BusinessUnitReferenceBuilder
All Implemented Interfaces:
Builder<BusinessUnitReference>

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

     BusinessUnitReference businessUnitReference = BusinessUnitReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • BusinessUnitReferenceBuilder

      public BusinessUnitReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced BusinessUnit.

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

      Contains the representation of the expanded BusinessUnit. Only present in responses to requests with Reference Expansion for BusinessUnit.

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

      Contains the representation of the expanded BusinessUnit. Only present in responses to requests with Reference Expansion for BusinessUnit.

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

      public String getId()

      Unique identifier of the referenced BusinessUnit.

      Returns:
      id
    • getObj

      @Nullable public BusinessUnit getObj()

      Contains the representation of the expanded BusinessUnit. Only present in responses to requests with Reference Expansion for BusinessUnit.

      Returns:
      obj
    • build

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

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

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

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