Class: Courier::Models::PreferenceSectionGetResponse

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

Overview

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(id:, created:, has_custom_routing:, name:, routing_options:, topics:, creator: nil, updated: nil, updater: nil) ⇒ Object

A preference section in your workspace, including its topics.

Parameters:

  • id (String)

    The preference section id.

  • created (String)

    ISO-8601 timestamp of when the section was created.

  • has_custom_routing (Boolean)

    Whether the section defines custom routing for its topics.

  • name (String)

    Human-readable name.

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

    Default channels for the section. May be empty.

  • topics (Array<Courier::Models::PreferenceTopicGetResponse>)

    The topics contained in this section.

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

    Id of the creator.

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

    ISO-8601 timestamp of the last update.

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

    Id of the last updater.



# File 'lib/courier/models/preference_section_get_response.rb', line 61

Instance Attribute Details

#createdString

ISO-8601 timestamp of when the section was created.

Returns:

  • (String)


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

required :created, String

#creatorString?

Id of the creator.

Returns:

  • (String, nil)


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

optional :creator, String, nil?: true

#has_custom_routingBoolean

Whether the section defines custom routing for its topics.

Returns:

  • (Boolean)


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

required :has_custom_routing, Courier::Internal::Type::Boolean

#idString

The preference section id.

Returns:

  • (String)


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

required :id, String

#nameString

Human-readable name.

Returns:

  • (String)


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

required :name, String

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

Default channels for the section. May be empty.

Returns:



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

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

#topicsArray<Courier::Models::PreferenceTopicGetResponse>

The topics contained in this section.



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

required :topics, -> { Courier::Internal::Type::ArrayOf[Courier::PreferenceTopicGetResponse] }

#updatedString?

ISO-8601 timestamp of the last update.

Returns:

  • (String, nil)


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

optional :updated, String, nil?: true

#updaterString?

Id of the last updater.

Returns:

  • (String, nil)


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

optional :updater, String, nil?: true