Sha256: 0683310de7fb08ffe0e103a343dd554311f1f06935bbc3c3f8aea25dec48f7e5

Contents?: true

Size: 655 Bytes

Versions: 5

Compression:

Stored size: 655 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

    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.45.0 lib/braintree/successful_result.rb
braintree-2.44.0 lib/braintree/successful_result.rb
braintree-2.43.0 lib/braintree/successful_result.rb
braintree-2.42.0 lib/braintree/successful_result.rb
braintree-2.41.0 lib/braintree/successful_result.rb