class Nuncium::Response

Attributes

body[RW]
status[RW]

Public Class Methods

new(response) click to toggle source
# File lib/nuncium/response.rb, line 5
def initialize(response)
  @response = Hash.from_xml(response.body)
end

Public Instance Methods

parsed_body() click to toggle source
# File lib/nuncium/response.rb, line 9
def parsed_body
  raise HtmlResponseReceived, @response.inspect unless @response['Envelope'].present?
  @response['Envelope']['Body'][result_key]
end
result_key() click to toggle source
# File lib/nuncium/response.rb, line 14
def result_key
  @response['Envelope']['Body'].first[0]
end