Class CustomerReferenceBuilder

java.lang.Object
com.commercetools.api.models.customer.CustomerReferenceBuilder
All Implemented Interfaces:
Builder<CustomerReference>

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

     CustomerReference customerReference = CustomerReference.builder()
             .id("{id}")
             .build()
 
  • Constructor Details

    • CustomerReferenceBuilder

      public CustomerReferenceBuilder()
  • Method Details

    • id

      Unique identifier of the referenced Customer.

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

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

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

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

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

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

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

      public String getId()

      Unique identifier of the referenced Customer.

      Returns:
      id
    • getObj

      @Nullable public Customer getObj()

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

      Returns:
      obj
    • build

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

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

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

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