Cloud functions to handle billing events from Firebase Alerts.
Classes
BillingEventclass firebase_functions.alerts.billing_fn.BillingEvent(specversion: str, id: str, source: str, type: str, time: datetime, data: T, subject: str | None, alert_type: str) |
---|
Bases: A custom CloudEvent for billing Firebase Alerts.
|
PlanAutomatedUpdatePayloadclass firebase_functions.alerts.billing_fn.PlanAutomatedUpdatePayload(billing_plan: str, notification_type: str) |
---|
Bases: The internal payload object for billing plan automated updates. Payload is wrapped inside a FirebaseAlertData object.
|
PlanUpdatePayloadclass firebase_functions.alerts.billing_fn.PlanUpdatePayload(billing_plan: str, notification_type: str, principal_email: str) |
---|
Bases: The internal payload object for billing plan updates. Payload is wrapped inside a FirebaseAlertData object.
|
Functions
on_plan_automated_update_publishedfirebase_functions.alerts.billing_fn.on_plan_automated_update_published(**kwargs) Callable[[Callable[[BillingEvent[PlanAutomatedUpdatePayload]], None]], Callable[[BillingEvent[PlanAutomatedUpdatePayload]], None]] |
---|
Event handler which triggers when a Firebase Alerts billing event is published. Example: import firebase_functions.alerts.billing_fn as billing_fn @billing_fn.on_plan_automated_update_published() def example(alert: billing_fn.BillingPlanAutomatedUpdateEvent) -> None: print(alert)
|
on_plan_update_publishedfirebase_functions.alerts.billing_fn.on_plan_update_published(**kwargs) Callable[[Callable[[BillingEvent[PlanUpdatePayload]], None]], Callable[[BillingEvent[PlanUpdatePayload]], None]] |
---|
Event handler which triggers when a Firebase Alerts billing event is published. Example: import firebase_functions.alerts.billing_fn as billing_fn @billing_fn.on_plan_update_published() def example(alert: billing_fn.BillingPlanUpdateEvent) -> None: print(alert)
|
Constants
BillingPlanAutomatedUpdateEventfirebase_functions.alerts.billing_fn.BillingPlanAutomatedUpdateEvent |
---|
The type of the event for 'on_plan_automated_update_published' functions. alias of |
BillingPlanUpdateEventfirebase_functions.alerts.billing_fn.BillingPlanUpdateEvent |
---|
The type of the event for 'on_plan_update_published' functions. alias of |
OnPlanAutomatedUpdatePublishedCallablefirebase_functions.alerts.billing_fn.OnPlanAutomatedUpdatePublishedCallable |
---|
The type of the callable for 'on_plan_automated_update_published' functions. alias of |
OnPlanUpdatePublishedCallablefirebase_functions.alerts.billing_fn.OnPlanUpdatePublishedCallable |
---|
The type of the callable for 'on_plan_update_published' functions. alias of |