Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Items400ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Items400ErrorException
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb
Overview
Items 400 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.
-
#info ⇒ String
TODO: Write general description for this method.
-
#severity ⇒ String
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ Items400ErrorException
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) ⇒ Items400ErrorException
The constructor.
44 45 46 47 48 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 44 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
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 31 def category @category end |
#causes ⇒ Array[String]
TODO: Write general description for this method
35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 35 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/items400_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/items400_error_exception.rb', line 19 def description @description end |
#error_identifiers ⇒ Object
TODO: Write general description for this method
39 40 41 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 39 def error_identifiers @error_identifiers end |
#info ⇒ 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/items400_error_exception.rb', line 23 def info @info end |
#severity ⇒ 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/items400_error_exception.rb', line 27 def severity @severity end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
75 76 77 78 79 80 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 75 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect}, info:"\ " #{@info.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.
67 68 69 70 71 72 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 67 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, description: #{@description}, info: #{@info}, 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.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items400_error_exception.rb', line 53 def unbox(hash) return nil unless hash @code = hash.key?('code') ? hash['code'] : nil @description = hash.key?('description') ? hash['description'] : nil @info = hash.key?('info') ? hash['info'] : 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 |