Class: SurgeAPI::Models::BlastCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/surge_api/models/blast_create_params.rb,
sig/surge_api/models/blast_create_params.rbs

Overview

See Also:

  • SurgeAPI::Resources::Blasts#create

Defined Under Namespace

Classes: Attachment

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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

#initializeObject



55
# File 'sig/surge_api/models/blast_create_params.rbs', line 55

def initialize: (

Instance Attribute Details

#account_idString

The account for which the blast should be sent.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/surge_api/models/blast_create_params.rb', line 14

required :account_id, String

#attachmentsArray<SurgeAPI::Models::BlastCreateParams::Attachment>?



19
# File 'lib/surge_api/models/blast_create_params.rb', line 19

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

#bodyString?

The message body.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


25
# File 'lib/surge_api/models/blast_create_params.rb', line 25

optional :body, String, nil?: true

#contactsArray<String>?

Deprecated.

Use to to specify recipients instead.

Deprecated. Use to instead.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


33
# File 'lib/surge_api/models/blast_create_params.rb', line 33

optional :contacts, SurgeAPI::Internal::Type::ArrayOf[String]

#fromString?

The phone number from which to send the blast. This can be either the phone number in E.164 format or a Surge phone number id. If not provided, the account's default phone number is used.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :from, String

#nameString?

Optional name for the blast.

Parameters:

  • (String)

Returns:

  • (String, nil)


47
# File 'lib/surge_api/models/blast_create_params.rb', line 47

optional :name, String

#segmentsArray<String>?

Deprecated.

Use to with audience IDs (aud_...) to specify audience recipients instead.

Deprecated. Use to with audience IDs instead.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


55
# File 'lib/surge_api/models/blast_create_params.rb', line 55

optional :segments, SurgeAPI::Internal::Type::ArrayOf[String]

#send_atTime?

When to send the blast. If not provided, sends immediately.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


61
# File 'lib/surge_api/models/blast_create_params.rb', line 61

optional :send_at, Time

#toArray<String>?

List of recipients to whom the blast should be sent. This can be a combination of contact IDs, audience IDs, and phone numbers.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


68
# File 'lib/surge_api/models/blast_create_params.rb', line 68

optional :to, SurgeAPI::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash{

Returns:

  • ({)


68
# File 'sig/surge_api/models/blast_create_params.rbs', line 68

def to_hash: -> {