Class: Courier::Models::PreferenceChangeLogValue

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/preference_change_log_value.rb,
sig/courier/models/preference_change_log_value.rbs

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

Parameters:



# File 'lib/courier/models/preference_change_log_value.rb', line 24

Instance Attribute Details

#custom_routing ⇒ Array<Symbol, Courier::Models::ChannelClassification>

The channels chosen before the change.

Parameters:

  • value (::Array[Courier::Models::channel_classification])

Returns:



10
# File 'lib/courier/models/preference_change_log_value.rb', line 10

required :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }

#has_custom_routing ⇒ Boolean

Whether custom routing was in effect before the change.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


16
# File 'lib/courier/models/preference_change_log_value.rb', line 16

required :has_custom_routing, Courier::Internal::Type::Boolean

#status ⇒ Symbol, Courier::Models::PreferenceStatus

The subscription status before the change.

Parameters:

  • value (Courier::Models::preference_status)

Returns:



22
# File 'lib/courier/models/preference_change_log_value.rb', line 22

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


23
# File 'sig/courier/models/preference_change_log_value.rbs', line 23

def to_hash: -> {