Class: Telnyx::Models::OutboundMessagePayload

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/outbound_message_payload.rb

Defined Under Namespace

Modules: Direction, RecordType, Type Classes: Cc, Cost, CostBreakdown, From, Media, To

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(content_type: nil, sha256: nil, size: nil, url: nil) ⇒ Object

Parameters:

  • content_type (String, nil) (defaults to: nil)

    The MIME type of the requested media.

  • sha256 (String, nil) (defaults to: nil)

    The SHA256 hash of the requested media.

  • size (Integer, nil) (defaults to: nil)

    The size of the requested media.

  • url (String) (defaults to: nil)

    The url of the media requested to be sent.



# File 'lib/telnyx/models/outbound_message_payload.rb', line 330

Instance Attribute Details

#ccArray<Telnyx::Models::OutboundMessagePayload::Cc>?



15
# File 'lib/telnyx/models/outbound_message_payload.rb', line 15

optional :cc, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::OutboundMessagePayload::Cc] }

#completed_atTime?

ISO 8601 formatted date indicating when the message was finalized.

Returns:

  • (Time, nil)


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

optional :completed_at, Time, nil?: true

#costTelnyx::Models::OutboundMessagePayload::Cost?



26
# File 'lib/telnyx/models/outbound_message_payload.rb', line 26

optional :cost, -> { Telnyx::OutboundMessagePayload::Cost }, nil?: true

#cost_breakdownTelnyx::Models::OutboundMessagePayload::CostBreakdown?

Detailed breakdown of the message cost components.



32
# File 'lib/telnyx/models/outbound_message_payload.rb', line 32

optional :cost_breakdown, -> { Telnyx::OutboundMessagePayload::CostBreakdown }, nil?: true

#directionSymbol, ...

The direction of the message. Inbound messages are sent to you whereas outbound messages are sent from you.



39
# File 'lib/telnyx/models/outbound_message_payload.rb', line 39

optional :direction, enum: -> { Telnyx::OutboundMessagePayload::Direction }

#encodingString?

Encoding scheme used for the message body.

Returns:

  • (String, nil)


45
# File 'lib/telnyx/models/outbound_message_payload.rb', line 45

optional :encoding, String

#errorsArray<Telnyx::Models::MessagingError>?

These errors may point at addressees when referring to unsuccessful/unconfirmed delivery statuses.

Returns:



52
# File 'lib/telnyx/models/outbound_message_payload.rb', line 52

optional :errors, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::MessagingError] }

#fromTelnyx::Models::OutboundMessagePayload::From?



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

optional :from, -> { Telnyx::OutboundMessagePayload::From }

#idString?

Identifies the type of resource.

Returns:

  • (String, nil)


10
# File 'lib/telnyx/models/outbound_message_payload.rb', line 10

optional :id, String

#mediaArray<Telnyx::Models::OutboundMessagePayload::Media>?



62
# File 'lib/telnyx/models/outbound_message_payload.rb', line 62

optional :media, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::OutboundMessagePayload::Media] }

#messaging_profile_idString?

Unique identifier for a messaging profile.

Returns:

  • (String, nil)


68
# File 'lib/telnyx/models/outbound_message_payload.rb', line 68

optional :messaging_profile_id, String

#organization_idString?

The id of the organization the messaging profile belongs to.

Returns:

  • (String, nil)


74
# File 'lib/telnyx/models/outbound_message_payload.rb', line 74

optional :organization_id, String

#partsInteger?

Number of parts into which the message’s body must be split.

Returns:

  • (Integer, nil)


80
# File 'lib/telnyx/models/outbound_message_payload.rb', line 80

optional :parts, Integer

#received_atTime?

ISO 8601 formatted date indicating when the message request was received.

Returns:

  • (Time, nil)


86
# File 'lib/telnyx/models/outbound_message_payload.rb', line 86

optional :received_at, Time

#record_typeSymbol, ...

Identifies the type of the resource.



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

optional :record_type, enum: -> { Telnyx::OutboundMessagePayload::RecordType }

#sent_atTime?

ISO 8601 formatted date indicating when the message was sent.

Returns:

  • (Time, nil)


98
# File 'lib/telnyx/models/outbound_message_payload.rb', line 98

optional :sent_at, Time, nil?: true

#smart_encoding_appliedBoolean?

Indicates whether smart encoding was applied to this message. When ‘true`, one or more Unicode characters were automatically replaced with GSM-7 equivalents to reduce segment count and cost. The original message text is preserved in webhooks.

Returns:

  • (Boolean, nil)


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

optional :smart_encoding_applied, Telnyx::Internal::Type::Boolean

#subjectString?

Subject of multimedia message

Returns:

  • (String, nil)


113
# File 'lib/telnyx/models/outbound_message_payload.rb', line 113

optional :subject, String, nil?: true

#tagsArray<String>?

Tags associated with the resource.

Returns:

  • (Array<String>, nil)


119
# File 'lib/telnyx/models/outbound_message_payload.rb', line 119

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

#tcr_campaign_billableBoolean?

Indicates whether the TCR campaign is billable.

Returns:

  • (Boolean, nil)


125
# File 'lib/telnyx/models/outbound_message_payload.rb', line 125

optional :tcr_campaign_billable, Telnyx::Internal::Type::Boolean

#tcr_campaign_idString?

The Campaign Registry (TCR) campaign ID associated with the message.

Returns:

  • (String, nil)


131
# File 'lib/telnyx/models/outbound_message_payload.rb', line 131

optional :tcr_campaign_id, String, nil?: true

#tcr_campaign_registeredString?

The registration status of the TCR campaign.

Returns:

  • (String, nil)


137
# File 'lib/telnyx/models/outbound_message_payload.rb', line 137

optional :tcr_campaign_registered, String, nil?: true

#textString?

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

**Required for SMS**

Returns:

  • (String, nil)


145
# File 'lib/telnyx/models/outbound_message_payload.rb', line 145

optional :text, String

#toArray<Telnyx::Models::OutboundMessagePayload::To>?



150
# File 'lib/telnyx/models/outbound_message_payload.rb', line 150

optional :to, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::OutboundMessagePayload::To] }

#typeSymbol, ...

The type of message.



156
# File 'lib/telnyx/models/outbound_message_payload.rb', line 156

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

#valid_untilTime?

Message must be out of the queue by this time or else it will be discarded and marked as ‘sending_failed’. Once the message moves out of the queue, this field will be nulled

Returns:

  • (Time, nil)


164
# File 'lib/telnyx/models/outbound_message_payload.rb', line 164

optional :valid_until, Time, nil?: true

#wait_secondsFloat?

Seconds the message is queued due to rate limiting before being sent to the carrier. Represents the maximum wait across all applicable rate limits (account, carrier, campaign). 0.0 = no queuing delay.

Returns:

  • (Float, nil)


172
# File 'lib/telnyx/models/outbound_message_payload.rb', line 172

optional :wait_seconds, Float, nil?: true

#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)


179
# File 'lib/telnyx/models/outbound_message_payload.rb', line 179

optional :webhook_failover_url, String, nil?: true

#webhook_urlString?

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

Returns:

  • (String, nil)


185
# File 'lib/telnyx/models/outbound_message_payload.rb', line 185

optional :webhook_url, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/outbound_message_payload.rb', line 311