Class: Urbanairship::Devices::NamedUserUninstaller
- Inherits:
-
Object
- Object
- Urbanairship::Devices::NamedUserUninstaller
- Defined in:
- lib/urbanairship/devices/named_user.rb
Constant Summary
Constants included from Common
Instance Attribute Summary collapse
-
#named_user_ids ⇒ Object
Returns the value of attribute named_user_ids.
Instance Method Summary collapse
-
#initialize(client: required('client')) ⇒ NamedUserUninstaller
constructor
A new instance of NamedUserUninstaller.
- #uninstall ⇒ Object
Methods included from Loggable
create_logger, logger, #logger
Methods included from Common
#apid_path, #channel_path, #compact_helper, #create_and_send_path, #custom_events_path, #device_token_path, #experiments_path, #lists_path, #named_users_path, #open_channel_path, #pipelines_path, #push_path, #reports_path, #required, #schedules_path, #segments_path, #tag_lists_path, #try_helper
Constructor Details
#initialize(client: required('client')) ⇒ NamedUserUninstaller
Returns a new instance of NamedUserUninstaller.
102 103 104 105 |
# File 'lib/urbanairship/devices/named_user.rb', line 102 def initialize(client: required('client')) @client = client @named_user_ids = nil end |
Instance Attribute Details
#named_user_ids ⇒ Object
Returns the value of attribute named_user_ids.
100 101 102 |
# File 'lib/urbanairship/devices/named_user.rb', line 100 def named_user_ids @named_user_ids end |
Instance Method Details
#uninstall ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/urbanairship/devices/named_user.rb', line 107 def uninstall payload = {} payload['named_user_id'] = @named_user_ids response = @client.send_request( method: 'POST', body: JSON.dump(payload), path: named_users_path('uninstall'), content_type: CONTENT_TYPE ) logger.info { "Uninstalled named_user_ids #{@named_user_ids} " } response end |