Class: Aws::Rails::ActionMailbox::SnsNotification Private
- Inherits:
-
Object
- Object
- Aws::Rails::ActionMailbox::SnsNotification
- Defined in:
- lib/aws/rails/action_mailbox/sns_notification.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: MessageContentError
Instance Method Summary collapse
-
#initialize(request_body) ⇒ SnsNotification
constructor
private
A new instance of SnsNotification.
- #message_content ⇒ Object private
- #subscription_confirmed? ⇒ Boolean private
- #topic ⇒ Object private
- #type ⇒ Object private
- #verified? ⇒ Boolean private
Constructor Details
permalink #initialize(request_body) ⇒ SnsNotification
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SnsNotification.
14 15 16 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 14 def initialize(request_body) @request_body = request_body end |
Instance Method Details
permalink #message_content ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 34 def raise MessageContentError, 'Incoming emails must have notificationType `Received`' unless receipt? if content_in_s3? s3_content else return [:content] unless destination "X-Original-To: #{destination}\n#{[:content]}" end end |
permalink #subscription_confirmed? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 18 def subscription_confirmed? (200..299).cover?(confirmation_response.code.to_i) end |
permalink #topic ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 26 def topic notification.fetch(:TopicArn) end |
permalink #type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 30 def type notification.fetch(:Type) end |
permalink #verified? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/aws/rails/action_mailbox/sns_notification.rb', line 22 def verified? SnsMessageVerifier.verifier.authentic?(@request_body) end |