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.
-
#inbound_inbox_id ⇒ Integer?
readonly
The inbound inbox ID the webhook is linked to.
-
#payload_format ⇒ String
readonly
The webhook payload format (
jsonorjsonlines). -
#sending_stream ⇒ String?
readonly
The sending stream (
transactionalorbulk). -
#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,campaigns,audit_logorinbound_receiving).
Instance Attribute Details
#active ⇒ Boolean (readonly)
Whether the webhook is active
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 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.
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 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.
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def event_types @event_types end |
#id ⇒ Integer (readonly)
The webhook ID
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def id @id end |
#inbound_inbox_id ⇒ Integer? (readonly)
The inbound inbox ID the webhook is linked to.
Applicable only for inbound_receiving webhooks.
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def inbound_inbox_id @inbound_inbox_id end |
#payload_format ⇒ String (readonly)
The webhook payload format (json or jsonlines)
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def payload_format @payload_format end |
#sending_stream ⇒ String? (readonly)
The sending stream (transactional or bulk).
Applicable only for email_sending webhooks.
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def sending_stream @sending_stream end |
#signing_secret ⇒ String? (readonly)
HMAC SHA-256 signing secret. Returned only on creation.
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def signing_secret @signing_secret end |
#url ⇒ String (readonly)
The URL that will receive webhook payloads
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def url @url end |
#webhook_type ⇒ String (readonly)
The type of webhook
(email_sending, campaigns, audit_log or inbound_receiving)
21 22 23 |
# File 'lib/mailtrap/webhook.rb', line 21 def webhook_type @webhook_type end |