Class: BankAudi::Response
- Inherits:
-
Object
- Object
- BankAudi::Response
- Defined in:
- lib/bank_audi.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#secret_code ⇒ Object
readonly
Returns the value of attribute secret_code.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Response
constructor
A new instance of Response.
- #valid? ⇒ Boolean
- #vpc_secure_hash ⇒ Object
- #vpc_txn_response_code ⇒ Object
Constructor Details
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
74 75 76 |
# File 'lib/bank_audi.rb', line 74 def attributes @attributes end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
73 74 75 |
# File 'lib/bank_audi.rb', line 73 def errors @errors end |
#secret_code ⇒ Object (readonly)
Returns the value of attribute secret_code.
73 74 75 |
# File 'lib/bank_audi.rb', line 73 def secret_code @secret_code end |
Instance Method Details
#valid? ⇒ Boolean
84 85 86 87 |
# File 'lib/bank_audi.rb', line 84 def valid? @errors = {} valid_vpc_txn_response_code? && valid_vpc_secure_hash? end |
#vpc_secure_hash ⇒ Object
89 90 91 |
# File 'lib/bank_audi.rb', line 89 def vpc_secure_hash (@attributes[:vpc_secure_hash] || @attributes[:vpc_SecureHash]).upcase end |
#vpc_txn_response_code ⇒ Object
93 94 95 |
# File 'lib/bank_audi.rb', line 93 def vpc_txn_response_code @attributes[:vpc_txn_response_code] || @attributes[:vpc_TxnResponseCode] end |