Sha256: 27e24e52cbe21cf7cfb9d756405b919d90c48a29754e5bcfb922d57891b5aed2

Contents?: true

Size: 706 Bytes

Versions: 10

Compression:

Stored size: 706 Bytes

Contents

module Braintree
  # See http://www.braintreepayments.com/docs/ruby/general/result_objects
  class SuccessfulResult
    include BaseModule

    attr_reader :address, :credit_card, :customer, :merchant_account, :payment_method, :settlement_batch_summary, :subscription, :new_transaction, :transaction

    def initialize(attributes = {}) # :nodoc:
      @attrs = attributes.keys
      attributes.each do |key, value|
        instance_variable_set("@#{key}", value)
      end
    end

    def inspect # :nodoc:
      inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" }
      "#<#{self.class} #{inspected_attributes.join(" ")}>"
    end

    def success?
      true
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
braintree-2.39.0 lib/braintree/successful_result.rb
braintree-2.38.0 lib/braintree/successful_result.rb
braintree-2.37.0 lib/braintree/successful_result.rb
braintree-2.36.0 lib/braintree/successful_result.rb
braintree-2.35.0 lib/braintree/successful_result.rb
braintree-2.34.1 lib/braintree/successful_result.rb
braintree-2.34.0 lib/braintree/successful_result.rb
braintree-2.33.1 lib/braintree/successful_result.rb
braintree-2.33.0 lib/braintree/successful_result.rb
braintree-2.32.1 lib/braintree/successful_result.rb