class Braintree::ValidationError
Attributes
attribute[R]
code[R]
message[R]
Public Class Methods
new(error_hash)
click to toggle source
# File lib/braintree/validation_error.rb, line 9 def initialize(error_hash) # parse GraphQL response objects if (error_hash[:extensions] && error_hash[:extensions][:errorClass] && error_hash[:extensions][:errorClass] == "VALIDATION") error_hash[:code] = error_hash[:extensions][:legacyCode].to_i error_hash[:attribute] = error_hash[:path].last end set_instance_variables_from_hash error_hash end