Interface OverlappingStandalonePriceValidityError

All Superinterfaces:
ErrorObject

public interface OverlappingStandalonePriceValidityError extends ErrorObject

Returned when a given Price validity period conflicts with an existing one. Every Standalone Price associated with the same SKU and with the same combination of currency, country, Customer Group, and Channel, must have non-overlapping validity periods (validFrom and validUntil).

The error is returned as a failed response to the Create StandalonePrice request.


Example to create an instance using the builder pattern

     OverlappingStandalonePriceValidityError overlappingStandalonePriceValidityError = OverlappingStandalonePriceValidityError.builder()
             .message("{message}")
             .conflictingStandalonePrice(conflictingStandalonePriceBuilder -> conflictingStandalonePriceBuilder)
             .sku("{sku}")
             .currency("{currency}")
             .build()
 
  • Field Details

    • OVERLAPPING_STANDALONE_PRICE_VALIDITY

      static final String OVERLAPPING_STANDALONE_PRICE_VALIDITY
      discriminator value for OverlappingStandalonePriceValidityError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      Two standalone prices have overlapping validity periods."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getConflictingStandalonePrice

      @NotNull @Valid @NotNull @Valid StandalonePriceReference getConflictingStandalonePrice()

      Reference to the conflicting Standalone Price.

      Returns:
      conflictingStandalonePrice
    • getSku

      @NotNull @NotNull String getSku()

      SKU of the ProductVariant to which the conflicting Standalone Price is associated.

      Returns:
      sku
    • getCurrency

      @NotNull @NotNull String getCurrency()

      Currency code of the country.

      Returns:
      currency
    • getCountry

      String getCountry()

      Country code of the geographic location.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupResourceIdentifier getCustomerGroup()

      CustomerGroup for which the Standalone Price is valid.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelResourceIdentifier getChannel()

      Channel for which the Standalone Price is valid.

      Returns:
      channel
    • getValidFrom

      ZonedDateTime getValidFrom()

      Date and time (UTC) from which the Standalone Price is valid.

      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()

      Date and time (UTC) until which the Standalone Price is valid.

      Returns:
      validUntil
    • getConflictingValidFrom

      ZonedDateTime getConflictingValidFrom()

      Date and time (UTC) from which the conflicting Standalone Price is valid.

      Returns:
      conflictingValidFrom
    • getConflictingValidUntil

      ZonedDateTime getConflictingValidUntil()

      Date and time (UTC) until which the conflicting Standalone Price is valid.

      Returns:
      conflictingValidUntil
    • setMessage

      void setMessage(String message)

      Two standalone prices have overlapping validity periods."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setConflictingStandalonePrice

      void setConflictingStandalonePrice(StandalonePriceReference conflictingStandalonePrice)

      Reference to the conflicting Standalone Price.

      Parameters:
      conflictingStandalonePrice - value to be set
    • setSku

      void setSku(String sku)

      SKU of the ProductVariant to which the conflicting Standalone Price is associated.

      Parameters:
      sku - value to be set
    • setCurrency

      void setCurrency(String currency)

      Currency code of the country.

      Parameters:
      currency - value to be set
    • setCountry

      void setCountry(String country)

      Country code of the geographic location.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupResourceIdentifier customerGroup)

      CustomerGroup for which the Standalone Price is valid.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelResourceIdentifier channel)

      Channel for which the Standalone Price is valid.

      Parameters:
      channel - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

      Date and time (UTC) from which the Standalone Price is valid.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Date and time (UTC) until which the Standalone Price is valid.

      Parameters:
      validUntil - value to be set
    • setConflictingValidFrom

      void setConflictingValidFrom(ZonedDateTime conflictingValidFrom)

      Date and time (UTC) from which the conflicting Standalone Price is valid.

      Parameters:
      conflictingValidFrom - value to be set
    • setConflictingValidUntil

      void setConflictingValidUntil(ZonedDateTime conflictingValidUntil)

      Date and time (UTC) until which the conflicting Standalone Price is valid.

      Parameters:
      conflictingValidUntil - value to be set
    • of

      factory method
      Returns:
      instance of OverlappingStandalonePriceValidityError
    • of

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

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

      builder factory method for OverlappingStandalonePriceValidityError
      Returns:
      builder
    • builder

      create builder for OverlappingStandalonePriceValidityError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOverlappingStandalonePriceValidityError

      default <T> T withOverlappingStandalonePriceValidityError(Function<OverlappingStandalonePriceValidityError,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<OverlappingStandalonePriceValidityError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference