Interface GraphQLOverlappingPriceValidityError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLOverlappingPriceValidityError extends GraphQLErrorObject

Returned when a given Price validity period conflicts with an existing one. Every Price of a Product Variant 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 Product or Update Product request.


Example to create an instance using the builder pattern

     GraphQLOverlappingPriceValidityError graphQLOverlappingPriceValidityError = GraphQLOverlappingPriceValidityError.builder()
             .conflictingPrice("{conflictingPrice}")
             .currency("{currency}")
             .build()
 
  • Field Details

    • OVERLAPPING_PRICE_VALIDITY

      static final String OVERLAPPING_PRICE_VALIDITY
      discriminator value for GraphQLOverlappingPriceValidityError
      See Also:
  • Method Details

    • getCode

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

      One of the error codes that is listed on the Errors page.

      Specified by:
      getCode in interface GraphQLErrorObject
      Returns:
      code
    • getConflictingPrice

      @NotNull @NotNull String getConflictingPrice()

      Unique identifier of the conflicting Embedded Price.

      Returns:
      conflictingPrice
    • getCurrency

      @NotNull @NotNull String getCurrency()

      Currency code of the Price.

      Returns:
      currency
    • getCountry

      String getCountry()

      Country code of the Price.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupResourceIdentifier getCustomerGroup()

      CustomerGroup for which the Price is valid.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelResourceIdentifier getChannel()

      Channel for which the Price is valid.

      Returns:
      channel
    • getValidFrom

      ZonedDateTime getValidFrom()

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

      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()

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

      Returns:
      validUntil
    • getConflictingValidFrom

      ZonedDateTime getConflictingValidFrom()

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

      Returns:
      conflictingValidFrom
    • getConflictingValidUntil

      ZonedDateTime getConflictingValidUntil()

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

      Returns:
      conflictingValidUntil
    • setConflictingPrice

      void setConflictingPrice(String conflictingPrice)

      Unique identifier of the conflicting Embedded Price.

      Parameters:
      conflictingPrice - value to be set
    • setCurrency

      void setCurrency(String currency)

      Currency code of the Price.

      Parameters:
      currency - value to be set
    • setCountry

      void setCountry(String country)

      Country code of the Price.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupResourceIdentifier customerGroup)

      CustomerGroup for which the Price is valid.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelResourceIdentifier channel)

      Channel for which the Price is valid.

      Parameters:
      channel - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

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

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

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

      Parameters:
      validUntil - value to be set
    • setConflictingValidFrom

      void setConflictingValidFrom(ZonedDateTime conflictingValidFrom)

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

      Parameters:
      conflictingValidFrom - value to be set
    • setConflictingValidUntil

      void setConflictingValidUntil(ZonedDateTime conflictingValidUntil)

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

      Parameters:
      conflictingValidUntil - value to be set
    • of

      factory method
      Returns:
      instance of GraphQLOverlappingPriceValidityError
    • of

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

      Specified by:
      copyDeep in interface GraphQLErrorObject
    • deepCopy

      @Nullable static GraphQLOverlappingPriceValidityError deepCopy(@Nullable GraphQLOverlappingPriceValidityError template)
      factory method to create a deep copy of GraphQLOverlappingPriceValidityError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for GraphQLOverlappingPriceValidityError
      Returns:
      builder
    • builder

      create builder for GraphQLOverlappingPriceValidityError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLOverlappingPriceValidityError

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

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