Class: Knockapi::Models::Recipients::PreferenceSetRequest

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

Defined Under Namespace

Modules: Category, Channel, PersistenceStrategy, 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(_persistence_strategy: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil) ⇒ Object

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

A request to set a preference set for a recipient.

Parameters:



# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 61

Instance Attribute Details

#_persistence_strategySymbol, ...

Controls how the preference set is persisted. ‘replace’ will completely replace the preference set, ‘merge’ will merge with existing preferences.



12
13
14
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 12

optional :_persistence_strategy,
enum: -> { Knockapi::Recipients::PreferenceSetRequest::PersistenceStrategy },
api_name: :__persistence_strategy__

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

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



21
22
23
24
25
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 21

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

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

Channel type preferences.



31
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 31

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

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

Channel preferences.

Returns:



37
38
39
40
41
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 37

optional :channels,
-> {
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSetRequest::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)


48
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 48

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

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

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



55
56
57
58
59
# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 55

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 89

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



# File 'lib/knockapi/models/recipients/preference_set_request.rb', line 147