Class: Knockapi::Models::Users::BulkSetPreferencesParams::Preferences
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Knockapi::Models::Users::BulkSetPreferencesParams::Preferences
- Defined in:
- lib/knockapi/models/users/bulk_set_preferences_params.rb,
sig/knockapi/models/users/bulk_set_preferences_params.rbs
Defined Under Namespace
Modules: Category, Channel, Workflow
Instance Attribute Summary collapse
-
#categories ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject}?
An object where the key is the category and the values are the preference settings for that category.
-
#channel_types ⇒ Knockapi::Models::Recipients::PreferenceSetChannelTypes?
Channel type preferences.
-
#channels ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}?
Channel preferences.
-
#commercial_subscribed ⇒ Boolean?
Whether the recipient is subscribed to commercial communications.
-
#id ⇒ String?
Identifier for the preference set to update.
-
#workflows ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject}?
An object where the key is the workflow key and the values are the preference settings for that workflow.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Preferences for more details.
- #to_hash ⇒ {
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: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil) ⇒ Object
Some parameter documentations has been truncated, see Knockapi::Models::Users::BulkSetPreferencesParams::Preferences for more details.
A preference set to apply in a bulk operation. Always replaces existing preferences for the specified set.
34 35 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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 34 class Preferences < Knockapi::Internal::Type::BaseModel # @!attribute id # Identifier for the preference set to update. Can be `default` or a tenant ID. # # @return [String, nil] optional :id, String # @!attribute categories # An object where the key is the category and the values are the preference # settings for that category. # # @return [Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject}, nil] optional :categories, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Category] }, nil?: true # @!attribute channel_types # Channel type preferences. # # @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true # @!attribute channels # Channel preferences. # # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] optional :channels, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Channel] }, nil?: true # @!attribute commercial_subscribed # Whether the recipient is subscribed to commercial communications. When false, # the recipient will not receive commercial workflow notifications. # # @return [Boolean, nil] optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true # @!attribute workflows # An object where the key is the workflow key and the values are the preference # settings for that workflow. # # @return [Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] optional :workflows, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Workflow] }, nil?: true # @!method initialize(id: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil) # Some parameter documentations has been truncated, see # {Knockapi::Models::Users::BulkSetPreferencesParams::Preferences} for more # details. # # A preference set to apply in a bulk operation. Always replaces existing # preferences for the specified set. # # @param id [String] Identifier for the preference set to update. Can be `default` or a tenant ID. # # @param categories [Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the category and the values are the preference settin # # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences. # # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences. # # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th # # @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se # Workflow or category preferences within a preference set module Category extend Knockapi::Internal::Type::Union variant Knockapi::Internal::Type::Boolean # The settings object for a workflow or category, where you can specify channel types or conditions. variant -> { Knockapi::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject } class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel # @!attribute channel_types # Channel type preferences. # # @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true # @!attribute channels # Channel preferences. # # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] optional :channels, -> do Knockapi::Internal::Type::HashOf[ union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::Channel ] end, nil?: true # @!attribute conditions # A list of conditions to apply to a channel type. # # @return [Array<Knockapi::Models::Condition>, nil] optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true # @!method initialize(channel_types: nil, channels: nil, conditions: nil) # The settings object for a workflow or category, where you can specify channel # types or conditions. # # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences. # # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences. # # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type. # Whether the specific channel (by channel_id) is enabled for the preference set, # or a settings object with conditions. module Channel extend Knockapi::Internal::Type::Union variant Knockapi::Internal::Type::Boolean # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply. variant -> { Knockapi::Recipients::PreferenceSetChannelSetting } # @!method self.variants # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)] end end # @!method self.variants # @return [Array(Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject)] end # Whether the specific channel (by channel_id) is enabled for the preference set, # or a settings object with conditions. module Channel extend Knockapi::Internal::Type::Union variant Knockapi::Internal::Type::Boolean # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply. variant -> { Knockapi::Recipients::PreferenceSetChannelSetting } # @!method self.variants # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)] end # Workflow or category preferences within a preference set module Workflow extend Knockapi::Internal::Type::Union variant Knockapi::Internal::Type::Boolean # The settings object for a workflow or category, where you can specify channel types or conditions. variant -> { Knockapi::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject } class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel # @!attribute channel_types # Channel type preferences. # # @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true # @!attribute channels # Channel preferences. # # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] optional :channels, -> do Knockapi::Internal::Type::HashOf[ union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel ] end, nil?: true # @!attribute conditions # A list of conditions to apply to a channel type. # # @return [Array<Knockapi::Models::Condition>, nil] optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true # @!method initialize(channel_types: nil, channels: nil, conditions: nil) # The settings object for a workflow or category, where you can specify channel # types or conditions. # # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences. # # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences. # # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type. # Whether the specific channel (by channel_id) is enabled for the preference set, # or a settings object with conditions. module Channel extend Knockapi::Internal::Type::Union variant Knockapi::Internal::Type::Boolean # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply. variant -> { Knockapi::Recipients::PreferenceSetChannelSetting } # @!method self.variants # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)] end end # @!method self.variants # @return [Array(Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject)] end end |
Instance Attribute Details
#categories ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject}?
An object where the key is the category and the values are the preference settings for that category.
46 47 48 49 50 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 46 optional :categories, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Category] }, nil?: true |
#channel_types ⇒ Knockapi::Models::Recipients::PreferenceSetChannelTypes?
Channel type preferences.
56 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 56 optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true |
#channels ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}?
Channel preferences.
62 63 64 65 66 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 62 optional :channels, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Channel] }, nil?: true |
#commercial_subscribed ⇒ Boolean?
Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.
73 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 73 optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true |
#id ⇒ String?
Identifier for the preference set to update. Can be default or a tenant ID.
39 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 39 optional :id, String |
#workflows ⇒ Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject}?
An object where the key is the workflow key and the values are the preference settings for that workflow.
80 81 82 83 84 |
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 80 optional :workflows, -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Users::BulkSetPreferencesParams::Preferences::Workflow] }, nil?: true |
Class Method Details
.variants ⇒ Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)
|
|
# File 'lib/knockapi/models/users/bulk_set_preferences_params.rb', line 160
|
Instance Method Details
#to_hash ⇒ {
65 |
# File 'sig/knockapi/models/users/bulk_set_preferences_params.rbs', line 65
def to_hash: -> {
|