Class: Telnyx::Models::MessageSendParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/message_send_params.rb

Overview

Defined Under Namespace

Modules: Encoding, Type

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(to:, auto_detect: nil, encoding: nil, from: nil, media_urls: nil, messaging_profile_id: nil, send_at: nil, subject: nil, text: nil, type: nil, use_profile_webhooks: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::MessageSendParams for more details.

Parameters:

  • to (String)

    Receiving address (+E.164 formatted phone number or short code).

  • auto_detect (Boolean) (defaults to: nil)

    Automatically detect if an SMS message is unusually long and exceeds a recommend

  • encoding (Symbol, Telnyx::Models::MessageSendParams::Encoding) (defaults to: nil)

    Encoding to use for the message. ‘auto` (default) uses smart encoding to automat

  • from (String) (defaults to: nil)

    Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short

  • media_urls (Array<String>) (defaults to: nil)

    A list of media URLs. The total media size must be less than 1 MB.

  • messaging_profile_id (String) (defaults to: nil)

    Unique identifier for a messaging profile.

  • send_at (Time, nil) (defaults to: nil)

    ISO 8601 formatted date indicating when to send the message - accurate up till a

  • subject (String) (defaults to: nil)

    Subject of multimedia message

  • text (String) (defaults to: nil)

    Message body (i.e., content) as a non-empty string.

  • type (Symbol, Telnyx::Models::MessageSendParams::Type) (defaults to: nil)

    The protocol for sending the message, either SMS or MMS.

  • use_profile_webhooks (Boolean) (defaults to: nil)

    If the profile this number is associated with has webhooks, use them for deliver

  • webhook_failover_url (String) (defaults to: nil)

    The failover URL where webhooks related to this message will be sent if sending

  • webhook_url (String) (defaults to: nil)

    The URL where webhooks related to this message will be sent.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/message_send_params.rb', line 107

Instance Attribute Details

#auto_detectBoolean?

Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.

Returns:

  • (Boolean, nil)


21
# File 'lib/telnyx/models/message_send_params.rb', line 21

optional :auto_detect, Telnyx::Internal::Type::Boolean

#encodingSymbol, ...

Encoding to use for the message. ‘auto` (default) uses smart encoding to automatically select the most efficient encoding. `gsm7` forces GSM-7 encoding (returns 400 if message contains characters that cannot be encoded). `ucs2` forces UCS-2 encoding and disables smart encoding. When set, this overrides the messaging profile’s ‘smart_encoding` setting.



31
# File 'lib/telnyx/models/message_send_params.rb', line 31

optional :encoding, enum: -> { Telnyx::MessageSendParams::Encoding }

#fromString?

Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).

**Required if sending with a phone number, short code, or alphanumeric sender ID.**

Returns:

  • (String, nil)


41
# File 'lib/telnyx/models/message_send_params.rb', line 41

optional :from, String

#media_urlsArray<String>?

A list of media URLs. The total media size must be less than 1 MB.

**Required for MMS**

Returns:

  • (Array<String>, nil)


49
# File 'lib/telnyx/models/message_send_params.rb', line 49

optional :media_urls, Telnyx::Internal::Type::ArrayOf[String]

#messaging_profile_idString?

Unique identifier for a messaging profile.

**Required if sending via number pool or with an alphanumeric sender ID.**

Returns:

  • (String, nil)


57
# File 'lib/telnyx/models/message_send_params.rb', line 57

optional :messaging_profile_id, String

#send_atTime?

ISO 8601 formatted date indicating when to send the message - accurate up till a minute.

Returns:

  • (Time, nil)


64
# File 'lib/telnyx/models/message_send_params.rb', line 64

optional :send_at, Time, nil?: true

#subjectString?

Subject of multimedia message

Returns:

  • (String, nil)


70
# File 'lib/telnyx/models/message_send_params.rb', line 70

optional :subject, String

#textString?

Message body (i.e., content) as a non-empty string.

**Required for SMS**

Returns:

  • (String, nil)


78
# File 'lib/telnyx/models/message_send_params.rb', line 78

optional :text, String

#toString

Receiving address (+E.164 formatted phone number or short code).

Returns:

  • (String)


14
# File 'lib/telnyx/models/message_send_params.rb', line 14

required :to, String

#typeSymbol, ...

The protocol for sending the message, either SMS or MMS.

Returns:



84
# File 'lib/telnyx/models/message_send_params.rb', line 84

optional :type, enum: -> { Telnyx::MessageSendParams::Type }

#use_profile_webhooksBoolean?

If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.

Returns:

  • (Boolean, nil)


92
# File 'lib/telnyx/models/message_send_params.rb', line 92

optional :use_profile_webhooks, Telnyx::Internal::Type::Boolean

#webhook_failover_urlString?

The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.

Returns:

  • (String, nil)


99
# File 'lib/telnyx/models/message_send_params.rb', line 99

optional :webhook_failover_url, String

#webhook_urlString?

The URL where webhooks related to this message will be sent.

Returns:

  • (String, nil)


105
# File 'lib/telnyx/models/message_send_params.rb', line 105

optional :webhook_url, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/message_send_params.rb', line 151