Exception: Shipvine::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Shipvine::Error
- Defined in:
- lib/shipvine/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#shipvine_message ⇒ Object
readonly
Returns the value of attribute shipvine_message.
Instance Method Summary collapse
-
#initialize(response = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 |
# File 'lib/shipvine/error.rb', line 5 def initialize(response = nil) if response.present? @code = response.code = response.parsed_response["Errors"]["Error"]["Message"] end end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/shipvine/error.rb', line 3 def code @code end |
#shipvine_message ⇒ Object (readonly)
Returns the value of attribute shipvine_message.
3 4 5 |
# File 'lib/shipvine/error.rb', line 3 def end |