class Transbank::Webpay::Response

Attributes

attributes[R]
exception[R]
params[R]

Public Class Methods

new(content, action, params) click to toggle source
# File lib/transbank/webpay/response.rb, line 10
def initialize(content, action, params)
  @content = content
  @action = action
  @params = params
  @attributes = xml_to_hash(xml_return)
  @errors = []

  validate_response!
end

Public Instance Methods

exception?() click to toggle source
# File lib/transbank/webpay/response.rb, line 31
def exception?
  false
end
http_code() click to toggle source
# File lib/transbank/webpay/response.rb, line 20
def http_code
  content.code
end
inspect() click to toggle source
# File lib/transbank/webpay/response.rb, line 24
def inspect
  result = ["valid: #{valid?}"]
  result << attributes.inspect if attributes?
  result << "error: \"#{errors_display}\"" if errors.any?
  "#<#{self.class} #{result.join(', ')}>"
end
method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/transbank/webpay/response.rb, line 39
def method_missing(method_name, *args, &block)
  attributes.respond_to?(method_name) && attributes.send(method_name) || super
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/transbank/webpay/response.rb, line 43
def respond_to_missing?(method_name, include_private = false)
  attributes.respond_to?(method_name, include_private) || super
end