Class: PushToSNS::TeardownPushNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/push_to_sns/teardown_push_notification.rb

Instance Method Summary collapse

Constructor Details

#initialize(device, configuration = PushToSNS.configuration) ⇒ TeardownPushNotification

Returns a new instance of TeardownPushNotification.



3
4
5
6
# File 'lib/push_to_sns/teardown_push_notification.rb', line 3

def initialize(device, configuration = PushToSNS.configuration)
  self.device = device
  self.configuration = configuration
end

Instance Method Details

#performObject



8
9
10
11
# File 'lib/push_to_sns/teardown_push_notification.rb', line 8

def perform
  endpoint = configuration.apply(:read_endpoint_arn, device)
  AWS.sns.client.delete_endpoint(endpoint_arn: endpoint) if endpoint
end