Class CustomerGroupReferenceBuilder

java.lang.Object
com.commercetools.api.models.customer_group.CustomerGroupReferenceBuilder
All Implemented Interfaces:
Builder<CustomerGroupReference>

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

     CustomerGroupReference customerGroupReference = CustomerGroupReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • CustomerGroupReferenceBuilder

      public CustomerGroupReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced CustomerGroup.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced CustomerGroup.

      Returns:
      id
    • getObj

      @Nullable public CustomerGroup getObj()

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

      Returns:
      obj
    • build

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

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

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

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