Class: Arafa::Whatsapp::MessageBody::Interactive::Row

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/arafa/whatsapp/message_body.rb

Overview

One row of an interactive list section: {id, title, description}.

Instance Method Summary collapse

Instance Method Details

#to_hObject



70
71
72
73
74
# File 'lib/arafa/whatsapp/message_body.rb', line 70

def to_h
  body = { id: id, title: title }
  body[:description] = description unless description.nil?
  body
end