Interface RecurringOrderFailedMessagePayload

All Superinterfaces:
MessagePayload, MessagePayloadMixin

public interface RecurringOrderFailedMessagePayload extends MessagePayload

Generated after a RecurringOrder failed to process an Order.


Example to create an instance using the builder pattern

     RecurringOrderFailedMessagePayload recurringOrderFailedMessagePayload = RecurringOrderFailedMessagePayload.builder()
             .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 RecurringOrderFailedMessagePayload
      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 RecurringOrderFailedMessagePayload
    • of

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

      Specified by:
      copyDeep in interface MessagePayload
    • deepCopy

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

      builder factory method for RecurringOrderFailedMessagePayload
      Returns:
      builder
    • builder

      create builder for RecurringOrderFailedMessagePayload instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withRecurringOrderFailedMessagePayload

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