Class: CommandTower::Messaging::NotificationTypes::Declaration
- Inherits:
-
Data
- Object
- Data
- CommandTower::Messaging::NotificationTypes::Declaration
- Defined in:
- app/services/command_tower/messaging/notification_types/declaration.rb
Instance Attribute Summary collapse
-
#allowed_channels ⇒ Object
readonly
Returns the value of attribute allowed_channels.
-
#category_key ⇒ Object
readonly
Returns the value of attribute category_key.
-
#category_label ⇒ Object
readonly
Returns the value of attribute category_label.
-
#category_order ⇒ Object
readonly
Returns the value of attribute category_order.
-
#default_channels ⇒ Object
readonly
Returns the value of attribute default_channels.
-
#default_preference_state ⇒ Object
readonly
Returns the value of attribute default_preference_state.
-
#delivery_status_visible ⇒ Object
readonly
Returns the value of attribute delivery_status_visible.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#host_ownership ⇒ Object
readonly
Returns the value of attribute host_ownership.
-
#inbox_available ⇒ Object
readonly
Returns the value of attribute inbox_available.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#mandatory ⇒ Object
readonly
Returns the value of attribute mandatory.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#retention ⇒ Object
readonly
Returns the value of attribute retention.
-
#settings_visible ⇒ Object
readonly
Returns the value of attribute settings_visible.
-
#type_order ⇒ Object
readonly
Returns the value of attribute type_order.
-
#user_configurable ⇒ Object
readonly
Returns the value of attribute user_configurable.
Class Method Summary collapse
Instance Attribute Details
#allowed_channels ⇒ Object (readonly)
Returns the value of attribute allowed_channels
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def allowed_channels @allowed_channels end |
#category_key ⇒ Object (readonly)
Returns the value of attribute category_key
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def category_key @category_key end |
#category_label ⇒ Object (readonly)
Returns the value of attribute category_label
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def category_label @category_label end |
#category_order ⇒ Object (readonly)
Returns the value of attribute category_order
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def category_order @category_order end |
#default_channels ⇒ Object (readonly)
Returns the value of attribute default_channels
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def default_channels @default_channels end |
#default_preference_state ⇒ Object (readonly)
Returns the value of attribute default_preference_state
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def default_preference_state @default_preference_state end |
#delivery_status_visible ⇒ Object (readonly)
Returns the value of attribute delivery_status_visible
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def delivery_status_visible @delivery_status_visible end |
#description ⇒ Object (readonly)
Returns the value of attribute description
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def description @description end |
#host_ownership ⇒ Object (readonly)
Returns the value of attribute host_ownership
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def host_ownership @host_ownership end |
#inbox_available ⇒ Object (readonly)
Returns the value of attribute inbox_available
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def inbox_available @inbox_available end |
#key ⇒ Object (readonly)
Returns the value of attribute key
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def key @key end |
#label ⇒ Object (readonly)
Returns the value of attribute label
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def label @label end |
#mandatory ⇒ Object (readonly)
Returns the value of attribute mandatory
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def mandatory @mandatory end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def priority @priority end |
#retention ⇒ Object (readonly)
Returns the value of attribute retention
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def retention @retention end |
#settings_visible ⇒ Object (readonly)
Returns the value of attribute settings_visible
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def settings_visible @settings_visible end |
#type_order ⇒ Object (readonly)
Returns the value of attribute type_order
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def type_order @type_order end |
#user_configurable ⇒ Object (readonly)
Returns the value of attribute user_configurable
6 7 8 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 6 def user_configurable @user_configurable end |
Class Method Details
.build(key:, allowed_channels:, default_channels:, inbox_available:, user_configurable:, mandatory:, default_preference_state:, label:, category_key:, category_label:, category_order:, type_order:, settings_visible: true, description: nil, priority: nil, retention: nil, delivery_status_visible: nil, host_ownership: nil) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'app/services/command_tower/messaging/notification_types/declaration.rb', line 26 def self.build( key:, allowed_channels:, default_channels:, inbox_available:, user_configurable:, mandatory:, default_preference_state:, label:, category_key:, category_label:, category_order:, type_order:, settings_visible: true, description: nil, priority: nil, retention: nil, delivery_status_visible: nil, host_ownership: nil ) new( key: key.nil? ? nil : key.to_s, allowed_channels: freeze_channel_list(allowed_channels), default_channels: freeze_channel_list(default_channels), inbox_available: !!inbox_available, user_configurable: !!user_configurable, mandatory: !!mandatory, default_preference_state: freeze_preference_state(default_preference_state), label: label.nil? ? nil : label.to_s, category_key: category_key.nil? ? nil : category_key.to_s, category_label: category_label.nil? ? nil : category_label.to_s, category_order:, type_order:, settings_visible: !!settings_visible, description:, priority:, retention:, delivery_status_visible:, host_ownership:, ).freeze end |