Method: ActiveShipping::UPS#response_message

Defined in:
lib/active_shipping/carriers/ups.rb

#response_message(document) ⇒ Object (protected)



1107
1108
1109
1110
1111
# File 'lib/active_shipping/carriers/ups.rb', line 1107

def response_message(document)
  status = document.root.at_xpath('Response/ResponseStatusDescription').try(:text)
  desc = document.root.at_xpath('Response/Error/ErrorDescription').try(:text)
  [status, desc].select(&:present?).join(": ").presence || "UPS could not process the request."
end