Class: Masklen::BatchItemError
- Inherits:
-
Struct
- Object
- Struct
- Masklen::BatchItemError
- Defined in:
- lib/masklen/types.rb
Overview
Represents a failed entry inside a batch lookup response.
Instance Attribute Summary collapse
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#ip ⇒ Object
Returns the value of attribute ip.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Build a BatchItemError from a parsed JSON hash.
Instance Attribute Details
#error_code ⇒ Object
Returns the value of attribute error_code
122 123 124 |
# File 'lib/masklen/types.rb', line 122 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message
122 123 124 |
# File 'lib/masklen/types.rb', line 122 def @error_message end |
#ip ⇒ Object
Returns the value of attribute ip
122 123 124 |
# File 'lib/masklen/types.rb', line 122 def ip @ip end |
Class Method Details
.from_hash(hash) ⇒ Object
Build a BatchItemError from a parsed JSON hash.
129 130 131 132 133 134 135 |
# File 'lib/masklen/types.rb', line 129 def self.from_hash(hash) new( ip: hash["ip"], error_code: hash["error_code"], error_message: hash["error_message"] ) end |