Class: ActiveMerchant::Billing::Response
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::Response
- Defined in:
- lib/active_merchant/billing/response.rb
Direct Known Subclasses
BeanstreamInteracResponse, EwayManagedGateway::EwayResponse, 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.
-
#emv_authorization ⇒ Object
readonly
Returns the value of attribute emv_authorization.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#network_transaction_id ⇒ Object
readonly
Returns the value of attribute network_transaction_id.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#request_body ⇒ Object
readonly
Returns the value of attribute request_body.
-
#request_endpoint ⇒ Object
readonly
Returns the value of attribute request_endpoint.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#request_method ⇒ Object
readonly
Returns the value of attribute request_method.
-
#response_http_code ⇒ Object
readonly
Returns the value of attribute response_http_code.
-
#response_type ⇒ Object
readonly
Returns the value of attribute response_type.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
- #failure? ⇒ Boolean
- #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
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/active_merchant/billing/response.rb', line 28 def initialize(success, , params = {}, = {}) @success, , @params = success, , params.stringify_keys @test = [:test] || false = [:authorization] @fraud_review = [:fraud_review] @error_code = [:error_code] = [:emv_authorization] @network_transaction_id = [:network_transaction_id] @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 @response_type = [:response_type] @response_http_code = [:response_http_code] @request_endpoint = [:request_endpoint] @request_method = [:request_method] @request_body = [:request_body] @request_id = [:request_id] 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 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 |
#emv_authorization ⇒ Object (readonly)
Returns the value of attribute emv_authorization.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def error_code @error_code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def end |
#network_transaction_id ⇒ Object (readonly)
Returns the value of attribute network_transaction_id.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def network_transaction_id @network_transaction_id 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 |
#request_body ⇒ Object (readonly)
Returns the value of attribute request_body.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def request_body @request_body end |
#request_endpoint ⇒ Object (readonly)
Returns the value of attribute request_endpoint.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def request_endpoint @request_endpoint end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def request_id @request_id end |
#request_method ⇒ Object (readonly)
Returns the value of attribute request_method.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def request_method @request_method end |
#response_http_code ⇒ Object (readonly)
Returns the value of attribute response_http_code.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def response_http_code @response_http_code end |
#response_type ⇒ Object (readonly)
Returns the value of attribute response_type.
7 8 9 |
# File 'lib/active_merchant/billing/response.rb', line 7 def response_type @response_type 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
#failure? ⇒ Boolean
16 17 18 |
# File 'lib/active_merchant/billing/response.rb', line 16 def failure? !success? end |
#fraud_review? ⇒ Boolean
24 25 26 |
# File 'lib/active_merchant/billing/response.rb', line 24 def fraud_review? @fraud_review end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/active_merchant/billing/response.rb', line 12 def success? @success end |
#test? ⇒ Boolean
20 21 22 |
# File 'lib/active_merchant/billing/response.rb', line 20 def test? @test end |