Class: Aws::Rails::ActionMailbox::RSpec::Email Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/rails/action_mailbox/rspec/email.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.

Instance Method Summary collapse

Constructor Details

#initialize(authentic: true, topic: 'topic:arn:default', mail: default_mail, message_params: {}) ⇒ Email

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 Email.



9
10
11
12
13
14
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 9

def initialize(authentic: true, topic: 'topic:arn:default', mail: default_mail, message_params: {})
  @authentic = authentic
  @topic = topic
  @mail = mail
  @message_params = message_params
end

Instance Method Details

#authentic?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.

Returns:

  • (Boolean)


39
40
41
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 39

def authentic?
  @authentic
end

#default_mailObject

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.



43
44
45
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 43

def default_mail
  Mail.new
end

#headersObject

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.



16
17
18
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 16

def headers
  { 'content-type' => 'application/json' }
end

#message_jsonObject

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.



32
33
34
35
36
37
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 32

def message_json
  {
    'notificationType' => 'Received',
    'content' => @mail.encoded
  }.merge(@message_params).to_json
end

#paramsObject

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.



24
25
26
27
28
29
30
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 24

def params
  {
    'Type' => 'Notification',
    'TopicArn' => @topic,
    'Message' => message_json
  }
end

#urlObject

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.



20
21
22
# File 'lib/aws/rails/action_mailbox/rspec/email.rb', line 20

def url
  '/rails/action_mailbox/ses/inbound_emails'
end