class MSS::Core::RESTXMLClient

@since 1.8.0

Protected Class Methods

request_builder_for(api_config, operation) click to toggle source
# File lib/mss/core/rest_xml_client.rb, line 20
def self.request_builder_for api_config, operation
  RESTRequestBuilder.new(operation,
    :format => :xml,
    :xmlnamespace => api_config[:namespace])
end
response_parser_for(api_config, operation) click to toggle source
# File lib/mss/core/rest_xml_client.rb, line 26
def self.response_parser_for api_config, operation
  RESTResponseParser.new(operation, :format => :xml)
end

Protected Instance Methods

extract_error_details(response) click to toggle source
# File lib/mss/core/rest_xml_client.rb, line 30
def extract_error_details response
  if
    response.http_response.status >= 300 and
    body = response.http_response.body and
    error = errors_module::GRAMMAR.parse(body) and
    error[:code]
  then
    [error[:code], error[:message]]
  end
end