Interface GraphQLDiscountCodeNonApplicableError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLDiscountCodeNonApplicableError extends GraphQLErrorObject

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart.

The error is returned as a failed response to:

  • Create Cart and Create Cart in Store requests and Add DiscountCode update action on Carts.
  • Create Cart and Create Cart in Store requests and Add DiscountCode update action on My Carts.
  • Create Cart in BusinessUnit request on Associate Carts.
  • 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.
  • Add DiscountCode update action on Order Edits.
  • Create Order from Cart in BusinessUnit request on Associate Orders.

Example to create an instance using the builder pattern

     GraphQLDiscountCodeNonApplicableError graphQLDiscountCodeNonApplicableError = GraphQLDiscountCodeNonApplicableError.builder()
             .build()
 
  • Field Details

    • DISCOUNT_CODE_NON_APPLICABLE

      static final String DISCOUNT_CODE_NON_APPLICABLE
      discriminator value for GraphQLDiscountCodeNonApplicableError
      See Also:
  • Method Details

    • getCode

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

      Error identifier.

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

      String getDiscountCode()

      Discount Code passed to the Cart.

      Returns:
      discountCode
    • getReason

      String getReason()

      "DoesNotExist" or "TimeRangeNonApplicable"

      Returns:
      reason
    • getDiscountCodeId

      String getDiscountCodeId()

      Unique identifier of the Discount Code.

      Returns:
      discountCodeId
    • getValidFrom

      ZonedDateTime getValidFrom()

      Date and time (UTC) from which the Discount Code is valid.

      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()

      Date and time (UTC) until which the Discount Code is valid.

      Returns:
      validUntil
    • getValidityCheckTime

      ZonedDateTime getValidityCheckTime()

      Date and time (UTC) the Discount Code validity check was last performed.

      Returns:
      validityCheckTime
    • setDiscountCode

      void setDiscountCode(String discountCode)

      Discount Code passed to the Cart.

      Parameters:
      discountCode - value to be set
    • setReason

      void setReason(String reason)

      "DoesNotExist" or "TimeRangeNonApplicable"

      Parameters:
      reason - value to be set
    • setDiscountCodeId

      void setDiscountCodeId(String discountCodeId)

      Unique identifier of the Discount Code.

      Parameters:
      discountCodeId - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

      Date and time (UTC) from which the Discount Code is valid.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Date and time (UTC) until which the Discount Code is valid.

      Parameters:
      validUntil - value to be set
    • setValidityCheckTime

      void setValidityCheckTime(ZonedDateTime validityCheckTime)

      Date and time (UTC) the Discount Code validity check was last performed.

      Parameters:
      validityCheckTime - value to be set
    • of

      factory method
      Returns:
      instance of GraphQLDiscountCodeNonApplicableError
    • of

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

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

      builder factory method for GraphQLDiscountCodeNonApplicableError
      Returns:
      builder
    • builder

      create builder for GraphQLDiscountCodeNonApplicableError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLDiscountCodeNonApplicableError

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