Class: Adyen::API::RecurringService::ListResponse

Inherits:
Adyen::API::Response show all
Defined in:
lib/adyen/api.rb

Instance Attribute Summary

Attributes inherited from Adyen::API::Response

#http_response

Instance Method Summary collapse

Methods inherited from Adyen::API::Response

#http_failure?, #initialize, response_attrs, #success?, #xml_querier

Constructor Details

This class inherits a constructor from Adyen::API::Response

Instance Method Details

#paramsObject



400
401
402
403
404
405
406
407
408
409
410
# File 'lib/adyen/api.rb', line 400

def params
  @params ||= xml_querier.xpath('//recurring:listRecurringDetailsResponse/recurring:result') do |result|
    details = result.xpath('.//recurring:RecurringDetail')
    details.empty? ? {} : {
      :creation_date            => DateTime.parse(result.text('./recurring:creationDate')),
      :details                  => details.map { |node| parse_recurring_detail(node) },
      :last_known_shopper_email => result.text('./recurring:lastKnownShopperEmail'),
      :shopper_reference        => result.text('./recurring:shopperReference')
    }
  end
end