Sha256: 04fe300d4e97a01bb6ac277db5de5976e3415d5e73e0d20b671f55c9d081f84d

Contents?: true

Size: 619 Bytes

Versions: 5

Compression:

Stored size: 619 Bytes

Contents

module ActiveMerchant
  module Fulfillment
  
    class Error < StandardError
    end
  
    class Response
      attr_reader :params
      attr_reader :message
      attr_reader :test
    
      def success?
        @success
      end

      def test?
        @test
      end
        
      def initialize(success, message, params = {}, options = {})
        @success, @message, @params = success, message, params.stringify_keys
        @test = options[:test] || false        
      end
      
      private
      def method_missing(method, *args)
        @params[method.to_s] || super
      end
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_fulfillment-1.0.3 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-1.0.2 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-1.0.1 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-1.0.0 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-0.10.0 lib/active_fulfillment/fulfillment/response.rb