Class: BluelineServices::Response
- Inherits:
-
Object
- Object
- BluelineServices::Response
- Defined in:
- lib/blueline_services/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#error_code ⇒ Object
readonly
ErrorReport.
-
#error_description ⇒ Object
readonly
ErrorReport.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#order_status ⇒ Object
readonly
Returns the value of attribute order_status.
-
#order_status_flag ⇒ Object
readonly
postback.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#reference_id ⇒ Object
readonly
Returns the value of attribute reference_id.
-
#result_status ⇒ Object
readonly
postback.
-
#result_url ⇒ Object
readonly
postback.
-
#screening_results_media_type ⇒ Object
readonly
postback.
-
#screening_results_result_type ⇒ Object
readonly
postback.
-
#screening_results_type ⇒ Object
readonly
postback.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/blueline_services/response.rb', line 20 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 |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
18 19 20 |
# File 'lib/blueline_services/response.rb', line 18 def data @data end |
#error_code ⇒ Object (readonly)
ErrorReport
8 9 10 |
# File 'lib/blueline_services/response.rb', line 8 def error_code @error_code end |
#error_description ⇒ Object (readonly)
ErrorReport
8 9 10 |
# File 'lib/blueline_services/response.rb', line 8 def error_description @error_description end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def order_id @order_id end |
#order_status ⇒ Object (readonly)
Returns the value of attribute order_status.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def order_status @order_status end |
#order_status_flag ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def order_status_flag @order_status_flag end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def password @password end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def reference @reference end |
#reference_id ⇒ Object (readonly)
Returns the value of attribute reference_id.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def reference_id @reference_id end |
#result_status ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def result_status @result_status end |
#result_url ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def result_url @result_url end |
#screening_results_media_type ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def screening_results_media_type @screening_results_media_type end |
#screening_results_result_type ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def screening_results_result_type @screening_results_result_type end |
#screening_results_type ⇒ Object (readonly)
postback
11 12 13 |
# File 'lib/blueline_services/response.rb', line 11 def screening_results_type @screening_results_type end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/blueline_services/response.rb', line 4 def user_id @user_id end |