Class: SurgeAPI::Models::MessageParams::SimpleMessageParams

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/surge_api/models/message_params.rb,
sig/surge_api/models/message_params.rbs

Defined Under Namespace

Classes: Attachment, Settings

Instance Attribute 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(url:) ⇒ Object

Params for creating an attachment

Parameters:

  • url (String)

    The URL of the attachment.



# File 'lib/surge_api/models/message_params.rb', line 265

Instance Attribute Details

#attachmentsArray<SurgeAPI::Models::MessageParams::SimpleMessageParams::Attachment>?



203
204
# File 'lib/surge_api/models/message_params.rb', line 203

optional :attachments,
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageParams::SimpleMessageParams::Attachment] }

#bodyString?

The message body.

Parameters:

  • (String)

Returns:

  • (String, nil)


210
# File 'lib/surge_api/models/message_params.rb', line 210

optional :body, String

#fromString?

The sender's phone number in E.164 format or phone number ID. If omitted, uses the account's default phone number. Cannot be used together with 'conversation'.

Parameters:

  • (String)

Returns:

  • (String, nil)


217
# File 'lib/surge_api/models/message_params.rb', line 217

optional :from, String

#metadataHash{Symbol=>String}?

Set of key-value pairs that will be stored with the object.

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


223
# File 'lib/surge_api/models/message_params.rb', line 223

optional :metadata, SurgeAPI::Internal::Type::HashOf[String]

#send_atTime?

An optional datetime for scheduling message up to a couple of months in the future.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


230
# File 'lib/surge_api/models/message_params.rb', line 230

optional :send_at, Time

#settingsSurgeAPI::Models::MessageParams::SimpleMessageParams::Settings?

Per-message setting overrides.



236
# File 'lib/surge_api/models/message_params.rb', line 236

optional :settings, -> { SurgeAPI::MessageParams::SimpleMessageParams::Settings }

#toString

The recipient's phone number in E.164 format. Cannot be used together with 'conversation'.

Parameters:

  • value (String)

Returns:

  • (String)


198
# File 'lib/surge_api/models/message_params.rb', line 198

required :to, String

Instance Method Details

#to_hash{

Returns:

  • ({)


229
# File 'sig/surge_api/models/message_params.rbs', line 229

def to_hash: -> {