Class: GetStream::Generated::Models::CreatePollOptionRequest
- Defined in:
- lib/getstream_ruby/generated/models/create_poll_option_request.rb
Instance Attribute Summary collapse
-
#config_key ⇒ String
Key of the moderation configuration to use.
-
#config_team ⇒ String
Team associated with the configuration.
-
#custom ⇒ Object
Custom data for this object.
-
#text ⇒ String
Option text.
-
#user ⇒ UserRequest
User request object.
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CreatePollOptionRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ CreatePollOptionRequest
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 32 def initialize(attributes = {}) super(attributes) @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.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 17 def config_key @config_key end |
#config_team ⇒ String
Returns Team associated with the configuration. Server-side only.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 20 def config_team @config_team end |
#custom ⇒ Object
Returns Custom data for this object.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 26 def custom @custom end |
#text ⇒ String
Returns Option text.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 14 def text @text end |
#user ⇒ UserRequest
Returns User request object.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 29 def user @user end |
#user_id ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 23 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/create_poll_option_request.rb', line 43 def self.json_field_mappings { text: 'text', config_key: 'config_key', config_team: 'config_team', user_id: 'user_id', custom: 'custom', user: 'user' } end |