Class: TicketEvolution::ApiError
- Defined in:
- lib/ticket_evolution/core/api_error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status_code ⇒ Object
(also: #code)
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(response) ⇒ ApiError
constructor
A new instance of ApiError.
Methods inherited from Model
#attributes, #attributes=, #endpoint, #plural_class, #plural_class_name, #scope
Methods inherited from Builder
Methods included from SingularClass
Constructor Details
#initialize(response) ⇒ ApiError
6 7 8 9 10 11 |
# File 'lib/ticket_evolution/core/api_error.rb', line 6 def initialize(response) @status_code = response.response_code @message = response. super(response.body) self.freeze end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TicketEvolution::Model
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/ticket_evolution/core/api_error.rb', line 3 def @message end |
#status_code ⇒ Object (readonly) Also known as: code
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/ticket_evolution/core/api_error.rb', line 3 def status_code @status_code end |