Class: ThePlaidApi::RecaptchaRequiredError
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::RecaptchaRequiredError
- Defined in:
- lib/the_plaid_api/models/recaptcha_required_error.rb
Overview
The request was flagged by Plaid’s fraud system, and requires additional verification to ensure they are not a bot.
Instance Attribute Summary collapse
-
#common_causes ⇒ String
Plaid’s fraud system detects abusive traffic and considers a variety of parameters throughout Item creation requests.
-
#display_message ⇒ String
‘RECAPTCHA_REQUIRED`.
-
#error_code ⇒ String
‘RECAPTCHA_REQUIRED`.
-
#error_type ⇒ String
‘RECAPTCHA_ERROR`.
-
#http_code ⇒ String
400.
-
#link_user_experience ⇒ String
Your user will be prompted to solve a Google reCAPTCHA challenge in the Link Recaptcha pane.
-
#troubleshooting_steps ⇒ String
Link will automatically guide your user through reCAPTCHA verification.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(error_type:, error_code:, display_message:, http_code:, link_user_experience:, common_causes:, troubleshooting_steps:, additional_properties: nil) ⇒ RecaptchaRequiredError
constructor
A new instance of RecaptchaRequiredError.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(error_type:, error_code:, display_message:, http_code:, link_user_experience:, common_causes:, troubleshooting_steps:, additional_properties: nil) ⇒ RecaptchaRequiredError
Returns a new instance of RecaptchaRequiredError.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 74 def initialize(error_type:, error_code:, display_message:, http_code:, link_user_experience:, common_causes:, troubleshooting_steps:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @error_type = error_type @error_code = error_code @display_message = @http_code = http_code @link_user_experience = link_user_experience @common_causes = common_causes @troubleshooting_steps = troubleshooting_steps @additional_properties = additional_properties end |
Instance Attribute Details
#common_causes ⇒ String
Plaid’s fraud system detects abusive traffic and considers a variety of parameters throughout Item creation requests. When a request is considered risky or possibly fraudulent, Link presents a reCAPTCHA for the user to solve.
41 42 43 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 41 def common_causes @common_causes end |
#display_message ⇒ String
‘RECAPTCHA_REQUIRED`
23 24 25 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 23 def @display_message end |
#error_code ⇒ String
‘RECAPTCHA_REQUIRED`
19 20 21 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 19 def error_code @error_code end |
#error_type ⇒ String
‘RECAPTCHA_ERROR`
15 16 17 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 15 def error_type @error_type end |
#http_code ⇒ String
400
27 28 29 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 27 def http_code @http_code end |
#link_user_experience ⇒ String
Your user will be prompted to solve a Google reCAPTCHA challenge in the Link Recaptcha pane. If they solve the challenge successfully, the user’s request is resubmitted and they are directed to the next Item creation step.
34 35 36 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 34 def link_user_experience @link_user_experience end |
#troubleshooting_steps ⇒ String
Link will automatically guide your user through reCAPTCHA verification. As a general rule, we recommend instrumenting basic fraud monitoring to detect and protect your website from spam and abuse. If your user cannot verify their session, please submit a Support ticket with the following identifiers: ‘link_session_id` or `request_id`
49 50 51 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 49 def troubleshooting_steps @troubleshooting_steps end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. error_type = hash.key?('error_type') ? hash['error_type'] : nil error_code = hash.key?('error_code') ? hash['error_code'] : nil = hash.key?('display_message') ? hash['display_message'] : nil http_code = hash.key?('http_code') ? hash['http_code'] : nil link_user_experience = hash.key?('link_user_experience') ? hash['link_user_experience'] : nil common_causes = hash.key?('common_causes') ? hash['common_causes'] : nil troubleshooting_steps = hash.key?('troubleshooting_steps') ? hash['troubleshooting_steps'] : nil # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. RecaptchaRequiredError.new(error_type: error_type, error_code: error_code, display_message: , http_code: http_code, link_user_experience: link_user_experience, common_causes: common_causes, troubleshooting_steps: troubleshooting_steps, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['error_type'] = 'error_type' @_hash['error_code'] = 'error_code' @_hash['display_message'] = 'display_message' @_hash['http_code'] = 'http_code' @_hash['link_user_experience'] = 'link_user_experience' @_hash['common_causes'] = 'common_causes' @_hash['troubleshooting_steps'] = 'troubleshooting_steps' @_hash end |
.nullables ⇒ Object
An array for nullable fields
70 71 72 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 70 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
65 66 67 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 65 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
134 135 136 137 138 139 140 141 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 134 def inspect class_name = self.class.name.split('::').last "<#{class_name} error_type: #{@error_type.inspect}, error_code: #{@error_code.inspect},"\ " display_message: #{@display_message.inspect}, http_code: #{@http_code.inspect},"\ " link_user_experience: #{@link_user_experience.inspect}, common_causes:"\ " #{@common_causes.inspect}, troubleshooting_steps: #{@troubleshooting_steps.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
125 126 127 128 129 130 131 |
# File 'lib/the_plaid_api/models/recaptcha_required_error.rb', line 125 def to_s class_name = self.class.name.split('::').last "<#{class_name} error_type: #{@error_type}, error_code: #{@error_code}, display_message:"\ " #{@display_message}, http_code: #{@http_code}, link_user_experience:"\ " #{@link_user_experience}, common_causes: #{@common_causes}, troubleshooting_steps:"\ " #{@troubleshooting_steps}, additional_properties: #{@additional_properties}>" end |