class AuthorizeNet::ARB::Response

The ARB response class.

Public Class Methods

new(raw_response, transaction) click to toggle source

Constructs a new response object from a +raw_response. You don't typically construct this object yourself, as AuthorizeNet::ARB::Transaction will build one for you when it makes the request to the gateway.

Calls superclass method AuthorizeNet::XmlResponse::new
# File lib/authorize_net/arb/response.rb, line 9
def initialize(raw_response, transaction)
  super
  unless connection_failure?
    begin
      @subscription_id = node_content_unless_nil(@root.at_css('subscriptionId'))
      @subscription_status = node_content_unless_nil(@root.at_css('Status'))
    rescue
      @raw_response = $!
    end
  end
end

Public Instance Methods

subscription_id() click to toggle source

Returns the subscriptionId from the response if there is one. Otherwise returns nil.

# File lib/authorize_net/arb/response.rb, line 22
def subscription_id
  @subscription_id
end
subscription_status() click to toggle source

Returns the status of the Subscription from the response if there is one. Otherwise returns nil. This value is only returned in response to a get_status transaction.

# File lib/authorize_net/arb/response.rb, line 28
def subscription_status
  @subscription_status
end