Interface Event

All Known Subinterfaces:
CheckoutOrderCreationFailedEvent, CheckoutPaymentAuthorizationCancelledEvent, CheckoutPaymentAuthorizationFailedEvent, CheckoutPaymentAuthorizedEvent, CheckoutPaymentCancelAuthorizationFailedEvent, CheckoutPaymentChargedEvent, CheckoutPaymentChargeFailedEvent, CheckoutPaymentRefundedEvent, CheckoutPaymentRefundFailedEvent, ImportContainerCreatedEvent, ImportContainerDeletedEvent, ImportOperationRejectedEvent, ImportUnresolvedEvent, ImportValidationFailedEvent, ImportWaitForMasterVariantEvent

public interface Event

Base representation of an Event containing common fields to all Event Types.


Example to create a subtype instance using the builder pattern

     Event event = Event.checkoutOrderCreationFailedBuilder()
             id("{id}")
             notificationType("{notificationType}")
             resourceType(EventSubscriptionResourceTypeId.CHECKOUT)
             createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             data(dataBuilder -> dataBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Event.

      Returns:
      id
    • getNotificationType

      @NotNull @NotNull String getNotificationType()
      Returns:
      notificationType
    • getResourceType

      @NotNull @NotNull EventSubscriptionResourceTypeId getResourceType()

      The type of resource targeted by the Event.

      Returns:
      resourceType
    • getType

      @NotNull @NotNull EventType getType()

      The type of Event that has occurred.

      Returns:
      type
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Event was generated.

      Returns:
      createdAt
    • setId

      void setId(String id)

      Unique identifier of the Event.

      Parameters:
      id - value to be set
    • setNotificationType

      void setNotificationType(String notificationType)
      set notificationType
      Parameters:
      notificationType - value to be set
    • setResourceType

      void setResourceType(EventSubscriptionResourceTypeId resourceType)

      The type of resource targeted by the Event.

      Parameters:
      resourceType - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Event was generated.

      Parameters:
      createdAt - value to be set
    • copyDeep

      Event copyDeep()
    • deepCopy

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

      static CheckoutOrderCreationFailedEventBuilder checkoutOrderCreationFailedBuilder()
      builder for checkoutOrderCreationFailed subtype
      Returns:
      builder
    • checkoutPaymentAuthorizationCancelledBuilder

      static CheckoutPaymentAuthorizationCancelledEventBuilder checkoutPaymentAuthorizationCancelledBuilder()
      builder for checkoutPaymentAuthorizationCancelled subtype
      Returns:
      builder
    • checkoutPaymentAuthorizationFailedBuilder

      static CheckoutPaymentAuthorizationFailedEventBuilder checkoutPaymentAuthorizationFailedBuilder()
      builder for checkoutPaymentAuthorizationFailed subtype
      Returns:
      builder
    • checkoutPaymentAuthorizedBuilder

      static CheckoutPaymentAuthorizedEventBuilder checkoutPaymentAuthorizedBuilder()
      builder for checkoutPaymentAuthorized subtype
      Returns:
      builder
    • checkoutPaymentCancelAuthorizationFailedBuilder

      static CheckoutPaymentCancelAuthorizationFailedEventBuilder checkoutPaymentCancelAuthorizationFailedBuilder()
      builder for checkoutPaymentCancelAuthorizationFailed subtype
      Returns:
      builder
    • checkoutPaymentChargeFailedBuilder

      static CheckoutPaymentChargeFailedEventBuilder checkoutPaymentChargeFailedBuilder()
      builder for checkoutPaymentChargeFailed subtype
      Returns:
      builder
    • checkoutPaymentChargedBuilder

      static CheckoutPaymentChargedEventBuilder checkoutPaymentChargedBuilder()
      builder for checkoutPaymentCharged subtype
      Returns:
      builder
    • checkoutPaymentRefundFailedBuilder

      static CheckoutPaymentRefundFailedEventBuilder checkoutPaymentRefundFailedBuilder()
      builder for checkoutPaymentRefundFailed subtype
      Returns:
      builder
    • checkoutPaymentRefundedBuilder

      static CheckoutPaymentRefundedEventBuilder checkoutPaymentRefundedBuilder()
      builder for checkoutPaymentRefunded subtype
      Returns:
      builder
    • importContainerCreatedBuilder

      static ImportContainerCreatedEventBuilder importContainerCreatedBuilder()
      builder for importContainerCreated subtype
      Returns:
      builder
    • importContainerDeletedBuilder

      static ImportContainerDeletedEventBuilder importContainerDeletedBuilder()
      builder for importContainerDeleted subtype
      Returns:
      builder
    • importOperationRejectedBuilder

      static ImportOperationRejectedEventBuilder importOperationRejectedBuilder()
      builder for importOperationRejected subtype
      Returns:
      builder
    • importUnresolvedBuilder

      static ImportUnresolvedEventBuilder importUnresolvedBuilder()
      builder for importUnresolved subtype
      Returns:
      builder
    • importValidationFailedBuilder

      static ImportValidationFailedEventBuilder importValidationFailedBuilder()
      builder for importValidationFailed subtype
      Returns:
      builder
    • importWaitForMasterVariantBuilder

      static ImportWaitForMasterVariantEventBuilder importWaitForMasterVariantBuilder()
      builder for importWaitForMasterVariant subtype
      Returns:
      builder
    • withEvent

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