Class: GreenByPhone::Response
- Inherits:
-
Object
- Object
- GreenByPhone::Response
- Defined in:
- lib/green_by_phone/response.rb
Instance Attribute Summary collapse
-
#check_id ⇒ Object
readonly
Returns the value of attribute check_id.
-
#check_number ⇒ Object
readonly
Returns the value of attribute check_number.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#result_description ⇒ Object
readonly
Returns the value of attribute result_description.
-
#verify_result ⇒ Object
readonly
Returns the value of attribute verify_result.
-
#verify_result_description ⇒ Object
readonly
Returns the value of attribute verify_result_description.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Response
Returns a new instance of Response.
17 18 19 20 21 22 23 24 |
# File 'lib/green_by_phone/response.rb', line 17 def initialize( = {}) @result = [:result] @result_description = [:result_escription] @verify_result = [:verify_result] @verify_result_description = [:verify_result_description] @check_number = [:check_number] @check_id = [:check_id] end |
Instance Attribute Details
#check_id ⇒ Object (readonly)
Returns the value of attribute check_id.
5 6 7 |
# File 'lib/green_by_phone/response.rb', line 5 def check_id @check_id end |
#check_number ⇒ Object (readonly)
Returns the value of attribute check_number.
5 6 7 |
# File 'lib/green_by_phone/response.rb', line 5 def check_number @check_number end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/green_by_phone/response.rb', line 3 def result @result end |
#result_description ⇒ Object (readonly)
Returns the value of attribute result_description.
3 4 5 |
# File 'lib/green_by_phone/response.rb', line 3 def result_description @result_description end |
#verify_result ⇒ Object (readonly)
Returns the value of attribute verify_result.
4 5 6 |
# File 'lib/green_by_phone/response.rb', line 4 def verify_result @verify_result end |
#verify_result_description ⇒ Object (readonly)
Returns the value of attribute verify_result_description.
4 5 6 |
# File 'lib/green_by_phone/response.rb', line 4 def verify_result_description @verify_result_description end |
Class Method Details
.new_from_request(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/green_by_phone/response.rb', line 7 def self.new_from_request( = {}) self.new( :result => ['Result'], :result_description => ['ResultDescription'], :verify_result => ['VerifyResult'], :verify_result_description => ['VerifyResultDescription'], :check_number => ['CheckNumber'], :check_id => ['Check_ID']) end |
Instance Method Details
#success? ⇒ Boolean
26 27 28 |
# File 'lib/green_by_phone/response.rb', line 26 def success? @result == 0 && @verification_result == 0 end |