Class: Braintree::SuccessfulResult

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/successful_result.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(attributes = {}) ⇒ SuccessfulResult

:nodoc:



8
9
10
11
12
13
# File 'lib/braintree/successful_result.rb', line 8

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

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def address
  @address
end

#credit_cardObject (readonly)

Returns the value of attribute credit_card



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def credit_card
  @credit_card
end

#customerObject (readonly)

Returns the value of attribute customer



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def customer
  @customer
end

#merchant_accountObject (readonly)

Returns the value of attribute merchant_account



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def 
  @merchant_account
end

#new_transactionObject (readonly)

Returns the value of attribute new_transaction



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def new_transaction
  @new_transaction
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def payment_method
  @payment_method
end

#settlement_batch_summaryObject (readonly)

Returns the value of attribute settlement_batch_summary



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def settlement_batch_summary
  @settlement_batch_summary
end

#subscriptionObject (readonly)

Returns the value of attribute subscription



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def subscription
  @subscription
end

#transactionObject (readonly)

Returns the value of attribute transaction



6
7
8
# File 'lib/braintree/successful_result.rb', line 6

def transaction
  @transaction
end

Instance Method Details

#inspectObject

:nodoc:



15
16
17
18
# File 'lib/braintree/successful_result.rb', line 15

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

#success?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/braintree/successful_result.rb', line 20

def success?
  true
end