AccessGrid.Webhook (AccessGrid v0.1.0)

Copy Markdown View Source

Webhook subscription that receives event notifications. Returned by AccessGrid.Console.list_webhooks/1 and AccessGrid.Console.create_webhook/2.

Auth-method-specific fields appear only when applicable:

  • private_key is returned ONLY on auth_method: "bearer_token" creation (sensitive; store on receipt — Rails does not return it again).
  • client_cert and cert_expires_at are returned on auth_method: "mtls".

Unused fields are nil on the struct.

Summary

Functions

Creates a Webhook struct from an API response map.

Types

t()

@type t() :: %AccessGrid.Webhook{
  auth_method: String.t() | nil,
  cert_expires_at: String.t() | nil,
  client_cert: String.t() | nil,
  created_at: String.t() | nil,
  id: String.t() | nil,
  name: String.t() | nil,
  private_key: String.t() | nil,
  subscribed_events: [String.t()],
  url: String.t() | nil
}

Functions

from_response(data)

@spec from_response(map()) :: t()

Creates a Webhook struct from an API response map.