Class: Braintree::SuccessfulResult

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

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:


27
28
29
30
31
32
33
# File 'lib/braintree/successful_result.rb', line 27

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

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.


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

def address
  @address
end

#apple_pay_optionsObject (readonly)

Returns the value of attribute apple_pay_options.


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

def apple_pay_options
  @apple_pay_options
end

#credentialsObject (readonly)

Returns the value of attribute credentials.


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

def credentials
  @credentials
end

#credit_cardObject (readonly)

Returns the value of attribute credit_card.


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

def credit_card
  @credit_card
end

#credit_card_verificationObject (readonly)

Returns the value of attribute credit_card_verification.


25
26
27
# File 'lib/braintree/successful_result.rb', line 25

def credit_card_verification
  @credit_card_verification
end

#customerObject (readonly)

Returns the value of attribute customer.


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

def customer
  @customer
end

#disputesObject (readonly)

Returns the value of attribute disputes.


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

def disputes
  @disputes
end

#document_uploadObject (readonly)

Returns the value of attribute document_upload.


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

def document_upload
  @document_upload
end

#evidenceObject (readonly)

Returns the value of attribute evidence.


12
13
14
# File 'lib/braintree/successful_result.rb', line 12

def evidence
  @evidence
end

#merchantObject (readonly)

Returns the value of attribute merchant.


13
14
15
# File 'lib/braintree/successful_result.rb', line 13

def merchant
  @merchant
end

#merchant_accountObject (readonly)

Returns the value of attribute merchant_account.


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

def 
  @merchant_account
end

#merchant_accountsObject (readonly)

Returns the value of attribute merchant_accounts.


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

def merchant_accounts
  @merchant_accounts
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.


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

def payment_method
  @payment_method
end

#payment_method_nonceObject (readonly)

Returns the value of attribute payment_method_nonce.


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

def payment_method_nonce
  @payment_method_nonce
end

#paypal_accountObject (readonly)

Returns the value of attribute paypal_account.


18
19
20
# File 'lib/braintree/successful_result.rb', line 18

def 
  @paypal_account
end

#planObject (readonly)

Returns the value of attribute plan.


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

def plan
  @plan
end

#settlement_batch_summaryObject (readonly)

Returns the value of attribute settlement_batch_summary.


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

def settlement_batch_summary
  @settlement_batch_summary
end

#subscriptionObject (readonly)

Returns the value of attribute subscription.


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

def subscription
  @subscription
end

#supported_networksObject (readonly)

Returns the value of attribute supported_networks.


22
23
24
# File 'lib/braintree/successful_result.rb', line 22

def supported_networks
  @supported_networks
end

#transactionObject (readonly)

Returns the value of attribute transaction.


23
24
25
# File 'lib/braintree/successful_result.rb', line 23

def transaction
  @transaction
end

#us_bank_account_verificationObject (readonly)

Returns the value of attribute us_bank_account_verification.


24
25
26
# File 'lib/braintree/successful_result.rb', line 24

def 
  @us_bank_account_verification
end

Instance Method Details

#inspectObject

:nodoc:


35
36
37
38
# File 'lib/braintree/successful_result.rb', line 35

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

#success?Boolean

Returns:

  • (Boolean)

40
41
42
# File 'lib/braintree/successful_result.rb', line 40

def success?
  true
end