Class: PlatformAPI::UserPreferences

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

Tracks a user’s preferences and message dismissals

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ UserPreferences

Returns a new instance of UserPreferences.



3501
3502
3503
# File 'lib/platform-api/client.rb', line 3501

def initialize(client)
  @client = client
end

Instance Method Details

#list(user_preferences_self) ⇒ Object

Retrieve User Preferences

Parameters:

  • user_preferences_self:

    Implicit reference to currently authorized user



3508
3509
3510
# File 'lib/platform-api/client.rb', line 3508

def list(user_preferences_self)
  @client.user_preferences.list(user_preferences_self)
end

#update(user_preferences_self, body = {}) ⇒ Object

Update User Preferences

Parameters:

  • user_preferences_self:

    Implicit reference to currently authorized user

  • body:

    the object to pass as the request payload



3516
3517
3518
# File 'lib/platform-api/client.rb', line 3516

def update(user_preferences_self, body = {})
  @client.user_preferences.update(user_preferences_self, body)
end