Sha256: 1d48f47ad2543b85198cdc15b6cbd9282bc6488b7547896fd2237c0e240762a6

Contents?: true

Size: 544 Bytes

Versions: 13

Compression:

Stored size: 544 Bytes

Contents

module ActiveMerchant
  module Fulfillment
    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

13 entries across 13 versions & 1 rubygems

Version Path
active_fulfillment-2.1.9 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.8 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.7 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.6 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.5 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.4 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.3 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.2 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.1 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.1.0 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.0.2 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.0.1 lib/active_fulfillment/fulfillment/response.rb
active_fulfillment-2.0.0 lib/active_fulfillment/fulfillment/response.rb