Class Event

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface
Direct Known Subclasses:
V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterNoMeterFoundEvent, V2CoreEventDestinationPingEvent

public class Event extends StripeObject implements HasId, StripeActiveObject
  • Constructor Details

    • Event

      public Event()
  • Method Details

    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • fetchRelatedObject

      protected StripeObject fetchRelatedObject(Event.RelatedObject relatedObject) throws StripeException
      Retrieves the object associated with the event.
      Throws:
      StripeException
    • parse

      public static Event parse(String payload)
      Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException if the payload is not valid JSON.
      Parameters:
      payload - the payload sent by Stripe.
      Returns:
      the StripeEvent instance
    • getContext

      public String getContext()
      Authentication context needed to fetch the event or related object.
    • getCreated

      public Instant getCreated()
      Time at which the object was created.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value of the object field.

      Equal to v2.core.event.

    • getReason

      public Event.Reason getReason()
      Reason for the event.
    • getType

      public String getType()
      The type of the event.
    • getResponseGetter

      public StripeResponseGetter getResponseGetter()
    • setContext

      public void setContext(String context)
      Authentication context needed to fetch the event or related object.
    • setCreated

      public void setCreated(Instant created)
      Time at which the object was created.
    • setId

      public void setId(String id)
      Unique identifier for the event.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value of the object field.

      Equal to v2.core.event.

    • setReason

      public void setReason(Event.Reason reason)
      Reason for the event.
    • setType

      public void setType(String type)
      The type of the event.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the event.
      Specified by:
      getId in interface HasId