Class: Notiflows::Models::Users::UsersPreferences

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/notiflows/models/users/preferences.rb

Overview

Defined Under Namespace

Classes: ChannelTypes, Notiflow

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(chat: nil, email: nil, in_app: nil, mobile_push: nil, sms: nil, web_push: nil) ⇒ Object

Global opt-in/opt-out settings per channel type. true = enabled, false = opted out.

Parameters:

  • chat (Boolean) (defaults to: nil) —

    Chat notifications (Slack, etc.)

  • email (Boolean) (defaults to: nil) —

    Email notifications

  • in_app (Boolean) (defaults to: nil) —

    In-app feed notifications

  • mobile_push (Boolean) (defaults to: nil) —

    Mobile push notifications (iOS/Android)

  • sms (Boolean) (defaults to: nil) —

    SMS notifications

  • web_push (Boolean) (defaults to: nil) —

    Web push notifications



# File 'lib/notiflows/models/users/preferences.rb', line 22

Instance Attribute Details

#channel_types ⇒ ::Notiflows::Models::Users::UsersPreferences::ChannelTypes?

Global opt-in/opt-out settings per channel type. true = enabled, false = opted out.



13
# File 'lib/notiflows/models/users/preferences.rb', line 13

optional :channel_types, -> { ::Notiflows::Users::UsersPreferences::ChannelTypes }

#notiflows ⇒ Hash{Symbol=>::Notiflows::Models::Users::UsersPreferences::Notiflow}?

Per-notiflow preferences. Keys are notiflow IDs (UUIDs).



19
20
# File 'lib/notiflows/models/users/preferences.rb', line 19

optional :notiflows,
-> { ::Notiflows::Internal::Type::HashOf[::Notiflows::Users::UsersPreferences::Notiflow] }