Class: GetStream::Generated::Models::APIError
- Defined in:
- lib/getstream_ruby/generated/models/api_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Integer
API error code.
-
#details ⇒ Array<Integer>
Additional error-specific information.
-
#duration ⇒ String
Request duration.
-
#exception_fields ⇒ Hash<String, String>
Additional error info.
-
#message ⇒ String
Message describing an error.
-
#more_info ⇒ String
URL with additional information.
-
#StatusCode ⇒ Integer
Response HTTP status code.
-
#unrecoverable ⇒ Boolean
Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ APIError
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ APIError
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 38 def initialize(attributes = {}) super(attributes) @StatusCode = attributes[:StatusCode] || attributes['StatusCode'] @code = attributes[:code] || attributes['code'] @duration = attributes[:duration] || attributes['duration'] @message = attributes[:message] || attributes['message'] @more_info = attributes[:more_info] || attributes['more_info'] @details = attributes[:details] || attributes['details'] @unrecoverable = attributes[:unrecoverable] || attributes['unrecoverable'] || nil @exception_fields = attributes[:exception_fields] || attributes['exception_fields'] || nil end |
Instance Attribute Details
#code ⇒ Integer
Returns API error code.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 17 def code @code end |
#details ⇒ Array<Integer>
Returns Additional error-specific information.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 29 def details @details end |
#duration ⇒ String
Returns Request duration.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 20 def duration @duration end |
#exception_fields ⇒ Hash<String, String>
Returns Additional error info.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 35 def exception_fields @exception_fields end |
#message ⇒ String
Returns Message describing an error.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 23 def @message end |
#more_info ⇒ String
Returns URL with additional information.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 26 def more_info @more_info end |
#StatusCode ⇒ Integer
Returns Response HTTP status code.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 14 def StatusCode @StatusCode end |
#unrecoverable ⇒ Boolean
Returns Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 32 def unrecoverable @unrecoverable end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/getstream_ruby/generated/models/api_error.rb', line 51 def self.json_field_mappings { StatusCode: 'StatusCode', code: 'code', duration: 'duration', message: 'message', more_info: 'more_info', details: 'details', unrecoverable: 'unrecoverable', exception_fields: 'exception_fields' } end |