Class: Mailtrap::Webhook
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::Webhook
- Defined in:
- lib/mailtrap/webhook.rb
Overview
Data Transfer Object for Webhook
Instance Attribute Summary collapse
-
#active ⇒ Boolean
readonly
Whether the webhook is active.
-
#domain_id ⇒ Integer?
readonly
The sending domain ID the webhook is scoped to, or nil for all domains.
-
#event_types ⇒ Array<String>
readonly
The event types the webhook is subscribed to.
-
#id ⇒ Integer
readonly
The webhook ID.
-
#payload_format ⇒ String
readonly
The webhook payload format (‘json` or `jsonlines`).
-
#sending_stream ⇒ String?
readonly
The sending stream (‘transactional` or `bulk`).
-
#signing_secret ⇒ String?
readonly
HMAC SHA-256 signing secret.
-
#url ⇒ String
readonly
The URL that will receive webhook payloads.
-
#webhook_type ⇒ String
readonly
The type of webhook (‘email_sending` or `audit_log`).
Instance Attribute Details
#active ⇒ Boolean (readonly)
Whether the webhook is active
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def active @active end |
#domain_id ⇒ Integer? (readonly)
The sending domain ID the webhook is scoped to, or nil for all domains. Applicable only for ‘email_sending` webhooks.
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def domain_id @domain_id end |
#event_types ⇒ Array<String> (readonly)
The event types the webhook is subscribed to. Applicable only for ‘email_sending` webhooks.
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def event_types @event_types end |
#id ⇒ Integer (readonly)
The webhook ID
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def id @id end |
#payload_format ⇒ String (readonly)
The webhook payload format (‘json` or `jsonlines`)
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def payload_format @payload_format end |
#sending_stream ⇒ String? (readonly)
The sending stream (‘transactional` or `bulk`). Applicable only for `email_sending` webhooks.
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def sending_stream @sending_stream end |
#signing_secret ⇒ String? (readonly)
HMAC SHA-256 signing secret. Returned only on creation.
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def signing_secret @signing_secret end |
#url ⇒ String (readonly)
The URL that will receive webhook payloads
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def url @url end |
#webhook_type ⇒ String (readonly)
The type of webhook (‘email_sending` or `audit_log`)
18 19 20 |
# File 'lib/mailtrap/webhook.rb', line 18 def webhook_type @webhook_type end |