Class: Knockapi::Models::Recipients::PreferenceSet

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/recipients/preference_set.rb

Defined Under Namespace

Modules: Category, Channel, Workflow

Instance Attribute Summary collapse

Class Method 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:, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil) ⇒ Object

Some parameter documentations has been truncated, see Knockapi::Models::Recipients::PreferenceSet for more details.

A preference set represents a specific set of notification preferences for a recipient. A recipient can have multiple preference sets.

Parameters:



# File 'lib/knockapi/models/recipients/preference_set.rb', line 56


Instance Attribute Details

#categoriesHash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject}?

An object where the key is the category and the values are the preference settings for that category.



18
19
20
21
22
# File 'lib/knockapi/models/recipients/preference_set.rb', line 18

optional :categories,
-> {
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Category]
},
nil?: true

#channel_typesKnockapi::Models::Recipients::PreferenceSetChannelTypes?

Channel type preferences.



28
# File 'lib/knockapi/models/recipients/preference_set.rb', line 28

optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true

#channelsHash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}?

Channel preferences.

Returns:



34
35
36
# File 'lib/knockapi/models/recipients/preference_set.rb', line 34

optional :channels,
-> { Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Channel] },
nil?: true

#commercial_subscribedBoolean?

Whether the recipient is subscribed to commercial communications. When false, the recipient will not receive commercial workflow notifications.

Returns:

  • (Boolean, nil)


43
# File 'lib/knockapi/models/recipients/preference_set.rb', line 43

optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true

#idString

Unique identifier for the preference set.

Returns:

  • (String)


11
# File 'lib/knockapi/models/recipients/preference_set.rb', line 11

required :id, String

#workflowsHash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject}?

An object where the key is the workflow key and the values are the preference settings for that workflow.



50
51
52
53
54
# File 'lib/knockapi/models/recipients/preference_set.rb', line 50

optional :workflows,
-> {
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Workflow]
},
nil?: true

Class Method Details

.variantsArray(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)



# File 'lib/knockapi/models/recipients/preference_set.rb', line 127