Sha256: 17acfc5d33a2c40b3e24cddf123d904f01abc8a9387583a9a59b88bf6a8b0bdf

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 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, :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

1 entries across 1 versions & 1 rubygems

Version Path
braintree-2.40.0 lib/braintree/successful_result.rb