Module: Nombaone::WebhookEventType

Defined in:
lib/nombaone/webhook_event.rb,
sig/nombaone/webhooks.rbs

Overview

Every event type the platform can deliver, as name = value constants (Nombaone::WebhookEventType::INVOICE_PAID == "invoice.paid"), plus the frozen ALL list. Branch on WebhookEvent#type against these.

The catalog is shipped open: an event type the API adds tomorrow is still delivered and parsed — it just will not have a named constant here yet, and never breaks your handler.

Constant Summary collapse

ALL =

The public event catalog (scaffold example.* events are excluded).

Returns:

  • (Array[String])
%w[
  customer.created
  customer.updated
  coupon.created
  discount.created
  discount.removed
  plan.created
  plan.updated
  plan.archived
  price.created
  price.deactivated
  subscription.created
  subscription.updated
  subscription.trial_will_end
  subscription.activated
  subscription.paused
  subscription.resumed
  subscription.canceled
  subscription.churned
  invoice.created
  invoice.finalized
  invoice.paid
  invoice.payment_failed
  invoice.payment_partially_collected
  invoice.payment_recovered
  invoice.action_required
  invoice.voided
  payment_method.attached
  payment_method.updated
  payment_method.expiring
  settlement.created
  settlement.refunded
  settlement.payout_created
].freeze