Class: ActionMailboxAmazonIngress::RSpec::SubscriptionConfirmation

Inherits:
Object
  • Object
show all
Defined in:
lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb

Instance Method Summary collapse

Constructor Details

#initialize(authentic: true, topic: 'topic:arn:default') ⇒ SubscriptionConfirmation

Returns a new instance of SubscriptionConfirmation.



6
7
8
9
# File 'lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb', line 6

def initialize(authentic: true, topic: 'topic:arn:default')
  @authentic = authentic
  @topic = topic
end

Instance Method Details

#authentic?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb', line 27

def authentic?
  @authentic
end

#headersObject



15
16
17
# File 'lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb', line 15

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

#paramsObject



19
20
21
22
23
24
25
# File 'lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb', line 19

def params
  {
    'Type' => 'SubscriptionConfirmation',
    'TopicArn' => @topic,
    'SubscribeURL' => 'http://example.com/subscribe'
  }
end

#urlObject



11
12
13
# File 'lib/action_mailbox_amazon_ingress/rspec/subscription_confirmation.rb', line 11

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