Class: Rafflesia::ApiErrorBody
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ApiErrorBody
- Defined in:
- lib/rafflesia/annotations/api_error_body.rb
Constant Summary collapse
- HASH_ATTRS =
{ code: :code, details: :details, doc_url: :doc_url, message: :message, param: :param, type: :type }.freeze
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#details ⇒ Object
Returns the value of attribute details.
-
#doc_url ⇒ Object
Returns the value of attribute doc_url.
-
#message ⇒ Object
Returns the value of attribute message.
-
#param ⇒ Object
Returns the value of attribute param.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(json) ⇒ ApiErrorBody
constructor
A new instance of ApiErrorBody.
Constructor Details
#initialize(json) ⇒ ApiErrorBody
Returns a new instance of ApiErrorBody.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @code = hash[:code] @details = hash[:details] || {} @doc_url = hash[:doc_url] @message = hash[:message] @param = hash[:param] @type = hash[:type] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def code @code end |
#details ⇒ Object
Returns the value of attribute details.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def details @details end |
#doc_url ⇒ Object
Returns the value of attribute doc_url.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def doc_url @doc_url end |
#message ⇒ Object
Returns the value of attribute message.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def @message end |
#param ⇒ Object
Returns the value of attribute param.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def param @param end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/rafflesia/annotations/api_error_body.rb', line 17 def type @type end |