Class: FdxV660Api::SuspectedFraudIncidentEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::SuspectedFraudIncidentEntity
- Defined in:
- lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb
Overview
Notification of suspected fraud
Instance Attribute Summary collapse
-
#fi_attributes ⇒ Array[FiAttributeEntity]
Array of financial institution-specific attributes.
-
#reason ⇒ String
Free text justification for suspecting fraud.
-
#reporter ⇒ PartyEntity4
Identity of the party responsible for identifying and reporting the suspected fraud.
-
#suspected_incident_id ⇒ String
Unique identifier for the suspected fraud incident.
-
#type ⇒ String
Extensible string enum identifying the type of suspected fraud.
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(type: SKIP, suspected_incident_id: SKIP, reason: SKIP, fi_attributes: SKIP, reporter: SKIP, additional_properties: nil) ⇒ SuspectedFraudIncidentEntity
constructor
A new instance of SuspectedFraudIncidentEntity.
-
#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(type: SKIP, suspected_incident_id: SKIP, reason: SKIP, fi_attributes: SKIP, reporter: SKIP, additional_properties: nil) ⇒ SuspectedFraudIncidentEntity
Returns a new instance of SuspectedFraudIncidentEntity.
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 65 def initialize(type: SKIP, suspected_incident_id: SKIP, reason: SKIP, fi_attributes: SKIP, reporter: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @suspected_incident_id = suspected_incident_id unless suspected_incident_id == SKIP @reason = reason unless reason == SKIP @fi_attributes = fi_attributes unless fi_attributes == SKIP @reporter = reporter unless reporter == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#fi_attributes ⇒ Array[FiAttributeEntity]
Array of financial institution-specific attributes. Can be used to provide additional structured context on the suspected fraud for the FI to use in determining a resolution
30 31 32 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 30 def fi_attributes @fi_attributes end |
#reason ⇒ String
Free text justification for suspecting fraud
24 25 26 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 24 def reason @reason end |
#reporter ⇒ PartyEntity4
Identity of the party responsible for identifying and reporting the suspected fraud. This might be the DP, DAP, a vendor, a payment network, or other entity
36 37 38 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 36 def reporter @reporter end |
#suspected_incident_id ⇒ String
Unique identifier for the suspected fraud incident
20 21 22 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 20 def suspected_incident_id @suspected_incident_id end |
#type ⇒ String
Extensible string enum identifying the type of suspected fraud. Initially this will always be set to "ACCOUNT_TAKEOVER". Additional values may be defined in the future
16 17 18 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 16 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 80 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP suspected_incident_id = hash.key?('suspectedIncidentId') ? hash['suspectedIncidentId'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP # Parameter is an array, so we need to iterate through it fi_attributes = nil unless hash['fiAttributes'].nil? fi_attributes = [] hash['fiAttributes'].each do |structure| fi_attributes << (FiAttributeEntity.from_hash(structure) if structure) end end fi_attributes = SKIP unless hash.key?('fiAttributes') reporter = PartyEntity4.from_hash(hash['reporter']) if hash['reporter'] # 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. SuspectedFraudIncidentEntity.new(type: type, suspected_incident_id: suspected_incident_id, reason: reason, fi_attributes: fi_attributes, reporter: reporter, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['suspected_incident_id'] = 'suspectedIncidentId' @_hash['reason'] = 'reason' @_hash['fi_attributes'] = 'fiAttributes' @_hash['reporter'] = 'reporter' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 50 def self.optionals %w[ type suspected_incident_id reason fi_attributes reporter ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
125 126 127 128 129 130 131 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 125 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, suspected_incident_id:"\ " #{@suspected_incident_id.inspect}, reason: #{@reason.inspect}, fi_attributes:"\ " #{@fi_attributes.inspect}, reporter: #{@reporter.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 |
# File 'lib/fdx_v660_api/models/suspected_fraud_incident_entity.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, suspected_incident_id: #{@suspected_incident_id}, reason:"\ " #{@reason}, fi_attributes: #{@fi_attributes}, reporter: #{@reporter},"\ " additional_properties: #{@additional_properties}>" end |