Class: CloudWaba::Models::Messages::Response
- Inherits:
-
T::Struct
- Object
- T::Struct
- CloudWaba::Models::Messages::Response
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/cloud_waba/models/messages/response.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#messaging_product ⇒ Object
{ “messaging_product”=>“whatsapp”, “contacts”=>[ “wa_id”=>“202222222222” ], “messages”=>[ “id”=>“wamid“id”=>“wamid.HBgMMjUIzSNRIREAMOjAFQzxRjygADgAMAD1FQExzzIQMMjzM2UMxZ==” ] }.
Class Method Details
.parse(hash:) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cloud_waba/models/messages/response.rb', line 25 def self.parse(hash:) contact_wa_id = hash["contacts"][0]["wa_id"] = hash["messages"][0]["id"] self.new( messaging_product: ::CloudWaba::Models::Enums::MessagingProduct::WhatsApp, contacts: [::CloudWaba::Models::Contact.new(wa_id: contact_wa_id)], message_id: ) end |
Instance Method Details
#messaging_product ⇒ Object
"messaging_product"=>"whatsapp",
"contacts"=>[
{"input"=>"+201111111111", "wa_id"=>"202222222222"
],
"messages"=>[
CloudWaba::Models::Messages::Response."id"=>"wamid"id"=>"wamid.HBgMMjUIzSNRIREAMOjAFQzxRjygADgAMAD1FQExzzIQMMjzM2UMxZ=="
]
}
20 |
# File 'lib/cloud_waba/models/messages/response.rb', line 20 prop :messaging_product, ::CloudWaba::Models::Enums::MessagingProduct |