Class: Telnyx::Models::EmailMessageBatchParams::Message
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Telnyx::Models::EmailMessageBatchParams::Message
- Defined in:
- lib/telnyx/models/email_message_batch_params.rb,
sig/telnyx/models/email_message_batch_params.rbs
Constant Summary collapse
- Telnyx =
Instance Attribute Summary collapse
- #attachments ⇒ Array<Telnyx::Models::AttachmentRequest>?
- #bcc ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>?
- #cc ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>?
- #from ⇒ String, Telnyx::Models::EmailInboxes::EmailAddress
-
#from_name ⇒ String?
Optional display name for string
from; overridesfrom.namewhen provided. -
#group_id ⇒ String?
Optional unsubscribe-group UUID used for group-scoped suppression checks and unsubscribe handling.
-
#headers ⇒ Hash{Symbol=>String}?
Custom email headers.
-
#html_body ⇒ String?
HTML email body.
-
#ignore_suppression ⇒ Boolean?
When true, allows delivery to recipients whose suppressions explicitly permit an override.
- #inline_css ⇒ Boolean?
-
#metadata ⇒ Hash{Symbol=>Object}?
Custom metadata.
-
#reply_to ⇒ String, ...
Reply-to address.
- #sandbox_mode ⇒ Boolean?
-
#scheduled_at ⇒ Time?
Future ISO 8601 time to schedule sending.
- #send_at ⇒ Time? deprecated Deprecated.
-
#subject ⇒ String?
Required unless
template_idis supplied. -
#tags ⇒ Array<String>?
Tags for categorization and reporting.
- #template_id ⇒ String?
-
#template_variables ⇒ Hash{Symbol=>Object}?
Variables for Liquid template rendering.
-
#text_body ⇒ String?
Plain text email body.
- #to ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>
-
#tracking_settings ⇒ Telnyx::Models::TrackingSettings?
Per-send open and click tracking overrides.
Instance Method Summary collapse
-
#initialize(from:, to:, attachments: nil, bcc: nil, cc: nil, from_name: nil, group_id: nil, headers: nil, html_body: nil, ignore_suppression: nil, inline_css: nil, metadata: nil, reply_to: nil, sandbox_mode: nil, scheduled_at: nil, send_at: nil, subject: nil, tags: nil, template_id: nil, template_variables: nil, text_body: nil, tracking_settings: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Message for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(from:, to:, attachments: nil, bcc: nil, cc: nil, from_name: nil, group_id: nil, headers: nil, html_body: nil, ignore_suppression: nil, inline_css: nil, metadata: nil, reply_to: nil, sandbox_mode: nil, scheduled_at: nil, send_at: nil, subject: nil, tags: nil, template_id: nil, template_variables: nil, text_body: nil, tracking_settings: nil) ⇒ Object
Some parameter documentations has been truncated, see Telnyx::Models::EmailMessageBatchParams::Message for more details.
A single message in a batch create request. This schema mirrors
CreateEmailRequest EXCEPT it does not accept the reply/forward threading
parameters (in_reply_to_message_id, reply_to_all, forward_of_message_id) —
those are single-send-only in Phase 1 (MSG-1491) and are not yet implemented on
the batch endpoint. Recipient email addresses must be unique across to, cc,
and bcc after case-insensitive normalization. Duplicate recipients return
400.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 39 class Message < Telnyx::Internal::Type::BaseModel # @!attribute from # # @return [String, Telnyx::Models::EmailInboxes::EmailAddress] required :from, union: -> { Telnyx::EmailAddressInput } # @!attribute to # # @return [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>] required :to, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } # @!attribute attachments # # @return [Array<Telnyx::Models::AttachmentRequest>, nil] optional :attachments, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AttachmentRequest] } # @!attribute bcc # # @return [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>, nil] optional :bcc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } # @!attribute cc # # @return [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>, nil] optional :cc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } # @!attribute from_name # Optional display name for string `from`; overrides `from.name` when provided. # # @return [String, nil] optional :from_name, String # @!attribute group_id # Optional unsubscribe-group UUID used for group-scoped suppression checks and # unsubscribe handling. # # @return [String, nil] optional :group_id, String, nil?: true # @!attribute headers # Custom email headers. Write-only; not returned in responses. # # @return [Hash{Symbol=>String}, nil] optional :headers, Telnyx::Internal::Type::HashOf[String] # @!attribute html_body # HTML email body. Returned only by `GET /email_messages/{id}`; omitted from # create and list responses. # # @return [String, nil] optional :html_body, String # @!attribute ignore_suppression # When true, allows delivery to recipients whose suppressions explicitly permit an # override. Hard bounces, spam complaints, and invalid-address suppressions cannot # be overridden. Requires the `email:override` API scope. # # @return [Boolean, nil] optional :ignore_suppression, Telnyx::Internal::Type::Boolean # @!attribute inline_css # # @return [Boolean, nil] optional :inline_css, Telnyx::Internal::Type::Boolean # @!attribute metadata # Custom metadata. Write-only; not returned in responses. # # @return [Hash{Symbol=>Object}, nil] optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] # @!attribute reply_to # Reply-to address. If provided as an object with a name, only the email is # stored; the name is ignored. # # @return [String, Telnyx::Models::EmailInboxes::EmailAddress, nil] optional :reply_to, union: -> { Telnyx::EmailAddressInput } # @!attribute sandbox_mode # # @return [Boolean, nil] optional :sandbox_mode, Telnyx::Internal::Type::Boolean # @!attribute scheduled_at # Future ISO 8601 time to schedule sending. Invalid or past timestamps are # silently ignored and the email is sent immediately. The legacy alias `send_at` # is still accepted for backward compatibility; when both are provided, # `scheduled_at` wins. # # @return [Time, nil] optional :scheduled_at, Time, nil?: true # @!attribute send_at # @deprecated # # Deprecated alias for `scheduled_at`. # # @return [Time, nil] optional :send_at, Time # @!attribute subject # Required unless `template_id` is supplied. When using a template, the template's # subject is rendered; if the template has no subject or renders empty, the # request returns 400. # # @return [String, nil] optional :subject, String # @!attribute tags # Tags for categorization and reporting. Stored on the message and propagated to # Email Detail Records. Not returned in API responses. # # @return [Array<String>, nil] optional :tags, Telnyx::Internal::Type::ArrayOf[String] # @!attribute template_id # # @return [String, nil] optional :template_id, String # @!attribute template_variables # Variables for Liquid template rendering. Non-object values may cause a 422 # validation error on message creation, but are silently treated as an empty # object for template rendering. # # @return [Hash{Symbol=>Object}, nil] optional :template_variables, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] # @!attribute text_body # Plain text email body. Returned only by `GET /email_messages/{id}`; omitted from # create and list responses. # # @return [String, nil] optional :text_body, String # @!attribute tracking_settings # Per-send open and click tracking overrides. Omitted properties inherit the # sender domain's tracking settings. # # @return [Telnyx::Models::TrackingSettings, nil] optional :tracking_settings, -> { Telnyx::TrackingSettings } # @!method initialize(from:, to:, attachments: nil, bcc: nil, cc: nil, from_name: nil, group_id: nil, headers: nil, html_body: nil, ignore_suppression: nil, inline_css: nil, metadata: nil, reply_to: nil, sandbox_mode: nil, scheduled_at: nil, send_at: nil, subject: nil, tags: nil, template_id: nil, template_variables: nil, text_body: nil, tracking_settings: nil) # Some parameter documentations has been truncated, see # {Telnyx::Models::EmailMessageBatchParams::Message} for more details. # # A single message in a batch create request. This schema mirrors # `CreateEmailRequest` EXCEPT it does not accept the reply/forward threading # parameters (`in_reply_to_message_id`, `reply_to_all`, `forward_of_message_id`) — # those are single-send-only in Phase 1 (MSG-1491) and are not yet implemented on # the batch endpoint. Recipient email addresses must be unique across `to`, `cc`, # and `bcc` after case-insensitive normalization. Duplicate recipients return # `400`. # # @param from [String, Telnyx::Models::EmailInboxes::EmailAddress] # # @param to [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>] # # @param attachments [Array<Telnyx::Models::AttachmentRequest>] # # @param bcc [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>] # # @param cc [Array<String, Telnyx::Models::EmailInboxes::EmailAddress>] # # @param from_name [String] Optional display name for string `from`; overrides `from.name` when provided. # # @param group_id [String, nil] Optional unsubscribe-group UUID used for group-scoped suppression checks and uns # # @param headers [Hash{Symbol=>String}] Custom email headers. Write-only; not returned in responses. # # @param html_body [String] HTML email body. Returned only by `GET /email_messages/{id}`; omitted from creat # # @param ignore_suppression [Boolean] When true, allows delivery to recipients whose suppressions explicitly # # @param inline_css [Boolean] # # @param metadata [Hash{Symbol=>Object}] Custom metadata. Write-only; not returned in responses. # # @param reply_to [String, Telnyx::Models::EmailInboxes::EmailAddress] Reply-to address. If provided as an object with a name, only the email is stored # # @param sandbox_mode [Boolean] # # @param scheduled_at [Time, nil] Future ISO 8601 time to schedule sending. Invalid or past timestamps # # @param send_at [Time] Deprecated alias for `scheduled_at`. # # @param subject [String] Required unless `template_id` is supplied. When using a template, the template's # # @param tags [Array<String>] Tags for categorization and reporting. Stored on the message and propagated to E # # @param template_id [String] # # @param template_variables [Hash{Symbol=>Object}] Variables for Liquid template rendering. Non-object values may cause a 422 valid # # @param text_body [String] Plain text email body. Returned only by `GET /email_messages/{id}`; omitted from # # @param tracking_settings [Telnyx::Models::TrackingSettings] Per-send open and click tracking overrides. Omitted properties inherit the sende end |
Instance Attribute Details
#attachments ⇒ Array<Telnyx::Models::AttachmentRequest>?
53 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 53 optional :attachments, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AttachmentRequest] } |
#bcc ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>?
58 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 58 optional :bcc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } |
#cc ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>?
63 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 63 optional :cc, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } |
#from ⇒ String, Telnyx::Models::EmailInboxes::EmailAddress
43 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 43 required :from, union: -> { Telnyx::EmailAddressInput } |
#from_name ⇒ String?
Optional display name for string from; overrides from.name when provided.
69 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 69 optional :from_name, String |
#group_id ⇒ String?
Optional unsubscribe-group UUID used for group-scoped suppression checks and unsubscribe handling.
76 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 76 optional :group_id, String, nil?: true |
#headers ⇒ Hash{Symbol=>String}?
Custom email headers. Write-only; not returned in responses.
82 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 82 optional :headers, Telnyx::Internal::Type::HashOf[String] |
#html_body ⇒ String?
HTML email body. Returned only by GET /email_messages/{id}; omitted from
create and list responses.
89 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 89 optional :html_body, String |
#ignore_suppression ⇒ Boolean?
When true, allows delivery to recipients whose suppressions explicitly permit an
override. Hard bounces, spam complaints, and invalid-address suppressions cannot
be overridden. Requires the email:override API scope.
97 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 97 optional :ignore_suppression, Telnyx::Internal::Type::Boolean |
#inline_css ⇒ Boolean?
102 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 102 optional :inline_css, Telnyx::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>Object}?
Custom metadata. Write-only; not returned in responses.
108 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 108 optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#reply_to ⇒ String, ...
Reply-to address. If provided as an object with a name, only the email is stored; the name is ignored.
115 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 115 optional :reply_to, union: -> { Telnyx::EmailAddressInput } |
#sandbox_mode ⇒ Boolean?
120 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 120 optional :sandbox_mode, Telnyx::Internal::Type::Boolean |
#scheduled_at ⇒ Time?
Future ISO 8601 time to schedule sending. Invalid or past timestamps are
silently ignored and the email is sent immediately. The legacy alias send_at
is still accepted for backward compatibility; when both are provided,
scheduled_at wins.
129 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 129 optional :scheduled_at, Time, nil?: true |
#send_at ⇒ Time?
Deprecated alias for scheduled_at.
137 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 137 optional :send_at, Time |
#subject ⇒ String?
Required unless template_id is supplied. When using a template, the template's
subject is rendered; if the template has no subject or renders empty, the
request returns 400.
145 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 145 optional :subject, String |
#tags ⇒ Array<String>?
Tags for categorization and reporting. Stored on the message and propagated to Email Detail Records. Not returned in API responses.
152 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 152 optional :tags, Telnyx::Internal::Type::ArrayOf[String] |
#template_id ⇒ String?
157 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 157 optional :template_id, String |
#template_variables ⇒ Hash{Symbol=>Object}?
Variables for Liquid template rendering. Non-object values may cause a 422 validation error on message creation, but are silently treated as an empty object for template rendering.
165 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 165 optional :template_variables, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown] |
#text_body ⇒ String?
Plain text email body. Returned only by GET /email_messages/{id}; omitted from
create and list responses.
172 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 172 optional :text_body, String |
#to ⇒ Array<String, Telnyx::Models::EmailInboxes::EmailAddress>
48 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 48 required :to, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::EmailAddressInput] } |
#tracking_settings ⇒ Telnyx::Models::TrackingSettings?
Per-send open and click tracking overrides. Omitted properties inherit the sender domain's tracking settings.
179 |
# File 'lib/telnyx/models/email_message_batch_params.rb', line 179 optional :tracking_settings, -> { Telnyx::TrackingSettings } |
Instance Method Details
#to_hash ⇒ {
181 |
# File 'sig/telnyx/models/email_message_batch_params.rbs', line 181
def to_hash: -> {
|