Class: SlackWebApi::ConversationsLeaveSuccessSchema
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SlackWebApi::ConversationsLeaveSuccessSchema
- Defined in:
- lib/slack_web_api/models/conversations_leave_success_schema.rb
Overview
Schema for successful response from conversations.leave method
Instance Attribute Summary collapse
-
#not_in_channel ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#ok ⇒ String
readonly
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(not_in_channel: SKIP, additional_properties: nil) ⇒ ConversationsLeaveSuccessSchema
constructor
A new instance of ConversationsLeaveSuccessSchema.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(not_in_channel: SKIP, additional_properties: nil) ⇒ ConversationsLeaveSuccessSchema
Returns a new instance of ConversationsLeaveSuccessSchema.
40 41 42 43 44 45 46 47 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 40 def initialize(not_in_channel: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @not_in_channel = not_in_channel unless not_in_channel == SKIP @ok = 'True' @additional_properties = additional_properties end |
Instance Attribute Details
#not_in_channel ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 14 def not_in_channel @not_in_channel end |
#ok ⇒ String (readonly)
TODO: Write general description for this method
18 19 20 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 18 def ok @ok end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. not_in_channel = hash.key?('not_in_channel') ? hash['not_in_channel'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ConversationsLeaveSuccessSchema.new(not_in_channel: not_in_channel, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['not_in_channel'] = 'not_in_channel' @_hash['ok'] = 'ok' @_hash end |
.nullables ⇒ Object
An array for nullable fields
36 37 38 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 36 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 29 def self.optionals %w[ not_in_channel ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
77 78 79 80 81 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 77 def inspect class_name = self.class.name.split('::').last "<#{class_name} not_in_channel: #{@not_in_channel.inspect}, ok: #{@ok.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
70 71 72 73 74 |
# File 'lib/slack_web_api/models/conversations_leave_success_schema.rb', line 70 def to_s class_name = self.class.name.split('::').last "<#{class_name} not_in_channel: #{@not_in_channel}, ok: #{@ok}, additional_properties:"\ " #{@additional_properties}>" end |