Class: Courier::Models::PreferenceChangeLogEntry

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

Constant Summary collapse

Courier =

Returns:

  • (:PreferenceChangeLogValue)

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(id:, custom_routing:, has_custom_routing:, status:, timestamp:, topic_id:, topic_name:, user_id:, previous: nil, tenant_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::PreferenceChangeLogEntry for more details.

Parameters:

  • id (String) —

    Unique identifier for this change.

  • custom_routing (Array<Symbol, Courier::Models::ChannelClassification>) —

    The channels chosen for this topic, present only when has_custom_routing is true

  • has_custom_routing (Boolean) —

    Whether specific delivery channels were chosen for this topic rather than the to

  • status (Symbol, Courier::Models::PreferenceStatus) —

    The subscription status the change set.

  • timestamp (String) —

    When the change was made, as an ISO-8601 date-time in UTC.

  • topic_id (String) —

    The subscription topic the change applies to.

  • topic_name (String) —

    The display name of that topic when the change was made.

  • user_id (String) —

    The user whose preference changed.

  • previous (Courier::Models::PreferenceChangeLogValue) (defaults to: nil) —

    The value before this change, where it was recorded.

  • tenant_id (String) (defaults to: nil) —

    The tenant context the change was made in. Absent when the user set the preferen



# File 'lib/courier/models/preference_change_log_entry.rb', line 69

Instance Attribute Details

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

The channels chosen for this topic, present only when has_custom_routing is true. Empty otherwise.

Parameters:

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

Returns:



17
# File 'lib/courier/models/preference_change_log_entry.rb', line 17

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

#has_custom_routing ⇒ Boolean

Whether specific delivery channels were chosen for this topic rather than the topic's default routing.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


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

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

#id ⇒ String

Unique identifier for this change.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#previous ⇒ Courier::Models::PreferenceChangeLogValue?

The value before this change, where it was recorded.



60
# File 'lib/courier/models/preference_change_log_entry.rb', line 60

optional :previous, -> { Courier::PreferenceChangeLogValue }

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

The subscription status the change set.

Parameters:

  • value (Courier::Models::preference_status)

Returns:



30
# File 'lib/courier/models/preference_change_log_entry.rb', line 30

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

#tenant_id ⇒ String?

The tenant context the change was made in. Absent when the user set the preference outside any tenant.

Parameters:

  • (String)

Returns:

  • (String, nil)


67
# File 'lib/courier/models/preference_change_log_entry.rb', line 67

optional :tenant_id, String

#timestamp ⇒ String

When the change was made, as an ISO-8601 date-time in UTC.

Parameters:

  • value (String)

Returns:

  • (String)


36
# File 'lib/courier/models/preference_change_log_entry.rb', line 36

required :timestamp, String

#topic_id ⇒ String

The subscription topic the change applies to.

Parameters:

  • value (String)

Returns:

  • (String)


42
# File 'lib/courier/models/preference_change_log_entry.rb', line 42

required :topic_id, String

#topic_name ⇒ String

The display name of that topic when the change was made.

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/courier/models/preference_change_log_entry.rb', line 48

required :topic_name, String

#user_id ⇒ String

The user whose preference changed.

Parameters:

  • value (String)

Returns:

  • (String)


54
# File 'lib/courier/models/preference_change_log_entry.rb', line 54

required :user_id, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


57
# File 'sig/courier/models/preference_change_log_entry.rbs', line 57

def to_hash: -> {