Class: Trycourier::Models::Users::PreferenceUpdateOrCreateTopicParams::Topic

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/trycourier/models/users/preference_update_or_create_topic_params.rb

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

Parameters:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/trycourier/models/users/preference_update_or_create_topic_params.rb', line 36

class Topic < Trycourier::Internal::Type::BaseModel
  # @!attribute status
  #
  #   @return [Symbol, Trycourier::Models::PreferenceStatus]
  required :status, enum: -> { Trycourier::PreferenceStatus }

  # @!attribute custom_routing
  #   The Channels a user has chosen to receive notifications through for this topic
  #
  #   @return [Array<Symbol, Trycourier::Models::ChannelClassification>, nil]
  optional :custom_routing,
           -> { Trycourier::Internal::Type::ArrayOf[enum: Trycourier::ChannelClassification] },
           nil?: true

  # @!attribute has_custom_routing
  #
  #   @return [Boolean, nil]
  optional :has_custom_routing, Trycourier::Internal::Type::Boolean, nil?: true

  # @!method initialize(status:, custom_routing: nil, has_custom_routing: nil)
  #   @param status [Symbol, Trycourier::Models::PreferenceStatus]
  #
  #   @param custom_routing [Array<Symbol, Trycourier::Models::ChannelClassification>, nil] The Channels a user has chosen to receive notifications through for this topic
  #
  #   @param has_custom_routing [Boolean, nil]
end

Instance Attribute Details

#custom_routingArray<Symbol, Trycourier::Models::ChannelClassification>?

The Channels a user has chosen to receive notifications through for this topic

Returns:



46
47
48
# File 'lib/trycourier/models/users/preference_update_or_create_topic_params.rb', line 46

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

#has_custom_routingBoolean?

Returns:

  • (Boolean, nil)


53
# File 'lib/trycourier/models/users/preference_update_or_create_topic_params.rb', line 53

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

#statusSymbol, Trycourier::Models::PreferenceStatus



40
# File 'lib/trycourier/models/users/preference_update_or_create_topic_params.rb', line 40

required :status, enum: -> { Trycourier::PreferenceStatus }