Interface RecurringOrderFailedMessage

All Superinterfaces:
BaseResource, DomainResource<Message>, Identifiable<Message>, Message, Versioned<Message>

public interface RecurringOrderFailedMessage extends Message

Generated after a RecurringOrder failed to process an Order.


Example to create an instance using the builder pattern

     RecurringOrderFailedMessage recurringOrderFailedMessage = RecurringOrderFailedMessage.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .sequenceNumber(0.3)
             .resource(resourceBuilder -> resourceBuilder)
             .resourceVersion(0.3)
             .cartId("{cartId}")
             .failedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .failureReason("{failureReason}")
             .orderScheduledAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Field Details

    • RECURRING_ORDER_FAILED

      static final String RECURRING_ORDER_FAILED
      discriminator value for RecurringOrderFailedMessage
      See Also:
  • Method Details

    • getCartId

      @NotNull @NotNull String getCartId()

      ID of the Cart used in the failed Order creation attempt.

      Returns:
      cartId
    • getFailedAt

      @NotNull @NotNull ZonedDateTime getFailedAt()

      Date and time (UTC) when the Order creation attempt failed.

      Returns:
      failedAt
    • getFailureReason

      @NotNull @NotNull String getFailureReason()

      Description of why the Order creation failed, such as insufficient stock.

      Returns:
      failureReason
    • getOrderScheduledAt

      @NotNull @NotNull ZonedDateTime getOrderScheduledAt()

      Date and time (UTC) the Order was scheduled to be created.

      Returns:
      orderScheduledAt
    • getErrors

      @Valid @Valid List<RecurringOrderFailureError> getErrors()

      Errors due to which the Order creation failed.

      Returns:
      errors
    • setCartId

      void setCartId(String cartId)

      ID of the Cart used in the failed Order creation attempt.

      Parameters:
      cartId - value to be set
    • setFailedAt

      void setFailedAt(ZonedDateTime failedAt)

      Date and time (UTC) when the Order creation attempt failed.

      Parameters:
      failedAt - value to be set
    • setFailureReason

      void setFailureReason(String failureReason)

      Description of why the Order creation failed, such as insufficient stock.

      Parameters:
      failureReason - value to be set
    • setOrderScheduledAt

      void setOrderScheduledAt(ZonedDateTime orderScheduledAt)

      Date and time (UTC) the Order was scheduled to be created.

      Parameters:
      orderScheduledAt - value to be set
    • setErrors

      void setErrors(RecurringOrderFailureError... errors)

      Errors due to which the Order creation failed.

      Parameters:
      errors - values to be set
    • setErrors

      void setErrors(List<RecurringOrderFailureError> errors)

      Errors due to which the Order creation failed.

      Parameters:
      errors - values to be set
    • of

      factory method
      Returns:
      instance of RecurringOrderFailedMessage
    • of

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

      Specified by:
      copyDeep in interface BaseResource
      Specified by:
      copyDeep in interface Message
    • deepCopy

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

      builder factory method for RecurringOrderFailedMessage
      Returns:
      builder
    • builder

      create builder for RecurringOrderFailedMessage instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withRecurringOrderFailedMessage

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