lib/avatax_taxservice.rb
############################################################################################################
#standardizes error message format to an array of messages - nokogiri will collapse a single element array into the response hash.
############################################################################################################

standardizes error message format to an array of messages - nokogiri will collapse a single element array into the response hash.
standardizes error message format to an array of messages - nokogiri will collapse a single element array into the response hash .
def messages_to_array(response)
      if response[:messages]
        if response[:messages][:message].is_a?(Hash)
          response[:messages][:message] = [response[:messages][:message]]
        end
      else
        response[:messages] = []
      end
      response
    end
def messages_to_array ( response ) if response [ :messages ] if response [ :messages ] [ :message ] . is_a? ( Hash ) response [ :messages ] [ :message ] = [ response [ :messages ] [ :message ] ] end else response [ :messages ] = [ ] end response end
standardizes error message format to an array of messages - nokogiri will collapse a single element array into the response hash.
standardizes error message format to an array of messages - nokogiri will collapse a single element array into the response hash .
response
<not_specific>