Constants for all Codat webhook event types.
Use these constants when:
- Configuring webhook consumers via
Codat.Platform.Webhooks.create/2 - Pattern-matching event types in your
Codat.Webhooks.Handlerimplementation - Filtering events in middleware or routers
Usage
import Codat.Webhooks.EventTypes
# When creating a webhook consumer
Codat.Platform.Webhooks.create(client, %{
url: "https://myapp.com/webhooks/codat",
eventTypes: [
@company_data_connection_status_changed,
@invoices_write_successful
]
})
# When handling events
def handle_event(@invoices_write_successful, payload) do
IO.inspect(payload)
endWildcard
Use "*" (the module attribute @all) to receive all event types.
Summary
Functions
Returns a list of all known Codat event type strings.
Fired when your client is approaching the rate limit.
Fired when your client has been rate limited.
Fired when your rate limit has reset.
Fired when a new company is created.
Fired when a company's data connection changes status (Linked, Deauthorized, etc.).
Fired when a company is deleted.
Fired when a data connection status changes.
Fired when a data sync completes for any data type.
Fired when a data sync status changes.
Fired when a push (write) operation completes.
Returns true if the given string is a recognized Codat event type.
Functions
@spec all_types() :: [String.t()]
Returns a list of all known Codat event type strings.
Fired when your client is approaching the rate limit.
Fired when your client has been rate limited.
Fired when your rate limit has reset.
Fired when a new company is created.
Fired when a company's data connection changes status (Linked, Deauthorized, etc.).
Fired when a company is deleted.
Fired when a data connection status changes.
Fired when a data sync completes for any data type.
Fired when a data sync status changes.
Fired when a push (write) operation completes.
Returns true if the given string is a recognized Codat event type.