PubSub events for PhoenixKit Billing system.
Broadcasts billing-related events for real-time updates in LiveViews.
Uses PhoenixKit.PubSub.Manager for self-contained PubSub operations.
Topics
phoenix_kit:billing:orders- Order events (created, updated, confirmed, paid, cancelled)phoenix_kit:billing:invoices- Invoice events (created, sent, paid, voided)phoenix_kit:billing:profiles- Billing profile events (created, updated, deleted)phoenix_kit:billing:transactions- Transaction events (created, refunded)phoenix_kit:billing:credit_notes- Credit note events (sent, applied)
Usage Examples
# Subscribe to order events
PhoenixKit.Modules.Billing.Events.subscribe_orders()
# Handle in LiveView
def handle_info({:order_created, order}, socket) do
# Update UI
{:noreply, socket}
end
# Broadcast order created
PhoenixKit.Modules.Billing.Events.broadcast_order_created(order)
Summary
Functions
Broadcasts credit note applied event.
Broadcasts credit note sent event.
Broadcasts invoice created event.
Broadcasts invoice paid event.
Broadcasts invoice sent event.
Broadcasts invoice voided event.
Broadcasts order cancelled event.
Broadcasts order confirmed event.
Broadcasts order created event.
Broadcasts order paid event.
Broadcasts order updated event.
Broadcasts billing profile created event.
Broadcasts billing profile deleted event.
Broadcasts billing profile updated event.
Broadcasts subscription cancelled event.
Broadcasts subscription created event.
Broadcasts subscription renewed event.
Broadcasts subscription status changed event.
Broadcasts subscription type changed event.
Broadcasts transaction created event.
Broadcasts transaction refunded event.
Subscribes to credit note events.
Subscribes to invoice events.
Subscribes to order events.
Subscribes to billing profile events.
Subscribes to subscription events.
Subscribes to transaction events.
Subscribes to invoice events for a specific user.
Subscribes to order events for a specific user.
Subscribes to subscription events for a specific user.
Subscribes to transaction events for a specific user.
Functions
Broadcasts credit note applied event.
Broadcasts credit note sent event.
Broadcasts invoice created event.
Broadcasts invoice paid event.
Broadcasts invoice sent event.
Broadcasts invoice voided event.
Broadcasts order cancelled event.
Broadcasts order confirmed event.
Broadcasts order created event.
Broadcasts order paid event.
Broadcasts order updated event.
Broadcasts billing profile created event.
Broadcasts billing profile deleted event.
Broadcasts billing profile updated event.
Broadcasts subscription cancelled event.
Broadcasts subscription created event.
Broadcasts subscription renewed event.
Broadcasts subscription status changed event.
Broadcasts subscription type changed event.
Broadcasts transaction created event.
Broadcasts transaction refunded event.
Subscribes to credit note events.
Subscribes to invoice events.
Subscribes to order events.
Subscribes to billing profile events.
Subscribes to subscription events.
Subscribes to transaction events.
Subscribes to invoice events for a specific user.
Subscribes to order events for a specific user.
Subscribes to subscription events for a specific user.
Subscribes to transaction events for a specific user.