Class Event

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface
Direct Known Subclasses:
V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterNoMeterFoundEvent, V2BillingCadenceBilledEvent, V2BillingCadenceCanceledEvent, V2BillingCadenceCreatedEvent, V2BillingCadenceErroredEvent, V2BillingLicensedItemCreatedEvent, V2BillingLicensedItemUpdatedEvent, V2BillingLicenseFeeCreatedEvent, V2BillingLicenseFeeUpdatedEvent, V2BillingLicenseFeeVersionCreatedEvent, V2BillingMeteredItemCreatedEvent, V2BillingMeteredItemUpdatedEvent, V2BillingPricingPlanComponentCreatedEvent, V2BillingPricingPlanComponentUpdatedEvent, V2BillingPricingPlanCreatedEvent, V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent, V2BillingPricingPlanSubscriptionCollectionCurrentEvent, V2BillingPricingPlanSubscriptionCollectionPastDueEvent, V2BillingPricingPlanSubscriptionCollectionPausedEvent, V2BillingPricingPlanSubscriptionCollectionUnpaidEvent, V2BillingPricingPlanSubscriptionServicingActivatedEvent, V2BillingPricingPlanSubscriptionServicingCanceledEvent, V2BillingPricingPlanSubscriptionServicingPausedEvent, V2BillingPricingPlanUpdatedEvent, V2BillingPricingPlanVersionCreatedEvent, V2BillingRateCardCreatedEvent, V2BillingRateCardRateCreatedEvent, V2BillingRateCardSubscriptionActivatedEvent, V2BillingRateCardSubscriptionCanceledEvent, V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent, V2BillingRateCardSubscriptionCollectionCurrentEvent, V2BillingRateCardSubscriptionCollectionPastDueEvent, V2BillingRateCardSubscriptionCollectionPausedEvent, V2BillingRateCardSubscriptionCollectionUnpaidEvent, V2BillingRateCardSubscriptionServicingActivatedEvent, V2BillingRateCardSubscriptionServicingCanceledEvent, V2BillingRateCardSubscriptionServicingPausedEvent, V2BillingRateCardUpdatedEvent, V2BillingRateCardVersionCreatedEvent, V2CoreAccountClosedEvent, V2CoreAccountCreatedEvent, V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationCustomerUpdatedEvent, V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationMerchantUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientUpdatedEvent, V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationStorerUpdatedEvent, V2CoreAccountIncludingDefaultsUpdatedEvent, V2CoreAccountIncludingIdentityUpdatedEvent, V2CoreAccountIncludingRequirementsUpdatedEvent, V2CoreAccountLinkReturnedEvent, V2CoreAccountPersonCreatedEvent, V2CoreAccountPersonDeletedEvent, V2CoreAccountPersonUpdatedEvent, V2CoreAccountUpdatedEvent, V2CoreEventDestinationPingEvent, V2CoreHealthApiErrorFiringEvent, V2CoreHealthApiErrorResolvedEvent, V2CoreHealthApiLatencyFiringEvent, V2CoreHealthApiLatencyResolvedEvent, V2CoreHealthAuthorizationRateDropFiringEvent, V2CoreHealthAuthorizationRateDropResolvedEvent, V2CoreHealthEventGenerationFailureResolvedEvent, V2CoreHealthFraudRateIncreasedEvent, V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent, V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent, V2CoreHealthPaymentMethodErrorFiringEvent, V2CoreHealthPaymentMethodErrorResolvedEvent, V2CoreHealthTrafficVolumeDropFiringEvent, V2CoreHealthTrafficVolumeDropResolvedEvent, V2CoreHealthWebhookLatencyFiringEvent, V2CoreHealthWebhookLatencyResolvedEvent, V2MoneyManagementAdjustmentCreatedEvent, V2MoneyManagementFinancialAccountCreatedEvent, V2MoneyManagementFinancialAccountUpdatedEvent, V2MoneyManagementFinancialAddressActivatedEvent, V2MoneyManagementFinancialAddressFailedEvent, V2MoneyManagementInboundTransferAvailableEvent, V2MoneyManagementInboundTransferBankDebitFailedEvent, V2MoneyManagementInboundTransferBankDebitProcessingEvent, V2MoneyManagementInboundTransferBankDebitQueuedEvent, V2MoneyManagementInboundTransferBankDebitReturnedEvent, V2MoneyManagementInboundTransferBankDebitSucceededEvent, V2MoneyManagementOutboundPaymentCanceledEvent, V2MoneyManagementOutboundPaymentCreatedEvent, V2MoneyManagementOutboundPaymentFailedEvent, V2MoneyManagementOutboundPaymentPostedEvent, V2MoneyManagementOutboundPaymentReturnedEvent, V2MoneyManagementOutboundPaymentUpdatedEvent, V2MoneyManagementOutboundTransferCanceledEvent, V2MoneyManagementOutboundTransferCreatedEvent, V2MoneyManagementOutboundTransferFailedEvent, V2MoneyManagementOutboundTransferPostedEvent, V2MoneyManagementOutboundTransferReturnedEvent, V2MoneyManagementOutboundTransferUpdatedEvent, V2MoneyManagementPayoutMethodUpdatedEvent, V2MoneyManagementReceivedCreditAvailableEvent, V2MoneyManagementReceivedCreditFailedEvent, V2MoneyManagementReceivedCreditReturnedEvent, V2MoneyManagementReceivedCreditSucceededEvent, V2MoneyManagementReceivedDebitCanceledEvent, V2MoneyManagementReceivedDebitFailedEvent, V2MoneyManagementReceivedDebitPendingEvent, V2MoneyManagementReceivedDebitSucceededEvent, V2MoneyManagementReceivedDebitUpdatedEvent, V2MoneyManagementTransactionCreatedEvent, V2MoneyManagementTransactionUpdatedEvent, V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent, V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent, V2PaymentsOffSessionPaymentCanceledEvent, V2PaymentsOffSessionPaymentCreatedEvent, V2PaymentsOffSessionPaymentFailedEvent, V2PaymentsOffSessionPaymentSucceededEvent, V2ReportingReportRunCreatedEvent, V2ReportingReportRunFailedEvent, V2ReportingReportRunSucceededEvent, V2ReportingReportRunUpdatedEvent

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
    • getChanges

      public Map<String,Object> getChanges()
      Before and after changes for the primary related object.
    • 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()
    • setChanges

      public void setChanges(Map<String,Object> changes)
      Before and after changes for the primary related object.
    • 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