Class: Courier::Models::PreferenceSectionReplaceRequest

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

Direct Known Subclasses

PreferenceSectionReplaceParams

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(name:, has_custom_routing: nil, routing_options: nil) ⇒ Object

Request body for replacing a preference section. Full document replacement; missing optional fields are cleared.

Parameters:

  • name (String)

    Human-readable name for the section.

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

    Whether the section defines custom routing for its topics.

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

    Default channels for the section. Omit to clear.



# File 'lib/courier/models/preference_section_replace_request.rb', line 26

Instance Attribute Details

#has_custom_routingBoolean?

Whether the section defines custom routing for its topics.

Returns:

  • (Boolean, nil)


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

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

#nameString

Human-readable name for the section.

Returns:

  • (String)


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

required :name, String

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

Default channels for the section. Omit to clear.

Returns:



22
23
24
# File 'lib/courier/models/preference_section_replace_request.rb', line 22

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