Sha256: a4ca00e635f7f24ca73a9c75d47249562e9f41a703cda336cfb26d44c47612cf

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

module Braintree
  class SuccessfulResult
    include BaseModule

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

    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

5 entries across 5 versions & 1 rubygems

Version Path
braintree-2.49.0 lib/braintree/successful_result.rb
braintree-2.48.1 lib/braintree/successful_result.rb
braintree-2.48.0 lib/braintree/successful_result.rb
braintree-2.47.0 lib/braintree/successful_result.rb
braintree-2.46.0 lib/braintree/successful_result.rb