Class: WscSdk::Models::Error
- Inherits:
-
WscSdk::Model
- Object
- WscSdk::Model
- WscSdk::Models::Error
- Defined in:
- lib/wsc_sdk/models/error.rb
Overview
A model to represent an error returned from the API.
Instance Attribute Summary
Attributes inherited from WscSdk::Model
#attributes, #changes, #data_mode, #endpoint, #errors, #partial_data
Instance Method Summary collapse
-
#success? ⇒ Boolean
Since this is an error response the success is always false.
-
#to_s ⇒ Object
Generates a string with the details of the error.
Methods inherited from WscSdk::Model
#add_error, attribute, #build_payload, #build_payload!, #clean!, #clear_primary_key, #delete, #dirty?, #has_attribute?, #ingest_attribute, #ingest_attributes, #initialize, #initialize_attributes, model_name_plural, model_name_singular, #new_model?, #primary_key, primary_key, #primary_key_attribute, #refresh, #save, #schema, schema, #valid!, #valid?, #validate
Methods included from Loggable
Constructor Details
This class inherits a constructor from WscSdk::Model
Instance Method Details
#success? ⇒ Boolean
Since this is an error response the success is always false.
42 43 44 |
# File 'lib/wsc_sdk/models/error.rb', line 42 def success? @success = false end |
#to_s ⇒ Object
Generates a string with the details of the error.
48 49 50 |
# File 'lib/wsc_sdk/models/error.rb', line 48 def to_s "#{code} | #{title} | #{} | #{description}" end |