Class: SlackWebApi::AdminConversationsGetTeamsErrorSchemaException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- SlackWebApi::AdminConversationsGetTeamsErrorSchemaException
- Defined in:
- lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb
Overview
Schema for error response from admin.conversations.getTeams
Instance Attribute Summary collapse
-
#error ⇒ Error6
TODO: Write general description for this method.
-
#ok ⇒ String
readonly
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ AdminConversationsGetTeamsErrorSchemaException
constructor
The constructor.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ AdminConversationsGetTeamsErrorSchemaException
The constructor.
23 24 25 26 27 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 23 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#error ⇒ Error6
TODO: Write general description for this method
14 15 16 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 14 def error @error end |
#ok ⇒ String (readonly)
TODO: Write general description for this method
18 19 20 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 18 def ok @ok end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
45 46 47 48 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 45 def inspect class_name = self.class.name.split('::').last "<#{class_name} error: #{@error.inspect}, ok: #{@ok.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
39 40 41 42 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 39 def to_s class_name = self.class.name.split('::').last "<#{class_name} error: #{@error}, ok: #{@ok}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
32 33 34 35 36 |
# File 'lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb', line 32 def unbox(hash) return nil unless hash @error = hash.key?('error') ? hash['error'] : nil end |