Class: CommandTower::Messaging::Preferences::CatalogCategoryResult

Inherits:
Data
  • Object
show all
Defined in:
app/services/command_tower/messaging/preferences/catalog_category_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



6
7
8
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 6

def description
  @description
end

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



6
7
8
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 6

def key
  @key
end

#labelObject (readonly)

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



6
7
8
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 6

def label
  @label
end

#notificationsObject (readonly)

Returns the value of attribute notifications

Returns:

  • (Object)

    the current value of notifications



6
7
8
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 6

def notifications
  @notifications
end

#orderObject (readonly)

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



6
7
8
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 6

def order
  @order
end

Class Method Details

.build(key:, label:, description:, order:, notifications:) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/services/command_tower/messaging/preferences/catalog_category_result.rb', line 7

def self.build(key:, label:, description:, order:, notifications:)
  new(
    key: key.to_s,
    label: label.to_s,
    description:,
    order: Integer(order),
    notifications: Array(notifications).freeze,
  ).freeze
end