Class: Whatsapp::Messages::LocationRequest
- Defined in:
- lib/ruby/whatsapp/messages/location_request.rb
Defined Under Namespace
Modules: Defaults
Instance Attribute Summary collapse
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(body:) ⇒ LocationRequest
constructor
A new instance of LocationRequest.
- #serialize ⇒ Object
Constructor Details
#initialize(body:) ⇒ LocationRequest
Returns a new instance of LocationRequest.
21 22 23 24 25 26 27 |
# File 'lib/ruby/whatsapp/messages/location_request.rb', line 21 def initialize(body:, **) super(**) @body = body validate! end |
Instance Attribute Details
#body ⇒ Hash
14 15 16 |
# File 'lib/ruby/whatsapp/messages/location_request.rb', line 14 def body @body end |
Instance Method Details
#serialize ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ruby/whatsapp/messages/location_request.rb', line 29 def serialize envelope( type: Defaults::TYPE, interactive: { type: Defaults::INTERACTIVE_TYPE, body:, action: { name: Defaults::ACTION_NAME }, } ) end |