Codat.Webhooks.EventTypes (codat v1.0.0)

Copy Markdown View Source

Constants for all Codat webhook event types.

Use these constants when:

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)
end

Wildcard

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

accounts_dataset_data_changed()

(macro)

accounts_write_successful()

(macro)

accounts_write_unsuccessful()

(macro)

all()

(macro)

all_types()

@spec all_types() :: [String.t()]

Returns a list of all known Codat event type strings.

bank_feed_account_mapping_updated()

(macro)

bank_feed_source_account_connected()

(macro)

bank_transactions_write_successful()

(macro)

bank_transactions_write_unsuccessful()

(macro)

bill_payments_write_successful()

(macro)

bill_payments_write_unsuccessful()

(macro)

bills_dataset_data_changed()

(macro)

bills_write_successful()

(macro)

bills_write_unsuccessful()

(macro)

client_rate_limit_approaching()

(macro)

Fired when your client is approaching the rate limit.

client_rate_limit_reached()

(macro)

Fired when your client has been rate limited.

client_rate_limit_reset()

(macro)

Fired when your rate limit has reset.

company_created()

(macro)

Fired when a new company is created.

company_data_connection_status_changed()

(macro)

Fired when a company's data connection changes status (Linked, Deauthorized, etc.).

company_deleted()

(macro)

Fired when a company is deleted.

credit_notes_write_successful()

(macro)

credit_notes_write_unsuccessful()

(macro)

customers_dataset_data_changed()

(macro)

customers_write_successful()

(macro)

customers_write_unsuccessful()

(macro)

data_connection_status_changed()

(macro)

Fired when a data connection status changes.

data_sync_complete()

(macro)

Fired when a data sync completes for any data type.

data_sync_status_changed_to_error()

(macro)

Fired when a data sync status changes.

expenses_sync_failed()

(macro)

expenses_sync_successful()

(macro)

invoices_dataset_data_changed()

(macro)

invoices_dataset_status_changed_to_error()

(macro)

invoices_write_successful()

(macro)

invoices_write_unsuccessful()

(macro)

journal_entries_write_successful()

(macro)

journal_entries_write_unsuccessful()

(macro)

payments_write_successful()

(macro)

payments_write_unsuccessful()

(macro)

push_operation_status_changed()

(macro)

Fired when a push (write) operation completes.

suppliers_dataset_data_changed()

(macro)

suppliers_write_successful()

(macro)

suppliers_write_unsuccessful()

(macro)

valid?(type)

@spec valid?(String.t()) :: boolean()

Returns true if the given string is a recognized Codat event type.