Class: Inttegro::MessageTemplate::EmailContent

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/message_template/email_content.rb

Overview

Typed representation of the email content object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#from ⇒ Inttegro::MessageTemplate::Mailbox? (readonly)

Value of the from field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: from.



48
49
50
51
52
53
54
# File 'lib/inttegro/message_template/email_content.rb', line 48

class EmailContent < T::Struct
  const :subject, String
  const :html, String
  const :from, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :reply_to, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :headers, T.nilable(T::Hash[String, String]), default: nil
end

#headers ⇒ Hash{String => String}? (readonly)

Validated provider-neutral email headers.

Optional in the API payload; omitted values default to nil. Wire name: headers.

Returns:

  • (Hash{String => String}, nil)


48
49
50
51
52
53
54
# File 'lib/inttegro/message_template/email_content.rb', line 48

class EmailContent < T::Struct
  const :subject, String
  const :html, String
  const :from, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :reply_to, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :headers, T.nilable(T::Hash[String, String]), default: nil
end

#html ⇒ String (readonly)

HTML email body template.

Required in the API payload. Wire name: html.

Returns:

  • (String)


48
49
50
51
52
53
54
# File 'lib/inttegro/message_template/email_content.rb', line 48

class EmailContent < T::Struct
  const :subject, String
  const :html, String
  const :from, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :reply_to, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :headers, T.nilable(T::Hash[String, String]), default: nil
end

#reply_to ⇒ Inttegro::MessageTemplate::Mailbox? (readonly)

Value of the reply_to field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: reply_to.



48
49
50
51
52
53
54
# File 'lib/inttegro/message_template/email_content.rb', line 48

class EmailContent < T::Struct
  const :subject, String
  const :html, String
  const :from, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :reply_to, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :headers, T.nilable(T::Hash[String, String]), default: nil
end

#subject ⇒ String (readonly)

Email subject template.

Required in the API payload. Wire name: subject.

Returns:

  • (String)


48
49
50
51
52
53
54
# File 'lib/inttegro/message_template/email_content.rb', line 48

class EmailContent < T::Struct
  const :subject, String
  const :html, String
  const :from, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :reply_to, T.nilable(Inttegro::MessageTemplate::Mailbox), default: nil
  const :headers, T.nilable(T::Hash[String, String]), default: nil
end