Class: Knockapi::Models::MessageInAppFeedButtonSetBlock::Button
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Knockapi::Models::MessageInAppFeedButtonSetBlock::Button
- Defined in:
- lib/knockapi/models/message_in_app_feed_button_set_block.rb,
sig/knockapi/models/message_in_app_feed_button_set_block.rbs
Instance Attribute Summary collapse
-
#action ⇒ String
The action to take when the button is clicked.
-
#label ⇒ String
The label of the button.
-
#name ⇒ String
The name of the button.
Instance Method Summary collapse
-
#initialize(buttons:, name:, type:) ⇒ Button
constructor
A button set block in a message in an app feed.
- #to_hash ⇒ { action: String, label: String, name: String }
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(buttons:, name:, type:) ⇒ Button
A button set block in a message in an app feed.
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 |
# File 'lib/knockapi/models/message_in_app_feed_button_set_block.rb', line 34 class Button < Knockapi::Internal::Type::BaseModel # @!attribute action # The action to take when the button is clicked. # # @return [String] required :action, String # @!attribute label # The label of the button. # # @return [String] required :label, String # @!attribute name # The name of the button. # # @return [String] required :name, String # @!method initialize(action:, label:, name:) # A button in an in app feed message. # # @param action [String] The action to take when the button is clicked. # # @param label [String] The label of the button. # # @param name [String] The name of the button. end |
Instance Attribute Details
#action ⇒ String
The action to take when the button is clicked.
39 |
# File 'lib/knockapi/models/message_in_app_feed_button_set_block.rb', line 39 required :action, String |
#label ⇒ String
The label of the button.
45 |
# File 'lib/knockapi/models/message_in_app_feed_button_set_block.rb', line 45 required :label, String |
#name ⇒ String
The name of the button.
51 |
# File 'lib/knockapi/models/message_in_app_feed_button_set_block.rb', line 51 required :name, String |
Instance Method Details
#to_hash ⇒ { action: String, label: String, name: String }
40 |
# File 'sig/knockapi/models/message_in_app_feed_button_set_block.rbs', line 40
def to_hash: -> { action: String, label: String, name: String }
|