class Payture::Api::V1::Response

Attributes

result[R]

Public Class Methods

new(response) click to toggle source
# File lib/payture/api/v1/response.rb, line 8
def initialize(response)
  #puts response.body
  return nil if response.body.empty?
  doc = REXML::Document.new(response.body)
  @result = Hash[doc.elements.first.attributes.map { |a| [ a.first.to_snakecase.to_sym, a.last ] }]
end