Class: Courier::Models::Broadcast

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

Overview

See Also:

  • Courier::Resources::Broadcasts#create

Defined Under Namespace

Modules: Channel, Status

Instance Attribute Summary collapse

Class Method 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(id:, channel:, created_at:, created_by:, name:, status:, updated_at:, updated_by:, archived_at: nil, archived_by: nil, schedule: nil) ⇒ Object

A broadcast — a single-channel message delivered to a known set of recipients (a list or audience).

Parameters:

  • id (String)

    The broadcast ID (bst_ prefix).

  • channel (Symbol, Courier::Models::Broadcast::Channel)

    The broadcast's delivery channel.

  • created_at (String)

    ISO 8601 timestamp when the broadcast was created.

  • created_by (String)

    Actor that created the broadcast.

  • name (String)

    Human-readable name.

  • status (Symbol, Courier::Models::Broadcast::Status)

    Lifecycle status of the broadcast.

  • updated_at (String)

    ISO 8601 timestamp of the last update.

  • updated_by (String)

    Actor that last updated the broadcast.

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

    ISO 8601 timestamp when the broadcast was archived, if archived.

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

    Actor that archived the broadcast, if archived.

  • schedule (Courier::Models::BroadcastSchedule, nil) (defaults to: nil)

    The delivery schedule and recipient targeting for a broadcast.



# File 'lib/courier/models/broadcast.rb', line 73

Instance Attribute Details

#archived_atString?

ISO 8601 timestamp when the broadcast was archived, if archived.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/courier/models/broadcast.rb', line 59

optional :archived_at, String, nil?: true

#archived_byString?

Actor that archived the broadcast, if archived.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


65
# File 'lib/courier/models/broadcast.rb', line 65

optional :archived_by, String, nil?: true

#channelSymbol, Courier::Models::Broadcast::Channel

The broadcast's delivery channel.

Parameters:

  • value (Courier::Models::Broadcast::channel)

Returns:



17
# File 'lib/courier/models/broadcast.rb', line 17

required :channel, enum: -> { Courier::Broadcast::Channel }

#created_atString

ISO 8601 timestamp when the broadcast was created.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :created_at, String

#created_byString

Actor that created the broadcast.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :created_by, String

#idString

The broadcast ID (bst_ prefix).

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/courier/models/broadcast.rb', line 11

required :id, String

#nameString

Human-readable name.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/courier/models/broadcast.rb', line 35

required :name, String

#scheduleCourier::Models::BroadcastSchedule?

The delivery schedule and recipient targeting for a broadcast.

Parameters:

Returns:



71
# File 'lib/courier/models/broadcast.rb', line 71

optional :schedule, -> { Courier::BroadcastSchedule }, nil?: true

#statusSymbol, Courier::Models::Broadcast::Status

Lifecycle status of the broadcast.

Parameters:

  • value (Courier::Models::Broadcast::status)

Returns:



41
# File 'lib/courier/models/broadcast.rb', line 41

required :status, enum: -> { Courier::Broadcast::Status }

#updated_atString

ISO 8601 timestamp of the last update.

Parameters:

  • value (String)

Returns:

  • (String)


47
# File 'lib/courier/models/broadcast.rb', line 47

required :updated_at, String

#updated_byString

Actor that last updated the broadcast.

Parameters:

  • value (String)

Returns:

  • (String)


53
# File 'lib/courier/models/broadcast.rb', line 53

required :updated_by, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/broadcast.rb', line 112

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/courier/models/broadcast.rbs', line 55

def to_hash: -> {