Sha256: 3cc3dc0d95fea1adc6983be9803660a3df66641af46514f1fcd28a9984ba780e

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module RubyIsds
  class Response
    attr_accessor :status, :body

    def initialize(response)
      @response = Hash.from_xml(response.body)
    end

    def parsed_body
      raise HtmlResponseReceived, @response.inspect unless @response['Envelope'].present?
      @response['Envelope']['Body'][result_key]
    end

    def result_key
      @response['Envelope']['Body'].first[0]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_isds-0.13.0 lib/ruby_isds/response.rb