Class: MerbMerchant::Billing::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_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.



22
23
24
25
26
27
28
29
# File 'lib/merb_merchant/billing/response.rb', line 22

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
end

Instance Attribute Details

#authorizationObject (readonly)

Returns the value of attribute authorization.



8
9
10
# File 'lib/merb_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/merb_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/merb_merchant/billing/response.rb', line 8

def cvv_result
  @cvv_result
end

#messageObject (readonly)

Returns the value of attribute message.



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

def message
  @message
end

#paramsObject (readonly)

Returns the value of attribute params.



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

def params
  @params
end

#testObject (readonly)

Returns the value of attribute test.



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

def test
  @test
end

Instance Method Details

#fraud_review?Boolean

Returns:

  • (Boolean)


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

def fraud_review?
  @fraud_review
end

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  @success
end

#test?Boolean

Returns:

  • (Boolean)


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

def test?
  @test
end