| @@ 9-20 (lines=12) @@ | ||
| 6 | # Constructs a new response object from raw_response in the context of transaction. |
|
| 7 | # You don‘t typically construct this object yourself, as AuthorizeNet::Reeporting::Transaction |
|
| 8 | # will build one for you when it makes the request to the gateway. |
|
| 9 | def initialize(raw_response, transaction) |
|
| 10 | super |
|
| 11 | unless connection_failure? |
|
| 12 | begin |
|
| 13 | @batch_list = @root.at_css('batchList') |
|
| 14 | @transactions = @root.at_css('transactions') |
|
| 15 | @transaction = @root.at_css('transaction') |
|
| 16 | rescue StandardError |
|
| 17 | @raw_response = $ERROR_INFO |
|
| 18 | end |
|
| 19 | end |
|
| 20 | end |
|
| 21 | ||
| 22 | # Returns an Array of Batch objects built from the entities returned in the response. Returns nil if no batchList was returned. |
|
| 23 | def batch_list |
|
| @@ 6-17 (lines=12) @@ | ||
| 3 | # Constructs a new response object from a +raw_response. You don't typically |
|
| 4 | # construct this object yourself, as AuthorizeNet::ARB::Transaction will |
|
| 5 | # build one for you when it makes the request to the gateway. |
|
| 6 | def initialize(raw_response, transaction) |
|
| 7 | super |
|
| 8 | unless connection_failure? |
|
| 9 | begin |
|
| 10 | @subscription_details = @root.at_css('subscriptionDetails') |
|
| 11 | @subscription_detail = @root.at_css('subscriptionDetail') |
|
| 12 | @total_num_in_resultset = node_content_unless_nil(@root.at_css('totalNumInResultSet')) |
|
| 13 | rescue StandardError |
|
| 14 | @raw_response = $ERROR_INFO |
|
| 15 | end |
|
| 16 | end |
|
| 17 | end |
|
| 18 | ||
| 19 | # Returns total number of subscriptions matching the search criteria |
|
| 20 | attr_reader :total_num_in_resultset |
|