Class: Courier::Models::PreferenceTopicCreateRequest

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/preference_topic_create_request.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(default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil) ⇒ Object

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

Request body for creating a preference topic.

Parameters:

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

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

  • name (String)

    Human-readable name for the preference topic.

  • allowed_preferences (Array<Symbol, Courier::Models::PreferenceTopicCreateRequest::AllowedPreference>, nil) (defaults to: nil)

    Preference controls a recipient may customize for this topic. Defaults to empty

  • include_unsubscribe_header (Boolean, nil) (defaults to: nil)

    Whether to include a list-unsubscribe header on emails for this topic.

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

    Default channels delivered for this topic. Defaults to empty if omitted.

  • topic_data (Hash{Symbol=>Object}, nil) (defaults to: nil)

    Arbitrary metadata associated with the topic.



# File 'lib/courier/models/preference_topic_create_request.rb', line 49

Instance Attribute Details

#allowed_preferencesArray<Symbol, Courier::Models::PreferenceTopicCreateRequest::AllowedPreference>?

Preference controls a recipient may customize for this topic. Defaults to empty if omitted.



23
24
25
26
27
# File 'lib/courier/models/preference_topic_create_request.rb', line 23

optional :allowed_preferences,
-> {
  Courier::Internal::Type::ArrayOf[enum: Courier::PreferenceTopicCreateRequest::AllowedPreference]
},
nil?: true

#default_statusSymbol, Courier::Models::PreferenceTopicCreateRequest::DefaultStatus

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



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

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

#include_unsubscribe_headerBoolean?

Whether to include a list-unsubscribe header on emails for this topic.

Returns:

  • (Boolean, nil)


33
# File 'lib/courier/models/preference_topic_create_request.rb', line 33

optional :include_unsubscribe_header, Courier::Internal::Type::Boolean, nil?: true

#nameString

Human-readable name for the preference topic.

Returns:

  • (String)


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

required :name, String

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

Default channels delivered for this topic. Defaults to empty if omitted.

Returns:



39
40
41
# File 'lib/courier/models/preference_topic_create_request.rb', line 39

optional :routing_options,
-> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
nil?: true

#topic_dataHash{Symbol=>Object}?

Arbitrary metadata associated with the topic.

Returns:

  • (Hash{Symbol=>Object}, nil)


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

optional :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/courier/models/preference_topic_create_request.rb', line 77