Class: Stripe::V2::Core::EventNotification
- Inherits:
-
Object
- Object
- Stripe::V2::Core::EventNotification
- Defined in:
- lib/stripe/resources/v2/core/event_notification.rb
Direct Known Subclasses
Events::UnknownEventNotification, Events::V1AccountUpdatedEventNotification, Events::V1ApplicationFeeCreatedEventNotification, Events::V1ApplicationFeeRefundedEventNotification, Events::V1BillingMeterErrorReportTriggeredEventNotification, Events::V1BillingMeterNoMeterFoundEventNotification, Events::V1BillingPortalConfigurationCreatedEventNotification, Events::V1BillingPortalConfigurationUpdatedEventNotification, Events::V1CapabilityUpdatedEventNotification, Events::V1ChargeCapturedEventNotification, Events::V1ChargeDisputeClosedEventNotification, Events::V1ChargeDisputeCreatedEventNotification, Events::V1ChargeDisputeFundsReinstatedEventNotification, Events::V1ChargeDisputeFundsWithdrawnEventNotification, Events::V1ChargeDisputeUpdatedEventNotification, Events::V1ChargeExpiredEventNotification, Events::V1ChargeFailedEventNotification, Events::V1ChargePendingEventNotification, Events::V1ChargeRefundUpdatedEventNotification, Events::V1ChargeRefundedEventNotification, Events::V1ChargeSucceededEventNotification, Events::V1ChargeUpdatedEventNotification, Events::V1CheckoutSessionAsyncPaymentFailedEventNotification, Events::V1CheckoutSessionAsyncPaymentSucceededEventNotification, Events::V1CheckoutSessionCompletedEventNotification, Events::V1CheckoutSessionExpiredEventNotification, Events::V1ClimateOrderCanceledEventNotification, Events::V1ClimateOrderCreatedEventNotification, Events::V1ClimateOrderDelayedEventNotification, Events::V1ClimateOrderDeliveredEventNotification, Events::V1ClimateOrderProductSubstitutedEventNotification, Events::V1ClimateProductCreatedEventNotification, Events::V1ClimateProductPricingUpdatedEventNotification, Events::V1CouponCreatedEventNotification, Events::V1CouponDeletedEventNotification, Events::V1CouponUpdatedEventNotification, Events::V1CreditNoteCreatedEventNotification, Events::V1CreditNoteUpdatedEventNotification, Events::V1CreditNoteVoidedEventNotification, Events::V1CustomerCreatedEventNotification, Events::V1CustomerDeletedEventNotification, Events::V1CustomerSubscriptionCreatedEventNotification, Events::V1CustomerSubscriptionDeletedEventNotification, Events::V1CustomerSubscriptionPausedEventNotification, Events::V1CustomerSubscriptionPendingUpdateAppliedEventNotification, Events::V1CustomerSubscriptionPendingUpdateExpiredEventNotification, Events::V1CustomerSubscriptionResumedEventNotification, Events::V1CustomerSubscriptionTrialWillEndEventNotification, Events::V1CustomerSubscriptionUpdatedEventNotification, Events::V1CustomerTaxIdCreatedEventNotification, Events::V1CustomerTaxIdDeletedEventNotification, Events::V1CustomerTaxIdUpdatedEventNotification, Events::V1CustomerUpdatedEventNotification, Events::V1FileCreatedEventNotification, Events::V1FinancialConnectionsAccountCreatedEventNotification, Events::V1FinancialConnectionsAccountDeactivatedEventNotification, Events::V1FinancialConnectionsAccountDisconnectedEventNotification, Events::V1FinancialConnectionsAccountReactivatedEventNotification, Events::V1FinancialConnectionsAccountRefreshedBalanceEventNotification, Events::V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, Events::V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, Events::V1IdentityVerificationSessionCanceledEventNotification, Events::V1IdentityVerificationSessionCreatedEventNotification, Events::V1IdentityVerificationSessionProcessingEventNotification, Events::V1IdentityVerificationSessionRedactedEventNotification, Events::V1IdentityVerificationSessionRequiresInputEventNotification, Events::V1IdentityVerificationSessionVerifiedEventNotification, Events::V1InvoiceCreatedEventNotification, Events::V1InvoiceDeletedEventNotification, Events::V1InvoiceFinalizationFailedEventNotification, Events::V1InvoiceFinalizedEventNotification, Events::V1InvoiceMarkedUncollectibleEventNotification, Events::V1InvoiceOverdueEventNotification, Events::V1InvoiceOverpaidEventNotification, Events::V1InvoicePaidEventNotification, Events::V1InvoicePaymentActionRequiredEventNotification, Events::V1InvoicePaymentFailedEventNotification, Events::V1InvoicePaymentPaidEventNotification, Events::V1InvoicePaymentSucceededEventNotification, Events::V1InvoiceSentEventNotification, Events::V1InvoiceUpcomingEventNotification, Events::V1InvoiceUpdatedEventNotification, Events::V1InvoiceVoidedEventNotification, Events::V1InvoiceWillBeDueEventNotification, Events::V1InvoiceitemCreatedEventNotification, Events::V1InvoiceitemDeletedEventNotification, Events::V1IssuingAuthorizationCreatedEventNotification, Events::V1IssuingAuthorizationRequestEventNotification, Events::V1IssuingAuthorizationUpdatedEventNotification, Events::V1IssuingCardCreatedEventNotification, Events::V1IssuingCardUpdatedEventNotification, Events::V1IssuingCardholderCreatedEventNotification, Events::V1IssuingCardholderUpdatedEventNotification, Events::V1IssuingDisputeClosedEventNotification, Events::V1IssuingDisputeCreatedEventNotification, Events::V1IssuingDisputeFundsReinstatedEventNotification, Events::V1IssuingDisputeFundsRescindedEventNotification, Events::V1IssuingDisputeSubmittedEventNotification, Events::V1IssuingDisputeUpdatedEventNotification, Events::V1IssuingPersonalizationDesignActivatedEventNotification, Events::V1IssuingPersonalizationDesignDeactivatedEventNotification, Events::V1IssuingPersonalizationDesignRejectedEventNotification, Events::V1IssuingPersonalizationDesignUpdatedEventNotification, Events::V1IssuingTokenCreatedEventNotification, Events::V1IssuingTokenUpdatedEventNotification, Events::V1IssuingTransactionCreatedEventNotification, Events::V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, Events::V1IssuingTransactionUpdatedEventNotification, Events::V1MandateUpdatedEventNotification, Events::V1PaymentIntentAmountCapturableUpdatedEventNotification, Events::V1PaymentIntentCanceledEventNotification, Events::V1PaymentIntentCreatedEventNotification, Events::V1PaymentIntentPartiallyFundedEventNotification, Events::V1PaymentIntentPaymentFailedEventNotification, Events::V1PaymentIntentProcessingEventNotification, Events::V1PaymentIntentRequiresActionEventNotification, Events::V1PaymentIntentSucceededEventNotification, Events::V1PaymentLinkCreatedEventNotification, Events::V1PaymentLinkUpdatedEventNotification, Events::V1PaymentMethodAttachedEventNotification, Events::V1PaymentMethodAutomaticallyUpdatedEventNotification, Events::V1PaymentMethodDetachedEventNotification, Events::V1PaymentMethodUpdatedEventNotification, Events::V1PayoutCanceledEventNotification, Events::V1PayoutCreatedEventNotification, Events::V1PayoutFailedEventNotification, Events::V1PayoutPaidEventNotification, Events::V1PayoutReconciliationCompletedEventNotification, Events::V1PayoutUpdatedEventNotification, Events::V1PersonCreatedEventNotification, Events::V1PersonDeletedEventNotification, Events::V1PersonUpdatedEventNotification, Events::V1PlanCreatedEventNotification, Events::V1PlanDeletedEventNotification, Events::V1PlanUpdatedEventNotification, Events::V1PriceCreatedEventNotification, Events::V1PriceDeletedEventNotification, Events::V1PriceUpdatedEventNotification, Events::V1ProductCreatedEventNotification, Events::V1ProductDeletedEventNotification, Events::V1ProductUpdatedEventNotification, Events::V1PromotionCodeCreatedEventNotification, Events::V1PromotionCodeUpdatedEventNotification, Events::V1QuoteAcceptedEventNotification, Events::V1QuoteCanceledEventNotification, Events::V1QuoteCreatedEventNotification, Events::V1QuoteFinalizedEventNotification, Events::V1RadarEarlyFraudWarningCreatedEventNotification, Events::V1RadarEarlyFraudWarningUpdatedEventNotification, Events::V1RefundCreatedEventNotification, Events::V1RefundFailedEventNotification, Events::V1RefundUpdatedEventNotification, Events::V1ReviewClosedEventNotification, Events::V1ReviewOpenedEventNotification, Events::V1SetupIntentCanceledEventNotification, Events::V1SetupIntentCreatedEventNotification, Events::V1SetupIntentRequiresActionEventNotification, Events::V1SetupIntentSetupFailedEventNotification, Events::V1SetupIntentSucceededEventNotification, Events::V1SigmaScheduledQueryRunCreatedEventNotification, Events::V1SourceCanceledEventNotification, Events::V1SourceChargeableEventNotification, Events::V1SourceFailedEventNotification, Events::V1SourceRefundAttributesRequiredEventNotification, Events::V1SubscriptionScheduleAbortedEventNotification, Events::V1SubscriptionScheduleCanceledEventNotification, Events::V1SubscriptionScheduleCompletedEventNotification, Events::V1SubscriptionScheduleCreatedEventNotification, Events::V1SubscriptionScheduleExpiringEventNotification, Events::V1SubscriptionScheduleReleasedEventNotification, Events::V1SubscriptionScheduleUpdatedEventNotification, Events::V1TaxRateCreatedEventNotification, Events::V1TaxRateUpdatedEventNotification, Events::V1TerminalReaderActionFailedEventNotification, Events::V1TerminalReaderActionSucceededEventNotification, Events::V1TerminalReaderActionUpdatedEventNotification, Events::V1TestHelpersTestClockAdvancingEventNotification, Events::V1TestHelpersTestClockCreatedEventNotification, Events::V1TestHelpersTestClockDeletedEventNotification, Events::V1TestHelpersTestClockInternalFailureEventNotification, Events::V1TestHelpersTestClockReadyEventNotification, Events::V1TopupCanceledEventNotification, Events::V1TopupCreatedEventNotification, Events::V1TopupFailedEventNotification, Events::V1TopupReversedEventNotification, Events::V1TopupSucceededEventNotification, Events::V1TransferCreatedEventNotification, Events::V1TransferReversedEventNotification, Events::V1TransferUpdatedEventNotification, Events::V2BillingBillSettingUpdatedEventNotification, Events::V2BillingCadenceBilledEventNotification, Events::V2BillingCadenceCanceledEventNotification, Events::V2BillingCadenceCreatedEventNotification, Events::V2BillingLicenseFeeCreatedEventNotification, Events::V2BillingLicenseFeeUpdatedEventNotification, Events::V2BillingLicenseFeeVersionCreatedEventNotification, Events::V2BillingLicensedItemCreatedEventNotification, Events::V2BillingLicensedItemUpdatedEventNotification, Events::V2BillingMeteredItemCreatedEventNotification, Events::V2BillingMeteredItemUpdatedEventNotification, Events::V2BillingPricingPlanComponentCreatedEventNotification, Events::V2BillingPricingPlanComponentUpdatedEventNotification, Events::V2BillingPricingPlanCreatedEventNotification, Events::V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification, Events::V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification, Events::V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification, Events::V2BillingPricingPlanSubscriptionCollectionPausedEventNotification, Events::V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification, Events::V2BillingPricingPlanSubscriptionServicingActivatedEventNotification, Events::V2BillingPricingPlanSubscriptionServicingCanceledEventNotification, Events::V2BillingPricingPlanSubscriptionServicingPausedEventNotification, Events::V2BillingPricingPlanUpdatedEventNotification, Events::V2BillingPricingPlanVersionCreatedEventNotification, Events::V2BillingRateCardCreatedEventNotification, Events::V2BillingRateCardRateCreatedEventNotification, Events::V2BillingRateCardSubscriptionActivatedEventNotification, Events::V2BillingRateCardSubscriptionCanceledEventNotification, Events::V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification, Events::V2BillingRateCardSubscriptionCollectionCurrentEventNotification, Events::V2BillingRateCardSubscriptionCollectionPastDueEventNotification, Events::V2BillingRateCardSubscriptionCollectionPausedEventNotification, Events::V2BillingRateCardSubscriptionCollectionUnpaidEventNotification, Events::V2BillingRateCardSubscriptionServicingActivatedEventNotification, Events::V2BillingRateCardSubscriptionServicingCanceledEventNotification, Events::V2BillingRateCardSubscriptionServicingPausedEventNotification, Events::V2BillingRateCardUpdatedEventNotification, Events::V2BillingRateCardVersionCreatedEventNotification, Events::V2CoreAccountClosedEventNotification, Events::V2CoreAccountCreatedEventNotification, Events::V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification, Events::V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification, Events::V2CoreAccountIncludingIdentityUpdatedEventNotification, Events::V2CoreAccountIncludingRequirementsUpdatedEventNotification, Events::V2CoreAccountLinkReturnedEventNotification, Events::V2CoreAccountPersonCreatedEventNotification, Events::V2CoreAccountPersonDeletedEventNotification, Events::V2CoreAccountPersonUpdatedEventNotification, Events::V2CoreAccountUpdatedEventNotification, Events::V2CoreClaimableSandboxClaimedEventNotification, Events::V2CoreClaimableSandboxCreatedEventNotification, Events::V2CoreClaimableSandboxExpiredEventNotification, Events::V2CoreClaimableSandboxExpiringEventNotification, Events::V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification, Events::V2CoreEventDestinationPingEventNotification, Events::V2CoreHealthApiErrorFiringEventNotification, Events::V2CoreHealthApiErrorResolvedEventNotification, Events::V2CoreHealthApiLatencyFiringEventNotification, Events::V2CoreHealthApiLatencyResolvedEventNotification, Events::V2CoreHealthAuthorizationRateDropFiringEventNotification, Events::V2CoreHealthAuthorizationRateDropResolvedEventNotification, Events::V2CoreHealthEventGenerationFailureResolvedEventNotification, Events::V2CoreHealthFraudRateIncreasedEventNotification, Events::V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification, Events::V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification, Events::V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification, Events::V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification, Events::V2CoreHealthPaymentMethodErrorFiringEventNotification, Events::V2CoreHealthPaymentMethodErrorResolvedEventNotification, Events::V2CoreHealthTrafficVolumeDropFiringEventNotification, Events::V2CoreHealthTrafficVolumeDropResolvedEventNotification, Events::V2CoreHealthWebhookLatencyFiringEventNotification, Events::V2CoreHealthWebhookLatencyResolvedEventNotification, Events::V2MoneyManagementAdjustmentCreatedEventNotification, Events::V2MoneyManagementFinancialAccountCreatedEventNotification, Events::V2MoneyManagementFinancialAccountUpdatedEventNotification, Events::V2MoneyManagementFinancialAddressActivatedEventNotification, Events::V2MoneyManagementFinancialAddressFailedEventNotification, Events::V2MoneyManagementInboundTransferAvailableEventNotification, Events::V2MoneyManagementInboundTransferBankDebitFailedEventNotification, Events::V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, Events::V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, Events::V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, Events::V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, Events::V2MoneyManagementOutboundPaymentCanceledEventNotification, Events::V2MoneyManagementOutboundPaymentCreatedEventNotification, Events::V2MoneyManagementOutboundPaymentFailedEventNotification, Events::V2MoneyManagementOutboundPaymentPostedEventNotification, Events::V2MoneyManagementOutboundPaymentReturnedEventNotification, Events::V2MoneyManagementOutboundPaymentUpdatedEventNotification, Events::V2MoneyManagementOutboundTransferCanceledEventNotification, Events::V2MoneyManagementOutboundTransferCreatedEventNotification, Events::V2MoneyManagementOutboundTransferFailedEventNotification, Events::V2MoneyManagementOutboundTransferPostedEventNotification, Events::V2MoneyManagementOutboundTransferReturnedEventNotification, Events::V2MoneyManagementOutboundTransferUpdatedEventNotification, Events::V2MoneyManagementPayoutMethodUpdatedEventNotification, Events::V2MoneyManagementReceivedCreditAvailableEventNotification, Events::V2MoneyManagementReceivedCreditFailedEventNotification, Events::V2MoneyManagementReceivedCreditReturnedEventNotification, Events::V2MoneyManagementReceivedCreditSucceededEventNotification, Events::V2MoneyManagementReceivedDebitCanceledEventNotification, Events::V2MoneyManagementReceivedDebitFailedEventNotification, Events::V2MoneyManagementReceivedDebitPendingEventNotification, Events::V2MoneyManagementReceivedDebitSucceededEventNotification, Events::V2MoneyManagementReceivedDebitUpdatedEventNotification, Events::V2MoneyManagementRecipientVerificationCreatedEventNotification, Events::V2MoneyManagementRecipientVerificationUpdatedEventNotification, Events::V2MoneyManagementTransactionCreatedEventNotification, Events::V2MoneyManagementTransactionUpdatedEventNotification, Events::V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, Events::V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, Events::V2PaymentsOffSessionPaymentCanceledEventNotification, Events::V2PaymentsOffSessionPaymentCreatedEventNotification, Events::V2PaymentsOffSessionPaymentFailedEventNotification, Events::V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, Events::V2PaymentsOffSessionPaymentSucceededEventNotification
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#fetch_event ⇒ Object
Retrieves the Event that generated this EventNotification.
-
#initialize(event_payload, client) ⇒ EventNotification
constructor
A new instance of EventNotification.
Constructor Details
#initialize(event_payload, client) ⇒ EventNotification
Returns a new instance of EventNotification.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 37 def initialize(event_payload, client) @id = event_payload[:id] @type = event_payload[:type] @created = event_payload[:created] @livemode = event_payload[:livemode] @reason = EventReason.new(event_payload[:reason]) if event_payload[:reason] if event_payload[:context] && !event_payload[:context].empty? @context = StripeContext.parse(event_payload[:context]) end # private unless a child declares an attr_reader @related_object = RelatedObject.new(event_payload[:related_object]) if event_payload[:related_object] # internal use @client = client end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def context @context end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def created @created end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def livemode @livemode end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def reason @reason end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
35 36 37 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 35 def type @type end |
Instance Method Details
#fetch_event ⇒ Object
Retrieves the Event that generated this EventNotification.
54 55 56 57 58 |
# File 'lib/stripe/resources/v2/core/event_notification.rb', line 54 def fetch_event resp = @client.raw_request(:get, "/v2/core/events/#{id}", opts: { stripe_context: context }, usage: ["fetch_event"]) @client.deserialize(resp.http_body, api_mode: :v2) end |