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

Returns a new instance of SuccessfulResult.



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

def initialize(attributes = {})
  @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.



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

def credit_card_verification
  @credit_card_verification
end

#customerObject (readonly)

Returns the value of attribute customer.



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

def customer
  @customer
end

#disputesObject (readonly)

Returns the value of attribute disputes.



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

def disputes
  @disputes
end

#document_uploadObject (readonly)

Returns the value of attribute document_upload.



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

def document_upload
  @document_upload
end

#evidenceObject (readonly)

Returns the value of attribute evidence.



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

def evidence
  @evidence
end

#exchange_rate_quote_payloadObject (readonly)

Returns the value of attribute exchange_rate_quote_payload.



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

def exchange_rate_quote_payload
  @exchange_rate_quote_payload
end

#merchantObject (readonly)

Returns the value of attribute merchant.



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

def merchant
  @merchant
end

#merchant_accountObject (readonly)

Returns the value of attribute merchant_account.



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

def 
  @merchant_account
end

#merchant_accountsObject (readonly)

Returns the value of attribute merchant_accounts.



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

def merchant_accounts
  @merchant_accounts
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.



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

def payment_method
  @payment_method
end

#payment_method_nonceObject (readonly)

Returns the value of attribute payment_method_nonce.



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

def payment_method_nonce
  @payment_method_nonce
end

#paypal_accountObject (readonly)

Returns the value of attribute paypal_account.



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

def 
  @paypal_account
end

#planObject (readonly)

Returns the value of attribute plan.



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

def plan
  @plan
end

#settlement_batch_summaryObject (readonly)

Returns the value of attribute settlement_batch_summary.



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

def settlement_batch_summary
  @settlement_batch_summary
end

#subscriptionObject (readonly)

Returns the value of attribute subscription.



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

def subscription
  @subscription
end

#supported_networksObject (readonly)

Returns the value of attribute supported_networks.



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

def supported_networks
  @supported_networks
end

#transactionObject (readonly)

Returns the value of attribute transaction.



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

def transaction
  @transaction
end

#us_bank_account_verificationObject (readonly)

Returns the value of attribute us_bank_account_verification.



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

def 
  @us_bank_account_verification
end

Instance Method Details

#inspectObject



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

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

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  true
end