Class: ActiveMerchant::Billing::Response
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::Response
- Defined in:
- lib/active_merchant/billing/response.rb
Direct Known Subclasses
BeanstreamInteracResponse, EwayManagedGateway::EwayResponse, EwayRapidGateway::EwayRapidResponse, IdealResponse, MultiResponse, OgoneResponse, PayflowExpressResponse, PayflowResponse, PaymentExpressResponse, PaypalExpressResponse, PaystationResponse
Instance Attribute Summary collapse
-
#authorization ⇒ Object
readonly
Returns the value of attribute authorization.
-
#avs_result ⇒ Object
readonly
Returns the value of attribute avs_result.
-
#cvv_result ⇒ Object
readonly
Returns the value of attribute cvv_result.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
- #fraud_review? ⇒ Boolean
-
#initialize(success, message, params = {}, options = {}) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
- #test? ⇒ Boolean
Constructor Details
#initialize(success, message, params = {}, options = {}) ⇒ Response
Returns a new instance of Response.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/active_merchant/billing/response.rb', line 21 def initialize(success, , params = {}, = {}) @success, @message, @params = success, , params.stringify_keys @test = [:test] || false @authorization = [:authorization] @fraud_review = [:fraud_review] @avs_result = if [:avs_result].kind_of?(AVSResult) [:avs_result].to_hash else AVSResult.new([:avs_result]).to_hash end @cvv_result = if [:cvv_result].kind_of?(CVVResult) [:cvv_result].to_hash else CVVResult.new([:cvv_result]).to_hash end end |
Instance Attribute Details
#authorization ⇒ Object (readonly)
Returns the value of attribute authorization.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def @authorization end |
#avs_result ⇒ Object (readonly)
Returns the value of attribute avs_result.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def avs_result @avs_result end |
#cvv_result ⇒ Object (readonly)
Returns the value of attribute cvv_result.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def cvv_result @cvv_result end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def @message end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def params @params end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def test @test end |
Instance Method Details
#fraud_review? ⇒ Boolean
17 18 19 |
# File 'lib/active_merchant/billing/response.rb', line 17 def fraud_review? @fraud_review end |
#success? ⇒ Boolean
9 10 11 |
# File 'lib/active_merchant/billing/response.rb', line 9 def success? @success end |
#test? ⇒ Boolean
13 14 15 |
# File 'lib/active_merchant/billing/response.rb', line 13 def test? @test end |