Class: SurgeAPI::Models::MessageParams::MessageParamsWithConversation

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

Defined Under Namespace

Classes: Attachment, Conversation

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(phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil) ⇒ Object

Parameters for creating a contact

Parameters:

  • phone_number (String)

    The contact’s phone number in E.164 format.

  • email (String) (defaults to: nil)

    The contact’s email address.

  • first_name (String) (defaults to: nil)

    The contact’s first name.

  • last_name (String) (defaults to: nil)

    The contact’s last name.

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

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



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

Instance Attribute Details

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



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

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

#bodyString?

The message body.

Returns:

  • (String, nil)


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

optional :body, String

#conversationSurgeAPI::Models::MessageParams::MessageParamsWithConversation::Conversation

Params for selecting or creating a new conversation. Either the id or the Contact must be given.



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

required :conversation, -> { SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation }

#metadataHash{Symbol=>String}?

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

Returns:

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


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

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

#send_atTime?

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

Returns:

  • (Time, nil)


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

optional :send_at, Time