lib/braintree/error_result.rb in braintree-1.0.1 vs lib/braintree/error_result.rb in braintree-1.1.0

- old
+ new

@@ -1,6 +1,6 @@ -module Braintree +module Braintree # An ErrorResult will be returned from non-bang methods when # validations fail. It will provide access to the params passed # to the server. The params are primarily useful for re-populaing # web forms when using transparent redirect. ErrorResult also # provides access to the validation errors. @@ -14,13 +14,13 @@ # result.errors.for(:customer).each do |error| # puts error.message # end # end class ErrorResult - - attr_reader :credit_card_verification, :errors, :params - + + attr_reader :credit_card_verification, :errors, :params + def initialize(data) # :nodoc: @params = data[:params] if data[:verification] @credit_card_verification = CreditCardVerification._new(data[:verification]) end @@ -28,10 +28,10 @@ end def inspect # :nodoc: "#<#{self.class} params:{...} errors:<#{@errors._inner_inspect}>>" end - + # Always returns false. def success? false end end