Class: Braintree::ErrorResult
- Inherits:
-
Object
- Object
- Braintree::ErrorResult
- Defined in:
- lib/braintree/error_result.rb
Overview
Instance Attribute Summary (collapse)
-
- (Object) credit_card_verification
readonly
Returns the value of attribute credit_card_verification.
-
- (Object) errors
readonly
Returns the value of attribute errors.
-
- (Object) message
readonly
Returns the value of attribute message.
-
- (Object) params
readonly
Returns the value of attribute params.
-
- (Object) subscription
readonly
Returns the value of attribute subscription.
-
- (Object) transaction
readonly
Returns the value of attribute transaction.
Instance Method Summary (collapse)
-
- (ErrorResult) initialize(gateway, data)
constructor
:nodoc:.
-
- (Object) inspect
:nodoc:.
-
- (Boolean) success?
Always returns false.
Constructor Details
- (ErrorResult) initialize(gateway, data)
:nodoc:
7 8 9 10 11 12 13 14 15 |
# File 'lib/braintree/error_result.rb', line 7 def initialize(gateway, data) # :nodoc: @gateway = gateway @params = data[:params] @credit_card_verification = CreditCardVerification._new(data[:verification]) if data[:verification] @message = data[:message] @transaction = Transaction._new(gateway, data[:transaction]) if data[:transaction] @subscription = Subscription._new(gateway, data[:subscription]) if data[:subscription] @errors = Errors.new(data[:errors]) end |
Instance Attribute Details
- (Object) credit_card_verification (readonly)
Returns the value of attribute credit_card_verification
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def credit_card_verification @credit_card_verification end |
- (Object) errors (readonly)
Returns the value of attribute errors
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def errors @errors end |
- (Object) message (readonly)
Returns the value of attribute message
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def @message end |
- (Object) params (readonly)
Returns the value of attribute params
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def params @params end |
- (Object) subscription (readonly)
Returns the value of attribute subscription
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def subscription @subscription end |
- (Object) transaction (readonly)
Returns the value of attribute transaction
5 6 7 |
# File 'lib/braintree/error_result.rb', line 5 def transaction @transaction end |
Instance Method Details
- (Object) inspect
:nodoc:
17 18 19 20 21 22 23 24 25 |
# File 'lib/braintree/error_result.rb', line 17 def inspect # :nodoc: if @credit_card_verification verification_inspect = " credit_card_verification: #{@credit_card_verification.inspect}" end if @transaction transaction_inspect = " transaction: #{@transaction.inspect}" end "#<#{self.class} params:{...} errors:<#{@errors._inner_inspect}>#{verification_inspect}#{transaction_inspect}>" end |
- (Boolean) success?
Always returns false.
28 29 30 |
# File 'lib/braintree/error_result.rb', line 28 def success? false end |