Class: ActiveMerchant::Billing::FirstData::Response
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::FirstData::Response
- Defined in:
- lib/active_merchant/billing/first_data/response.rb
Instance Method Summary collapse
-
#initialize(response_parameters) ⇒ Response
constructor
A new instance of Response.
- #ok? ⇒ Boolean
- #parameters ⇒ Object
- #recc_pmnt_expiry ⇒ Object
- #recc_pmnt_id ⇒ Object
- #recurring? ⇒ Boolean
- #result ⇒ Object
- #result_code ⇒ Object
- #result_text ⇒ Object
- #three_dee_secure ⇒ Object
- #transaction_id ⇒ Object
Constructor Details
#initialize(response_parameters) ⇒ Response
Returns a new instance of Response.
6 7 8 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 6 def initialize response_parameters self.parameters=response_parameters end |
Instance Method Details
#ok? ⇒ Boolean
10 11 12 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 10 def ok? result == "OK" end |
#parameters ⇒ Object
46 47 48 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 46 def parameters @parameters end |
#recc_pmnt_expiry ⇒ Object
34 35 36 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 34 def recc_pmnt_expiry @parameters[:recc_pmnt_expiry] end |
#recc_pmnt_id ⇒ Object
30 31 32 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 30 def recc_pmnt_id @parameters[:recc_pmnt_id] end |
#recurring? ⇒ Boolean
14 15 16 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 14 def recurring? recc_pmnt_id.present? && recc_pmnt_expiry.present? end |
#result ⇒ Object
18 19 20 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 18 def result @parameters[:result] end |
#result_code ⇒ Object
26 27 28 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 26 def result_code @parameters[:result_code] end |
#result_text ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 42 def result_text FDL_RESPONSE_CODES["c#{result_code}".to_sym] end |
#three_dee_secure ⇒ Object
38 39 40 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 38 def three_dee_secure @parameters[:'3dsecure'] end |
#transaction_id ⇒ Object
22 23 24 |
# File 'lib/active_merchant/billing/first_data/response.rb', line 22 def transaction_id @parameters[:transaction_id] end |