Class: Mailtrap::Webhook

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailtrap/webhook.rb

Overview

Data Transfer Object for Webhook

Instance Attribute Summary collapse

Instance Attribute Details

#activeBoolean (readonly)

Whether the webhook is active

Returns:

  • (Boolean)

    the current value of active



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def active
  @active
end

#domain_idInteger? (readonly)

The sending domain ID the webhook is scoped to, or nil for all domains. Applicable only for ‘email_sending` webhooks.

Returns:

  • (Integer, nil)

    the current value of domain_id



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def domain_id
  @domain_id
end

#event_typesArray<String> (readonly)

The event types the webhook is subscribed to. Applicable only for ‘email_sending` webhooks.

Returns:

  • (Array<String>)

    the current value of event_types



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def event_types
  @event_types
end

#idInteger (readonly)

The webhook ID

Returns:

  • (Integer)

    the current value of id



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def id
  @id
end

#payload_formatString (readonly)

The webhook payload format (‘json` or `jsonlines`)

Returns:

  • (String)

    the current value of payload_format



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def payload_format
  @payload_format
end

#sending_streamString? (readonly)

The sending stream (‘transactional` or `bulk`). Applicable only for `email_sending` webhooks.

Returns:

  • (String, nil)

    the current value of sending_stream



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def sending_stream
  @sending_stream
end

#signing_secretString? (readonly)

HMAC SHA-256 signing secret. Returned only on creation.

Returns:

  • (String, nil)

    the current value of signing_secret



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def signing_secret
  @signing_secret
end

#urlString (readonly)

The URL that will receive webhook payloads

Returns:

  • (String)

    the current value of url



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def url
  @url
end

#webhook_typeString (readonly)

The type of webhook (‘email_sending` or `audit_log`)

Returns:

  • (String)

    the current value of webhook_type



18
19
20
# File 'lib/mailtrap/webhook.rb', line 18

def webhook_type
  @webhook_type
end