Class: Courier::Models::PreferenceTopicGetResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/preference_topic_get_response.rb

Defined Under Namespace

Modules: AllowedPreference, DefaultStatus

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:, allowed_preferences:, created:, default_status:, include_unsubscribe_header:, name:, routing_options:, topic_data:, updated:, creator: nil, updater: nil) ⇒ Object

A subscription preference topic in your workspace.

Parameters:

  • id (String)

    The preference topic id.

  • allowed_preferences (Array<Symbol, Courier::Models::PreferenceTopicGetResponse::AllowedPreference>)

    Preference controls a recipient may customize. May be empty.

  • created (String)

    ISO-8601 timestamp of when the topic was created.

  • default_status (Symbol, Courier::Models::PreferenceTopicGetResponse::DefaultStatus)

    The default subscription status applied when a recipient has not set their own.

  • include_unsubscribe_header (Boolean)

    Whether a list-unsubscribe header is included on emails for this topic.

  • name (String)

    Human-readable name.

  • routing_options (Array<Symbol, Courier::Models::ChannelClassification>)

    Default channels delivered for this topic. May be empty.

  • topic_data (Hash{Symbol=>Object})

    Arbitrary metadata associated with the topic.

  • updated (String)

    ISO-8601 timestamp of the last update.

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

    Id of the creator.

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

    Id of the last updater.



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

Instance Attribute Details

#allowed_preferencesArray<Symbol, Courier::Models::PreferenceTopicGetResponse::AllowedPreference>

Preference controls a recipient may customize. May be empty.



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

required :allowed_preferences,
-> { Courier::Internal::Type::ArrayOf[enum: Courier::PreferenceTopicGetResponse::AllowedPreference] }

#createdString

ISO-8601 timestamp of when the topic was created.

Returns:

  • (String)


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

required :created, String

#creatorString?

Id of the creator.

Returns:

  • (String, nil)


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

optional :creator, String, nil?: true

#default_statusSymbol, Courier::Models::PreferenceTopicGetResponse::DefaultStatus

The default subscription status applied when a recipient has not set their own.



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

required :default_status, enum: -> { Courier::PreferenceTopicGetResponse::DefaultStatus }

#idString

The preference topic id.

Returns:

  • (String)


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

required :id, String

#include_unsubscribe_headerBoolean

Whether a list-unsubscribe header is included on emails for this topic.

Returns:

  • (Boolean)


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

required :include_unsubscribe_header, Courier::Internal::Type::Boolean

#nameString

Human-readable name.

Returns:

  • (String)


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

required :name, String

#routing_optionsArray<Symbol, Courier::Models::ChannelClassification>

Default channels delivered for this topic. May be empty.

Returns:



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

required :routing_options, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }

#topic_dataHash{Symbol=>Object}

Arbitrary metadata associated with the topic.

Returns:

  • (Hash{Symbol=>Object})


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

required :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]

#updatedString

ISO-8601 timestamp of the last update.

Returns:

  • (String)


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

required :updated, String

#updaterString?

Id of the last updater.

Returns:

  • (String, nil)


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

optional :updater, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/preference_topic_get_response.rb', line 105