Exception: Usps::Imis::Error::Response
- Defined in:
- lib/usps/imis/error/response.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #bugsnag_meta_data ⇒ Object
-
#initialize(response, metadata = {}) ⇒ Response
constructor
A new instance of Response.
- #message ⇒ Object
Constructor Details
#initialize(response, metadata = {}) ⇒ Response
Returns a new instance of Response.
10 11 12 13 |
# File 'lib/usps/imis/error/response.rb', line 10 def initialize(response, = {}) @response = response super(, ) end |
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/usps/imis/error/response.rb', line 8 def @metadata end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/usps/imis/error/response.rb', line 7 def response @response end |
Instance Method Details
#bugsnag_meta_data ⇒ Object
15 16 17 |
# File 'lib/usps/imis/error/response.rb', line 15 def .tap { |m| m[:api].merge!() } end |
#message ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/usps/imis/error/response.rb', line 19 def [ "#{self.class.name}: [#{status.to_s.upcase}] The iMIS API returned an error.", (.inspect if != {}), body ].compact.join("\n") end |