Class: ActiveMerchant::Billing::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success, message, params = {}, options = {}) ⇒ Response

Returns a new instance of Response.



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/active_merchant/billing/response.rb', line 26

def initialize(success, message, params = {}, options = {})
  @success, @message, @params = success, message, params.stringify_keys
  @test = options[:test] || false        
  @authorization = options[:authorization]
  @fraud_review = options[:fraud_review]
  @avs_result = AVSResult.new(options[:avs_result]).to_hash
  @cvv_result = CVVResult.new(options[:cvv_result]).to_hash
  @three_d_secure = options[:three_d_secure]
  @pa_req = options[:pa_req]
  @md = options[:md]
  @acs_url = options[:acs_url]
end

Instance Attribute Details

#acs_urlObject (readonly)

Returns the value of attribute acs_url.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def acs_url
  @acs_url
end

#authorizationObject (readonly)

Returns the value of attribute authorization.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def authorization
  @authorization
end

#avs_resultObject (readonly)

Returns the value of attribute avs_result.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def avs_result
  @avs_result
end

#cvv_resultObject (readonly)

Returns the value of attribute cvv_result.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def cvv_result
  @cvv_result
end

#mdObject (readonly)

Returns the value of attribute md.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def md
  @md
end

#messageObject (readonly)

Returns the value of attribute message.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def message
  @message
end

#pa_reqObject (readonly)

Returns the value of attribute pa_req.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def pa_req
  @pa_req
end

#paramsObject (readonly)

Returns the value of attribute params.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def params
  @params
end

#testObject (readonly)

Returns the value of attribute test.



8
9
10
# File 'lib/active_merchant/billing/response.rb', line 8

def test
  @test
end

Instance Method Details

#fraud_review?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/active_merchant/billing/response.rb', line 18

def fraud_review?
  @fraud_review
end

#success?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/active_merchant/billing/response.rb', line 10

def success?
  @success
end

#test?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_merchant/billing/response.rb', line 14

def test?
  @test
end

#three_d_secure?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/active_merchant/billing/response.rb', line 22

def three_d_secure?
  @three_d_secure
end