Class: Courier::Models::BroadcastSchedule

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

Defined Under Namespace

Modules: RecipientType

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(recipient_id:, recipient_type:, scheduled_to: nil, timezone: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::BroadcastSchedule for more details.

The delivery schedule and recipient targeting for a broadcast.

Parameters:

  • recipient_id (String)

    ID of the target list or audience.

  • recipient_type (Symbol, Courier::Models::BroadcastSchedule::RecipientType)

    Whether the broadcast targets a list or an audience.

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

    Wall-clock timestamp of the scheduled send, no timezone offset (e.g. "2026-07-21

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

    IANA timezone for the scheduled send (e.g. America/New_York).



# File 'lib/courier/models/broadcast_schedule.rb', line 31

Instance Attribute Details

#recipient_idString

ID of the target list or audience.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/courier/models/broadcast_schedule.rb', line 10

required :recipient_id, String

#recipient_typeSymbol, Courier::Models::BroadcastSchedule::RecipientType

Whether the broadcast targets a list or an audience.

Parameters:

  • value (Courier::Models::BroadcastSchedule::recipient_type)

Returns:



16
# File 'lib/courier/models/broadcast_schedule.rb', line 16

required :recipient_type, enum: -> { Courier::BroadcastSchedule::RecipientType }

#scheduled_toString?

Wall-clock timestamp of the scheduled send, no timezone offset (e.g. "2026-07-21T20:00:00").

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/courier/models/broadcast_schedule.rb', line 23

optional :scheduled_to, String, nil?: true

#timezoneString?

IANA timezone for the scheduled send (e.g. America/New_York).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/courier/models/broadcast_schedule.rb', line 29

optional :timezone, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


27
# File 'sig/courier/models/broadcast_schedule.rbs', line 27

def to_hash: -> {