Class: ThePlaidApi::ItemHandleFraudReportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ItemHandleFraudReportRequest
- Defined in:
- lib/the_plaid_api/models/item_handle_fraud_report_request.rb
Overview
Request object for ‘/item/handle_fraud_report`. Must provide either `user_id` or at least one of the following identifiers in `incident_event`: `link_session_id`, `idv_session_id`, `protect_event_id`, or `signal_client_transaction_id`.
Instance Attribute Summary collapse
-
#access_token ⇒ String
The access token associated with the Item data is being requested for.
-
#ach_return_code ⇒ String
Must be a valid ACH return code (e.g. ‘R01`), required if `report_type` is `ACH_RETURN`.
-
#bank_account ⇒ ProtectBankAccount
Bank account information associated with the incident.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#incident_event ⇒ ProtectIncidentEvent
details about the incident event.
-
#notes ⇒ String
Additional context or details about the report, required if ‘report_type` is `OTHER`.
-
#report_confidence ⇒ ProtectReportConfidence
The confidence level of the incident report.
-
#report_source ⇒ ProtectReportSource
The source that identified or reported the incident.
-
#report_type ⇒ ProtectReportType
The type of incident being reported.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#user_id ⇒ String
The Plaid User ID associated with the report.
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(access_token:, report_confidence:, report_type:, report_source:, client_id: SKIP, secret: SKIP, user_id: SKIP, incident_event: SKIP, bank_account: SKIP, ach_return_code: SKIP, notes: SKIP, additional_properties: nil) ⇒ ItemHandleFraudReportRequest
constructor
A new instance of ItemHandleFraudReportRequest.
-
#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(access_token:, report_confidence:, report_type:, report_source:, client_id: SKIP, secret: SKIP, user_id: SKIP, incident_event: SKIP, bank_account: SKIP, ach_return_code: SKIP, notes: SKIP, additional_properties: nil) ⇒ ItemHandleFraudReportRequest
Returns a new instance of ItemHandleFraudReportRequest.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 163 def initialize(access_token:, report_confidence:, report_type:, report_source:, client_id: SKIP, secret: SKIP, user_id: SKIP, incident_event: SKIP, bank_account: SKIP, ach_return_code: SKIP, notes: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @access_token = access_token @user_id = user_id unless user_id == SKIP @incident_event = incident_event unless incident_event == SKIP @report_confidence = report_confidence @report_type = report_type @report_source = report_source @bank_account = bank_account unless bank_account == SKIP @ach_return_code = ach_return_code unless ach_return_code == SKIP @notes = notes unless notes == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_token ⇒ String
The access token associated with the Item data is being requested for.
28 29 30 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 28 def access_token @access_token end |
#ach_return_code ⇒ String
Must be a valid ACH return code (e.g. ‘R01`), required if `report_type` is `ACH_RETURN`.
115 116 117 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 115 def ach_return_code @ach_return_code end |
#bank_account ⇒ ProtectBankAccount
Bank account information associated with the incident.
110 111 112 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 110 def bank_account @bank_account end |
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
19 20 21 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 19 def client_id @client_id end |
#incident_event ⇒ ProtectIncidentEvent
details about the incident event.
36 37 38 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 36 def incident_event @incident_event end |
#notes ⇒ String
Additional context or details about the report, required if ‘report_type` is `OTHER`.
120 121 122 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 120 def notes @notes end |
#report_confidence ⇒ ProtectReportConfidence
The confidence level of the incident report. ‘CONFIRMED` indicates the incident has been verified and definitively occurred. `SUSPECTED` indicates the incident is believed to have occurred but has not been fully verified.
44 45 46 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 44 def report_confidence @report_confidence end |
#report_source ⇒ ProtectReportSource
The source that identified or reported the incident. ‘INTERNAL_REVIEW` - Incident was identified through internal fraud investigations or review processes. `USER_SELF_REPORTED` - Incident was reported directly by the affected user. `BANK_FEEDBACK` - Incident was identified through bank feedback, including ACH returns and connection revocations. `NETWORK_FEEDBACK` - Incident was identified through card network alerts or chargebacks. `AUTOMATED_SYSTEM` - Incident was detected by automated systems such as fraud models or rule engines. `THIRD_PARTY_ALERT` - Incident was identified through external vendor or consortium alerts. `OTHER` - Incident was identified through a source not covered by other categories.
106 107 108 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 106 def report_source @report_source end |
#report_type ⇒ ProtectReportType
The type of incident being reported. ‘USER_ACCOUNT_TAKEOVER` - Indicates that a legitimate user’s account was accessed or controlled by an unauthorized party. ‘FALSE_IDENTITY` - Indicates that a user created an account using stolen or fabricated identity information. `STOLEN_IDENTITY` - Indicates that a user created an account using identity information belonging to a real individual without their consent. `SYNTHETIC_IDENTITY` - Indicates that a user created an account using a fake or partially fabricated identity (e.g., combining real and fake information to form a new persona). `MULTIPLE_USER_ACCOUNTS` - Indicates that the same individual is operating multiple accounts in violation of policy. `SCAM_VICTIM` - Indicates that the user was tricked into authorizing or sending funds as part of a scam. `BANK_ACCOUNT_TAKEOVER` - Indicates that a user’s linked bank account was accessed or misused by an unauthorized party. ‘BANK_CONNECTION_REVOKED` - Indicates that a linked bank account connection was revoked by the financial institution, often due to suspected misuse, fraud, or security concerns. `CARD_TESTING` - Indicates that a card was used in small or repeated transactions to test its validity. `UNAUTHORIZED_TRANSACTION` - Indicates that a transaction was made without the user’s consent or authorization. ‘CARD_CHARGEBACK` - Indicates that a card transaction was reversed via a chargeback claim. `ACH_RETURN` - Indicates that an ACH transaction was returned or reversed by the bank. `DISPUTE` - Indicates that a user filed a dispute regarding a transaction or account activity. `FIRST_PARTY_FRAUD` - Indicates that a user intentionally misrepresented themselves or their actions for financial gain. `MISSED_PAYMENT` - Indicates that a user failed to make a required payment on time. `LOAN_STACKING` - Indicates that a user applied for or took out multiple loans simultaneously beyond their ability to repay. `MONEY_LAUNDERING` - Indicates that funds are being moved through accounts to obscure their illicit origin. `NO_FRAUD` - Indicates that an investigation determined no fraudulent activity occurred on user/event (positive label) `OTHER` - Indicates that the case involves fraud or financial risk not covered by other report types. Requires notes describing the report.
88 89 90 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 88 def report_type @report_type end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
24 25 26 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 24 def secret @secret end |
#user_id ⇒ String
The Plaid User ID associated with the report.
32 33 34 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 32 def user_id @user_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 186 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_token = hash.key?('access_token') ? hash['access_token'] : nil report_confidence = hash.key?('report_confidence') ? hash['report_confidence'] : nil report_type = hash.key?('report_type') ? hash['report_type'] : nil report_source = hash.key?('report_source') ? hash['report_source'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP user_id = hash.key?('user_id') ? hash['user_id'] : SKIP incident_event = ProtectIncidentEvent.from_hash(hash['incident_event']) if hash['incident_event'] bank_account = ProtectBankAccount.from_hash(hash['bank_account']) if hash['bank_account'] ach_return_code = hash.key?('ach_return_code') ? hash['ach_return_code'] : SKIP notes = hash.key?('notes') ? hash['notes'] : SKIP # 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. ItemHandleFraudReportRequest.new(access_token: access_token, report_confidence: report_confidence, report_type: report_type, report_source: report_source, client_id: client_id, secret: secret, user_id: user_id, incident_event: incident_event, bank_account: bank_account, ach_return_code: ach_return_code, notes: notes, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 123 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['access_token'] = 'access_token' @_hash['user_id'] = 'user_id' @_hash['incident_event'] = 'incident_event' @_hash['report_confidence'] = 'report_confidence' @_hash['report_type'] = 'report_type' @_hash['report_source'] = 'report_source' @_hash['bank_account'] = 'bank_account' @_hash['ach_return_code'] = 'ach_return_code' @_hash['notes'] = 'notes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
153 154 155 156 157 158 159 160 161 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 153 def self.nullables %w[ user_id incident_event bank_account ach_return_code notes ] end |
.optionals ⇒ Object
An array for optional fields
140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 140 def self.optionals %w[ client_id secret user_id incident_event bank_account ach_return_code notes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
238 239 240 241 242 243 244 245 246 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 238 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect}, access_token:"\ " #{@access_token.inspect}, user_id: #{@user_id.inspect}, incident_event:"\ " #{@incident_event.inspect}, report_confidence: #{@report_confidence.inspect}, report_type:"\ " #{@report_type.inspect}, report_source: #{@report_source.inspect}, bank_account:"\ " #{@bank_account.inspect}, ach_return_code: #{@ach_return_code.inspect}, notes:"\ " #{@notes.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
228 229 230 231 232 233 234 235 |
# File 'lib/the_plaid_api/models/item_handle_fraud_report_request.rb', line 228 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, access_token:"\ " #{@access_token}, user_id: #{@user_id}, incident_event: #{@incident_event},"\ " report_confidence: #{@report_confidence}, report_type: #{@report_type}, report_source:"\ " #{@report_source}, bank_account: #{@bank_account}, ach_return_code: #{@ach_return_code},"\ " notes: #{@notes}, additional_properties: #{@additional_properties}>" end |