Interface GraphQLPriceChangedError

All Superinterfaces:
GraphQLErrorObject
All Known Implementing Classes:
GraphQLPriceChangedErrorImpl

public interface GraphQLPriceChangedError extends GraphQLErrorObject

Returned when the Price, Tax Rate, or Shipping Rate of some Line Items changed since they were last added to the Cart.

The error is returned as a failed response to:

  • Create Order from Cart and Create Order in Store from Cart requests on Orders.
  • Create Order from Cart and Create Order in Store from Cart requests on My Orders.

Example to create an instance using the builder pattern

     GraphQLPriceChangedError graphQLPriceChangedError = GraphQLPriceChangedError.builder()
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .shipping(true)
             .build()
 
  • Field Details

  • Method Details

    • getCode

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

      Error identifier.

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

      @NotNull @NotNull List<String> getLineItems()

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Returns:
      lineItems
    • getShipping

      @NotNull @NotNull Boolean getShipping()

      true if the ShippingRate has changed.

      Returns:
      shipping
    • setLineItems

      void setLineItems(String... lineItems)

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<String> lineItems)

      Unique identifiers of the Line Items for which the Price or TaxRate has changed.

      Parameters:
      lineItems - values to be set
    • setShipping

      void setShipping(Boolean shipping)

      true if the ShippingRate has changed.

      Parameters:
      shipping - value to be set
    • of

      factory method
      Returns:
      instance of GraphQLPriceChangedError
    • of

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

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

      builder factory method for GraphQLPriceChangedError
      Returns:
      builder
    • builder

      create builder for GraphQLPriceChangedError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLPriceChangedError

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