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

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

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(to:, attachments: nil, body: nil, from: nil, metadata: nil, send_at: nil, settings: nil) ⇒ Attachment

Some parameter documentations has been truncated, see SurgeAPI::Models::MessageParams::SimpleMessageParams for more details.

Create a basic message by specifying just the to/from phone numbers.

Parameters:

  • to (String)

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

  • attachments (Array<SurgeAPI::Models::MessageParams::SimpleMessageParams::Attachment>) (defaults to: nil)
  • body (String) (defaults to: nil)

    The message body.

  • from (String) (defaults to: nil)

    The sender's phone number in E.164 format or phone number ID. If omitted, uses t

  • metadata (Hash{Symbol=>String}) (defaults to: nil)

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

  • send_at (Time) (defaults to: nil)

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

  • settings (SurgeAPI::Models::MessageParams::SimpleMessageParams::Settings) (defaults to: nil)

    Per-message setting overrides.

  • url: (String)


258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/surge_api/models/message_params.rb', line 258

class Attachment < SurgeAPI::Internal::Type::BaseModel
  # @!attribute url
  #   The URL of the attachment.
  #
  #   @return [String]
  required :url, String

  # @!method initialize(url:)
  #   Params for creating an attachment
  #
  #   @param url [String] The URL of the attachment.
end

Instance Attribute Details

#urlString

The URL of the attachment.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash{ url: String }

Returns:

  • ({ url: String })


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

def to_hash: -> { url: String }