Sha256: ff6da796c925b48e0244855f3ef95340035bd04f8160701ddb2a6c562e552aae

Contents?: true

Size: 832 Bytes

Versions: 2

Compression:

Stored size: 832 Bytes

Contents

module AbtainBilling #:nodoc:
  module Billing #:nodoc:
  
    class Error < AbtainBillingError #:nodoc:
    end
  
    class Response
      attr_reader :params, :message, :test, :authorization, :avs_result, :cvv_result
      
      def success?
        @success
      end

      def test?
        @test
      end
      
      def fraud_review?
        @fraud_review
      end
      
      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
abtain_billing-1.03 lib/abtain_billing/billing/response.rb
abtain_billing-1.02 lib/abtain_billing/billing/response.rb