Method: AWS::SQS::ReceivedSNSMessage#to_h
- Defined in:
- lib/aws/sqs/received_sns_message.rb
#to_h ⇒ Hash
Returns the decoded message as a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/aws/sqs/received_sns_message.rb', line 94 def to_h data = JSON.parse(@body) { :body => data['Message'], :topic_arn => data['TopicArn'], :message_type => data['Type'], :signature => data['Signature'], :signature_version => data['SignatureVersion'], :published_at => Time.parse(data['Timestamp']), :message_id => data['MessageId'], :signing_cert_url => data['SigningCertURL'], :unsubscribe_url => data['UnsubscribeURL'], } end |