class AuthorizeNet::ARB::SubscriptionListResponse
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/subscription_list_response.rb, line 7 def initialize(raw_response, transaction) super unless connection_failure? begin @subscription_details = @root.at_css('subscriptionDetails') @subscription_detail = @root.at_css('subscriptionDetail') @total_num_in_resultset = node_content_unless_nil(@root.at_css('totalNumInResultSet')) rescue @raw_response = $! end end end
Public Instance Methods
subscription_details()
click to toggle source
Returns an Array of SubscriptionDetail
objects built from the entities returned in the response. Returns nil if no subscriptions were returned.
# File lib/authorize_net/arb/subscription_list_response.rb, line 27 def subscription_details unless @subscription_details.nil? subscription_details = [] @subscription_details.element_children.each do |child| unless child.nil? subscription_detail = build_entity(child, Fields::SUBSCRIPTION_DETAIL_ENTITY_DESCRIPTION) subscription_details <<= subscription_detail end end return subscription_details unless subscription_details.length == 0 end end
total_num_in_resultset()
click to toggle source
Returns total number of subscriptions matching the search criteria
# File lib/authorize_net/arb/subscription_list_response.rb, line 22 def total_num_in_resultset @total_num_in_resultset end