Class: CommandTower::Messaging::Preferences::EvaluationResult
- Inherits:
-
Data
- Object
- Data
- CommandTower::Messaging::Preferences::EvaluationResult
- Defined in:
- app/services/command_tower/messaging/preferences/evaluation_result.rb
Instance Attribute Summary collapse
-
#effective_preference_state ⇒ Object
readonly
Returns the value of attribute effective_preference_state.
-
#inbox_permitted ⇒ Object
readonly
Returns the value of attribute inbox_permitted.
-
#mandatory ⇒ Object
readonly
Returns the value of attribute mandatory.
-
#mandatory_enforced ⇒ Object
readonly
Returns the value of attribute mandatory_enforced.
-
#notification_type_key ⇒ Object
readonly
Returns the value of attribute notification_type_key.
-
#permitted_channels ⇒ Object
readonly
Returns the value of attribute permitted_channels.
-
#recipient_id ⇒ Object
readonly
Returns the value of attribute recipient_id.
-
#stored_override_present ⇒ Object
readonly
Returns the value of attribute stored_override_present.
-
#suppressed_destinations ⇒ Object
readonly
Returns the value of attribute suppressed_destinations.
Class Method Summary collapse
Instance Attribute Details
#effective_preference_state ⇒ Object (readonly)
Returns the value of attribute effective_preference_state
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def effective_preference_state @effective_preference_state end |
#inbox_permitted ⇒ Object (readonly)
Returns the value of attribute inbox_permitted
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def inbox_permitted @inbox_permitted end |
#mandatory ⇒ Object (readonly)
Returns the value of attribute mandatory
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def mandatory @mandatory end |
#mandatory_enforced ⇒ Object (readonly)
Returns the value of attribute mandatory_enforced
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def mandatory_enforced @mandatory_enforced end |
#notification_type_key ⇒ Object (readonly)
Returns the value of attribute notification_type_key
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def notification_type_key @notification_type_key end |
#permitted_channels ⇒ Object (readonly)
Returns the value of attribute permitted_channels
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def permitted_channels @permitted_channels end |
#recipient_id ⇒ Object (readonly)
Returns the value of attribute recipient_id
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def recipient_id @recipient_id end |
#stored_override_present ⇒ Object (readonly)
Returns the value of attribute stored_override_present
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def stored_override_present @stored_override_present end |
#suppressed_destinations ⇒ Object (readonly)
Returns the value of attribute suppressed_destinations
6 7 8 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 6 def suppressed_destinations @suppressed_destinations end |
Class Method Details
.build(notification_type_key:, recipient_id:, permitted_channels:, inbox_permitted:, suppressed_destinations:, mandatory:, mandatory_enforced:, stored_override_present: false, effective_preference_state: nil) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/services/command_tower/messaging/preferences/evaluation_result.rb', line 17 def self.build( notification_type_key:, recipient_id:, permitted_channels:, inbox_permitted:, suppressed_destinations:, mandatory:, mandatory_enforced:, stored_override_present: false, effective_preference_state: nil ) new( notification_type_key: notification_type_key.to_s, recipient_id:, permitted_channels: Array(permitted_channels).map(&:to_s).freeze, inbox_permitted: !!inbox_permitted, suppressed_destinations: Array(suppressed_destinations).freeze, mandatory: !!mandatory, mandatory_enforced: !!mandatory_enforced, stored_override_present: !!stored_override_present, effective_preference_state: freeze_effective_state(effective_preference_state), ).freeze end |