Sha256: ae9aae26068877e33f1e264a43210ef7cfc242692421ece52776bb029a6043d5
Contents?: true
Size: 1.57 KB
Versions: 18
Compression:
Stored size: 1.57 KB
Contents
module SsciInc class Response attr_reader :user_id, :password, :reference_id, :reference, :order_id, :order_status attr_reader :result_status # ErrorReport attr_reader :error_code, :error_description # postback attr_reader :result_status, :order_status_flag, :screening_results_type, :screening_results_media_type, :screening_results_result_type, :result_url attr_reader :data def initialize(data) @data = data document = Nokogiri::XML.parse(data) @user_id = document.at("//@userId").try(:value) @password = document.at("//@password").try(:value) @reference_id = document.at("//ReferenceId").try(:text) @reference = document.at("//Reference").try(:text) @order_id = document.at("//OrderId").try(:text) @order_status = document.at("//OrderStatus").try(:text) # errors @error_code = document.at("//ErrorCode").try(:text) @error_description = document.at("//ErrorDescription").try(:text) # completed postback response @result_status = document.at("//ResultStatus").try(:text) @order_status_flag = document.at("//OrderStatus//@flag").try(:value) @screening_results_type = document.at("//ScreeningResults//@type").try(:value) @screening_results_media_type = document.at("//ScreeningResults//@mediaType").try(:value) @screening_results_result_type = document.at("//ScreeningResults//@resultType").try(:value) @result_url = document.at("//InternetWebAddress").try(:text) end end end
Version data entries
18 entries across 18 versions & 1 rubygems