Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Items500ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Items500ErrorException
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb
Overview
Items 500 Error class.
Instance Attribute Summary collapse
-
#category ⇒ String
TODO: Write general description for this method.
-
#causes ⇒ Array[String]
TODO: Write general description for this method.
-
#code ⇒ String
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#error_identifiers ⇒ Object
TODO: Write general description for this method.
-
#severity ⇒ String
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ Items500ErrorException
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) ⇒ Items500ErrorException
The constructor.
40 41 42 43 44 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 40 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#category ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 27 def category @category end |
#causes ⇒ Array[String]
TODO: Write general description for this method
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 31 def causes @causes end |
#code ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 15 def code @code end |
#description ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 19 def description @description end |
#error_identifiers ⇒ Object
TODO: Write general description for this method
35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 35 def error_identifiers @error_identifiers end |
#severity ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 23 def severity @severity end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
69 70 71 72 73 74 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 69 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect}, severity:"\ " #{@severity.inspect}, category: #{@category.inspect}, causes: #{@causes.inspect},"\ " error_identifiers: #{@error_identifiers.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 66 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, description: #{@description}, severity: #{@severity},"\ " category: #{@category}, causes: #{@causes}, error_identifiers: #{@error_identifiers}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items500_error_exception.rb', line 49 def unbox(hash) return nil unless hash @code = hash.key?('code') ? hash['code'] : nil @description = hash.key?('description') ? hash['description'] : nil @severity = hash.key?('severity') ? hash['severity'] : nil @category = hash.key?('category') ? hash['category'] : nil @causes = hash.key?('causes') ? hash['causes'] : nil @error_identifiers = hash.key?('errorIdentifiers') ? hash['errorIdentifiers'] : nil end |