Based on MessageBird's API documentation, MessageBird::Recipient object contains statusDatetime. But the library is currently throwing an error when attempting to retrieve status_datetime
NoMethodError: undefined method `status_datetime' for #<MessageBird::Recipient:0x00000001125047a0 @recipient=6581825086, @status="delivered">
Solution
After some digging, notice that this bug is due to incorrect method name when executing map_hash_elements_to_self method in Message::Base. This PR renames the method so elements can be mapped to the method correctly and retrieve statusDatetime successfully
Issue
Based on MessageBird's API documentation,
MessageBird::Recipient
object containsstatusDatetime
. But the library is currently throwing an error when attempting to retrievestatus_datetime
Solution
After some digging, notice that this bug is due to incorrect method name when executing
map_hash_elements_to_self
method inMessage::Base
. This PR renames the method so elements can be mapped to the method correctly and retrievestatusDatetime
successfullyAfter this fix, the object looks like this:
Also added a test case to ensure that the change works as expected