Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::ItemsAssociations400ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::ItemsAssociations400ErrorException
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb
Overview
Items Associations 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.
-
#field ⇒ String
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) ⇒ ItemsAssociations400ErrorException
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) ⇒ ItemsAssociations400ErrorException
The constructor.
48 49 50 51 52 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb', line 48 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/items_associations400_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/items_associations400_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/items_associations400_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/items_associations400_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/items_associations400_error_exception.rb', line 39 def error_identifiers @error_identifiers end |
#field ⇒ String
TODO: Write general description for this method
43 44 45 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb', line 43 def field @field 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/items_associations400_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/items_associations400_error_exception.rb', line 27 def severity @severity end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
80 81 82 83 84 85 86 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb', line 80 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}, field:"\ " #{@field.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
72 73 74 75 76 77 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb', line 72 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}, field: #{@field}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/items_associations400_error_exception.rb', line 57 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 @field = hash.key?('field') ? hash['field'] : nil end |