Package com.stripe.model.v2.core
Class EventNotification
java.lang.Object
com.stripe.model.v2.core.EventNotification
- Direct Known Subclasses:
UnknownEventNotification,V1BillingMeterErrorReportTriggeredEventNotification,V1BillingMeterNoMeterFoundEventNotification,V2CoreEventDestinationPingEventNotification
`EventNotification` represents the common properties for json that's delivered from an Event
Destination. A concrete child of `EventNotification` will be returned from
`StripeClient.parseEventNotificaion()`. You will likely want to cast that object to a more
specific child of `EventNotification`, like `PushedV1BillingMeterErrorReportTriggeredEvent`
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classFor more details about Request, please refer to the API Reference. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StripeClient[Optional] Authentication context needed to fetch the event or related object.Time at which the object was created.Unique identifier for the event.Livemode indicates if the event is from a production(true) or test(false) account.[Optional] Reason for the event.The type of the event. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Eventprotected StripeObjectfetchRelatedObject(Event.RelatedObject relatedObject) Retrieves the object associated with the event.static EventNotificationfromJson(String payload, StripeClient client) Helper for constructing an Event Notification.[Optional] Authentication context needed to fetch the event or related object.Time at which the object was created.getId()Unique identifier for the event.Livemode indicates if the event is from a production(true) or test(false) account.[Optional] Reason for the event.getType()The type of the event.
-
Field Details
-
id
Unique identifier for the event. -
type
The type of the event. -
created
Time at which the object was created. -
livemode
Livemode indicates if the event is from a production(true) or test(false) account. -
context
[Optional] Authentication context needed to fetch the event or related object. -
reason
[Optional] Reason for the event. -
client
-
-
Constructor Details
-
EventNotification
public EventNotification()
-
-
Method Details
-
fromJson
Helper for constructing an Event Notification. Doesn't perform signature validation, so you should useStripeClient.parseEventNotification(java.lang.String, java.lang.String, java.lang.String)instead for initial handling. This is useful in unit tests and working with EventNotifications that you've already validated the authenticity of. -
fetchEvent
- Throws:
StripeException
-
fetchRelatedObject
Retrieves the object associated with the event.- Throws:
StripeException
-
getId
Unique identifier for the event. -
getType
The type of the event. -
getCreated
Time at which the object was created. -
getLivemode
Livemode indicates if the event is from a production(true) or test(false) account. -
getContext
[Optional] Authentication context needed to fetch the event or related object. -
getReason
[Optional] Reason for the event.
-