Class: GetStream::Generated::Models::PushPreferenceInput

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/push_preference_input.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ PushPreferenceInput

Initialize with attributes



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 38

def initialize(attributes = {})
  super(attributes)
  @call_level = attributes[:call_level] || attributes['call_level'] || nil
  @channel_cid = attributes[:channel_cid] || attributes['channel_cid'] || nil
  @chat_level = attributes[:chat_level] || attributes['chat_level'] || nil
  @disabled_until = attributes[:disabled_until] || attributes['disabled_until'] || nil
  @feeds_level = attributes[:feeds_level] || attributes['feeds_level'] || nil
  @remove_disable = attributes[:remove_disable] || attributes['remove_disable'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @feeds_preferences = attributes[:feeds_preferences] || attributes['feeds_preferences'] || nil
end

Instance Attribute Details

#call_levelString

Returns Set the level of call push notifications for the user. One of all, none, default.

Returns:

  • (String)

    Set the level of call push notifications for the user. One of all, none, default



14
15
16
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 14

def call_level
  @call_level
end

#channel_cidString

Returns Set the push preferences for a specific channel. If empty it sets the default for the user.

Returns:

  • (String)

    Set the push preferences for a specific channel. If empty it sets the default for the user



17
18
19
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 17

def channel_cid
  @channel_cid
end

#chat_levelString

Returns Set the level of chat push notifications for the user. One of all, mentions, none, default.

Returns:

  • (String)

    Set the level of chat push notifications for the user. One of all, mentions, none, default



20
21
22
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 20

def chat_level
  @chat_level
end

#disabled_untilDateTime

Returns Disable push notifications till a certain time.

Returns:

  • (DateTime)

    Disable push notifications till a certain time



23
24
25
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 23

def disabled_until
  @disabled_until
end

#feeds_levelString

Returns Set the level of feeds push notifications for the user. One of all, none, default.

Returns:

  • (String)

    Set the level of feeds push notifications for the user. One of all, none, default



26
27
28
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 26

def feeds_level
  @feeds_level
end

#feeds_preferencesFeedsPreferences

Returns:



35
36
37
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 35

def feeds_preferences
  @feeds_preferences
end

#remove_disableBoolean

Returns Remove the disabled until time. (IE stop snoozing notifications).

Returns:

  • (Boolean)

    Remove the disabled until time. (IE stop snoozing notifications)



29
30
31
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 29

def remove_disable
  @remove_disable
end

#user_idString

Returns The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.

Returns:

  • (String)

    The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.



32
33
34
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 32

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/getstream_ruby/generated/models/push_preference_input.rb', line 51

def self.json_field_mappings
  {
    call_level: 'call_level',
    channel_cid: 'channel_cid',
    chat_level: 'chat_level',
    disabled_until: 'disabled_until',
    feeds_level: 'feeds_level',
    remove_disable: 'remove_disable',
    user_id: 'user_id',
    feeds_preferences: 'feeds_preferences'
  }
end