Interface DiscountCodeReference

All Superinterfaces:
Identifiable<DiscountCode>, Reference, ReferenceMixin

public interface DiscountCodeReference extends Reference, Identifiable<DiscountCode>

Reference to a DiscountCode.


Example to create an instance using the builder pattern

     DiscountCodeReference discountCodeReference = DiscountCodeReference.builder()
             .id("{id}")
             .build()
 
  • Field Details

  • Method Details

    • getObj

      @Valid @Valid DiscountCode getObj()

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

      Returns:
      obj
    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the referenced DiscountCode.

      Specified by:
      getId in interface Identifiable<DiscountCode>
      Specified by:
      getId in interface Reference
      Specified by:
      getId in interface ReferenceMixin
      Returns:
      id
    • setObj

      void setObj(DiscountCode obj)

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

      Parameters:
      obj - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced DiscountCode.

      Specified by:
      setId in interface Reference
      Parameters:
      id - value to be set
    • of

      static DiscountCodeReference of()
      factory method
      Returns:
      instance of DiscountCodeReference
    • of

      factory method to create a shallow copy DiscountCodeReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of DiscountCodeReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static DiscountCodeReferenceBuilder builder()
      builder factory method for DiscountCodeReference
      Returns:
      builder
    • builder

      create builder for DiscountCodeReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withDiscountCodeReference

      default <T> T withDiscountCodeReference(Function<DiscountCodeReference,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<DiscountCodeReference> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference