Class: Moonbase::Models::Program

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/program.rb

Overview

Defined Under Namespace

Modules: Status, Trigger

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:, created_at:, status:, track_clicks:, track_opens:, trigger:, updated_at:, activity_metrics: nil, display_name: nil, program_template: nil, scheduled_at: nil, type: :program) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::Program for more details.

The Program object represents an email campaign. It defines the sending behavior and tracks engagement metrics.

Parameters:

  • id (String)

    Unique identifier for the object.

  • created_at (Time)

    Time at which the object was created, as an ISO 8601 timestamp in UTC.

  • status (Symbol, Moonbase::Models::Program::Status)

    The current status of the program. Can be ‘draft`, `published`, `paused`, or `ar

  • track_clicks (Boolean)

    ‘true` if link clicks are tracked for this program.

  • track_opens (Boolean)

    ‘true` if email opens are tracked for this program.

  • trigger (Symbol, Moonbase::Models::Program::Trigger)

    The sending trigger for the program. Can be ‘api` for transactional sends or `br

  • updated_at (Time)

    Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

  • activity_metrics (Moonbase::Models::ProgramActivityMetrics) (defaults to: nil)

    A ‘ProgramActivityMetrics` object summarizing engagement for this program.

  • display_name (String) (defaults to: nil)

    The user-facing name of the program.

  • program_template (Moonbase::Models::ProgramTemplate) (defaults to: nil)

    The ‘ProgramTemplate` used for messages in this program.

  • scheduled_at (Time) (defaults to: nil)

    For ‘broadcast` programs, the time the program is scheduled to send, as an ISO 8

  • type (Symbol, :program) (defaults to: :program)

    String representing the object’s type. Always ‘program` for this object.



# File 'lib/moonbase/models/program.rb', line 86

Instance Attribute Details

#activity_metricsMoonbase::Models::ProgramActivityMetrics?

A ‘ProgramActivityMetrics` object summarizing engagement for this program.

Note: Only present when requested using the ‘include` query parameter.



63
# File 'lib/moonbase/models/program.rb', line 63

optional :activity_metrics, -> { Moonbase::ProgramActivityMetrics }

#created_atTime

Time at which the object was created, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


17
# File 'lib/moonbase/models/program.rb', line 17

required :created_at, Time

#display_nameString?

The user-facing name of the program.

Returns:

  • (String, nil)


69
# File 'lib/moonbase/models/program.rb', line 69

optional :display_name, String

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/moonbase/models/program.rb', line 11

required :id, String

#program_templateMoonbase::Models::ProgramTemplate?

The ‘ProgramTemplate` used for messages in this program.

Note: Only present when requested using the ‘include` query parameter.



77
# File 'lib/moonbase/models/program.rb', line 77

optional :program_template, -> { Moonbase::ProgramTemplate }

#scheduled_atTime?

For ‘broadcast` programs, the time the program is scheduled to send, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time, nil)


84
# File 'lib/moonbase/models/program.rb', line 84

optional :scheduled_at, Time

#statusSymbol, Moonbase::Models::Program::Status

The current status of the program. Can be ‘draft`, `published`, `paused`, or `archived`.



24
# File 'lib/moonbase/models/program.rb', line 24

required :status, enum: -> { Moonbase::Program::Status }

#track_clicksBoolean

‘true` if link clicks are tracked for this program.

Returns:

  • (Boolean)


30
# File 'lib/moonbase/models/program.rb', line 30

required :track_clicks, Moonbase::Internal::Type::Boolean

#track_opensBoolean

‘true` if email opens are tracked for this program.

Returns:

  • (Boolean)


36
# File 'lib/moonbase/models/program.rb', line 36

required :track_opens, Moonbase::Internal::Type::Boolean

#triggerSymbol, Moonbase::Models::Program::Trigger

The sending trigger for the program. Can be ‘api` for transactional sends or `broadcast` for scheduled sends.



43
# File 'lib/moonbase/models/program.rb', line 43

required :trigger, enum: -> { Moonbase::Program::Trigger }

#typeSymbol, :program

String representing the object’s type. Always ‘program` for this object.

Returns:

  • (Symbol, :program)


49
# File 'lib/moonbase/models/program.rb', line 49

required :type, const: :program

#updated_atTime

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


55
# File 'lib/moonbase/models/program.rb', line 55

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/moonbase/models/program.rb', line 129