Class: Whatsapp::Messages::Response::Messages

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby/whatsapp/messages/response/messages.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:) ⇒ Messages

Returns a new instance of Messages.

Parameters:

  • id (String)

    The unique identifier of the message.



12
13
14
# File 'lib/ruby/whatsapp/messages/response/messages.rb', line 12

def initialize(id:)
  @id = id
end

Instance Attribute Details

#idString

Returns:

  • (String)


9
10
11
# File 'lib/ruby/whatsapp/messages/response/messages.rb', line 9

def id
  @id
end

Class Method Details

.deserialize(data) ⇒ Object

Deserializes a hash into a Messages::Response::Messages object.

Parameters:

  • data (Hash)

    The hash representation of the message response. @return [Messages::Response::Messages] The deserialized message response object.



20
21
22
# File 'lib/ruby/whatsapp/messages/response/messages.rb', line 20

def deserialize(data)
  new(id: data["id"])
end