Class: GetStream::Generated::Models::UpdatePollOptionRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/update_poll_option_request.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 = {}) ⇒ UpdatePollOptionRequest

Initialize with attributes



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/update_poll_option_request.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @id = attributes.fetch(:id) { attributes.fetch('id', nil) }
  @text = attributes.fetch(:text) { attributes.fetch('text', nil) }
  @config_key = attributes.fetch(:config_key) { attributes.fetch('config_key', nil) }
  @config_team = attributes.fetch(:config_team) { attributes.fetch('config_team', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#config_key ⇒ String

Returns Key of the moderation configuration to use. Server-side only.

Returns:

  • (String) —

    Key of the moderation configuration to use. Server-side only.



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

def config_key
  @config_key
end

#config_team ⇒ String

Returns Team associated with the configuration. Server-side only.

Returns:

  • (String) —

    Team associated with the configuration. Server-side only.



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

def config_team
  @config_team
end

#custom ⇒ Object

Returns Custom data for this object.

Returns:

  • (Object) —

    Custom data for this object



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

def custom
  @custom
end

#id ⇒ String

Returns Option ID.

Returns:

  • (String) —

    Option ID



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

def id
  @id
end

#text ⇒ String

Returns Option text.

Returns:

  • (String) —

    Option text



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

def text
  @text
end

#user ⇒ UserRequest

Returns User request object.

Returns:



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

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/update_poll_option_request.rb', line 47

def self.json_field_mappings
  {
    id: 'id',
    text: 'text',
    config_key: 'config_key',
    config_team: 'config_team',
    user_id: 'user_id',
    custom: 'custom',
    user: 'user'
  }
end