def parse_response(response)
      parsed_response = JSON.parse(response.body, :symbolize_names => true)
      if response.code.to_i.between?(400,599)
        raise Monzo::APIError, "#{parsed_response[:code]}: #{parsed_response[:error]}"
      end
      parsed_response
    end
def parse_response(response)
      parsed_response = JSON.parse(response.body, :symbolize_names => true)
      if response.code.to_i.between?(400,599)
        raise Monzo::APIError, "#{parsed_response[:code]}: #{parsed_response[:error]}"
      end
      parsed_response
    end
Private: Parse the API response

 response - A Net::HTTPResponse provided by Monzo::Client

 Returns a hash representing the response or raises a Monzo::APIError