Class: ThePlaidApi::ProtectIncidentEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::ProtectIncidentEvent
- Defined in:
- lib/the_plaid_api/models/protect_incident_event.rb
Overview
details about the incident event.
Instance Attribute Summary collapse
-
#access_token ⇒ String
An access token associated with the Item related to this incident.
-
#amount ⇒ ProtectIncidentAmount
The monetary amount associated with the incident.
-
#idv_session_id ⇒ String
A unique identifier for an Identity Verification session that may be associated with this incident.
-
#internal_reference ⇒ String
A unique ID representing the incident in your system.
-
#link_session_id ⇒ String
A unique identifier for a Link session that may be associated with this incident.
-
#protect_event_id ⇒ String
A globally unique identifier representing a Protect event that may be associated with this incident.
-
#signal_client_transaction_id ⇒ String
The unique ID used to refer to a Signal transaction evaluation that may be associated with this incident.
-
#time ⇒ DateTime
The timestamp when the incident occurred, in ISO 8601 format (e.g., ā2020-07-24T03:26:02Zā).
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(protect_event_id: SKIP, link_session_id: SKIP, idv_session_id: SKIP, signal_client_transaction_id: SKIP, internal_reference: SKIP, time: SKIP, amount: SKIP, access_token: SKIP, additional_properties: nil) ⇒ ProtectIncidentEvent
constructor
A new instance of ProtectIncidentEvent.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_time ⇒ Object
-
#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(protect_event_id: SKIP, link_session_id: SKIP, idv_session_id: SKIP, signal_client_transaction_id: SKIP, internal_reference: SKIP, time: SKIP, amount: SKIP, access_token: SKIP, additional_properties: nil) ⇒ ProtectIncidentEvent
Returns a new instance of ProtectIncidentEvent.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 94 def initialize(protect_event_id: SKIP, link_session_id: SKIP, idv_session_id: SKIP, signal_client_transaction_id: SKIP, internal_reference: SKIP, time: SKIP, amount: SKIP, access_token: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @protect_event_id = protect_event_id unless protect_event_id == SKIP @link_session_id = link_session_id unless link_session_id == SKIP @idv_session_id = idv_session_id unless idv_session_id == SKIP unless signal_client_transaction_id == SKIP @signal_client_transaction_id = signal_client_transaction_id end @internal_reference = internal_reference unless internal_reference == SKIP @time = time unless time == SKIP @amount = amount unless amount == SKIP @access_token = access_token unless access_token == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_token ⇒ String
An access token associated with the Item related to this incident.
50 51 52 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 50 def access_token @access_token end |
#amount ⇒ ProtectIncidentAmount
The monetary amount associated with the incident.
46 47 48 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 46 def amount @amount end |
#idv_session_id ⇒ String
A unique identifier for an Identity Verification session that may be associated with this incident.
26 27 28 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 26 def idv_session_id @idv_session_id end |
#internal_reference ⇒ String
A unique ID representing the incident in your system. Personally identifiable information, such as an email address or phone number, should not be used in this field.
37 38 39 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 37 def internal_reference @internal_reference end |
#link_session_id ⇒ String
A unique identifier for a Link session that may be associated with this incident.
21 22 23 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 21 def link_session_id @link_session_id end |
#protect_event_id ⇒ String
A globally unique identifier representing a Protect event that may be associated with this incident.
16 17 18 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 16 def protect_event_id @protect_event_id end |
#signal_client_transaction_id ⇒ String
The unique ID used to refer to a Signal transaction evaluation that may be associated with this incident.
31 32 33 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 31 def signal_client_transaction_id @signal_client_transaction_id end |
#time ⇒ DateTime
The timestamp when the incident occurred, in ISO 8601 format (e.g., ā2020-07-24T03:26:02Zā).
42 43 44 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 42 def time @time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 116 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. protect_event_id = hash.key?('protect_event_id') ? hash['protect_event_id'] : SKIP link_session_id = hash.key?('link_session_id') ? hash['link_session_id'] : SKIP idv_session_id = hash.key?('idv_session_id') ? hash['idv_session_id'] : SKIP signal_client_transaction_id = hash.key?('signal_client_transaction_id') ? hash['signal_client_transaction_id'] : SKIP internal_reference = hash.key?('internal_reference') ? hash['internal_reference'] : SKIP time = if hash.key?('time') (DateTimeHelper.from_rfc3339(hash['time']) if hash['time']) else SKIP end amount = ProtectIncidentAmount.from_hash(hash['amount']) if hash['amount'] access_token = hash.key?('access_token') ? hash['access_token'] : 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. ProtectIncidentEvent.new(protect_event_id: protect_event_id, link_session_id: link_session_id, idv_session_id: idv_session_id, signal_client_transaction_id: signal_client_transaction_id, internal_reference: internal_reference, time: time, amount: amount, access_token: access_token, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['protect_event_id'] = 'protect_event_id' @_hash['link_session_id'] = 'link_session_id' @_hash['idv_session_id'] = 'idv_session_id' @_hash['signal_client_transaction_id'] = 'signal_client_transaction_id' @_hash['internal_reference'] = 'internal_reference' @_hash['time'] = 'time' @_hash['amount'] = 'amount' @_hash['access_token'] = 'access_token' @_hash end |
.nullables ⇒ Object
An array for nullable fields
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 81 def self.nullables %w[ protect_event_id link_session_id idv_session_id signal_client_transaction_id internal_reference time amount access_token ] end |
.optionals ⇒ Object
An array for optional fields
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 67 def self.optionals %w[ protect_event_id link_session_id idv_session_id signal_client_transaction_id internal_reference time amount access_token ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
172 173 174 175 176 177 178 179 180 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 172 def inspect class_name = self.class.name.split('::').last "<#{class_name} protect_event_id: #{@protect_event_id.inspect}, link_session_id:"\ " #{@link_session_id.inspect}, idv_session_id: #{@idv_session_id.inspect},"\ " signal_client_transaction_id: #{@signal_client_transaction_id.inspect},"\ " internal_reference: #{@internal_reference.inspect}, time: #{@time.inspect}, amount:"\ " #{@amount.inspect}, access_token: #{@access_token.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_time ⇒ Object
157 158 159 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 157 def to_custom_time DateTimeHelper.to_rfc3339(time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
162 163 164 165 166 167 168 169 |
# File 'lib/the_plaid_api/models/protect_incident_event.rb', line 162 def to_s class_name = self.class.name.split('::').last "<#{class_name} protect_event_id: #{@protect_event_id}, link_session_id:"\ " #{@link_session_id}, idv_session_id: #{@idv_session_id}, signal_client_transaction_id:"\ " #{@signal_client_transaction_id}, internal_reference: #{@internal_reference}, time:"\ " #{@time}, amount: #{@amount}, access_token: #{@access_token}, additional_properties:"\ " #{@additional_properties}>" end |