class Urbanairship::Devices::OpenChannelUninstall

Attributes

client[R]

Public Class Methods

new(client: required('client')) click to toggle source
# File lib/urbanairship/devices/channel_uninstall.rb, line 41
def initialize(client: required('client'))
  @client = client
end

Public Instance Methods

uninstall(address: required('address'), open_platform: required('open_platform')) click to toggle source
# File lib/urbanairship/devices/channel_uninstall.rb, line 45
def uninstall(address: required('address'),
              open_platform: required('open_platform'))

  body = {
    address: address,
    open_platform_name: open_platform
  }

  response = @client.send_request(
    method: 'POST',
    body: JSON.dump(body),
    path: open_channel_path('uninstall/'),
    content_type: 'application/json'
  )

  logger.info { "Successfully uninstalled open channel with address: #{address}"}
  response
end