Class: ThePlaidApi::FraudAnalysisDetails

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/fraud_analysis_details.rb

Overview

Details about the fraud analysis performed on the document.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_supported:, portrait_presence_check:, portrait_details_check:, image_composition_check:, integrity_check:, detail_check:, issue_date_check:, additional_properties: nil) ⇒ FraudAnalysisDetails

Returns a new instance of FraudAnalysisDetails.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 63

def initialize(type_supported:, portrait_presence_check:,
               portrait_details_check:, image_composition_check:,
               integrity_check:, detail_check:, issue_date_check:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @type_supported = type_supported
  @portrait_presence_check = portrait_presence_check
  @portrait_details_check = portrait_details_check
  @image_composition_check = image_composition_check
  @integrity_check = integrity_check
  @detail_check = detail_check
  @issue_date_check = issue_date_check
  @additional_properties = additional_properties
end

Instance Attribute Details

#detail_checkFraudCheckOutcome

The outcome of the fraud check.

Returns:



34
35
36
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 34

def detail_check
  @detail_check
end

#image_composition_checkFraudCheckOutcome

The outcome of the fraud check.

Returns:



26
27
28
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 26

def image_composition_check
  @image_composition_check
end

#integrity_checkFraudCheckOutcome

The outcome of the fraud check.

Returns:



30
31
32
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 30

def integrity_check
  @integrity_check
end

#issue_date_checkFraudCheckOutcomeWithNoData

The outcome of the fraud check, when available.



38
39
40
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 38

def issue_date_check
  @issue_date_check
end

#portrait_details_checkFraudCheckOutcome

The outcome of the fraud check.

Returns:



22
23
24
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 22

def portrait_details_check
  @portrait_details_check
end

#portrait_presence_checkFraudCheckOutcome

The outcome of the fraud check.

Returns:



18
19
20
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 18

def portrait_presence_check
  @portrait_presence_check
end

#type_supportedFraudCheckOutcome

The outcome of the fraud check.

Returns:



14
15
16
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 14

def type_supported
  @type_supported
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
115
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 81

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  type_supported =
    hash.key?('type_supported') ? hash['type_supported'] : nil
  portrait_presence_check =
    hash.key?('portrait_presence_check') ? hash['portrait_presence_check'] : nil
  portrait_details_check =
    hash.key?('portrait_details_check') ? hash['portrait_details_check'] : nil
  image_composition_check =
    hash.key?('image_composition_check') ? hash['image_composition_check'] : nil
  integrity_check =
    hash.key?('integrity_check') ? hash['integrity_check'] : nil
  detail_check = hash.key?('detail_check') ? hash['detail_check'] : nil
  issue_date_check =
    hash.key?('issue_date_check') ? hash['issue_date_check'] : 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.
  FraudAnalysisDetails.new(type_supported: type_supported,
                           portrait_presence_check: portrait_presence_check,
                           portrait_details_check: portrait_details_check,
                           image_composition_check: image_composition_check,
                           integrity_check: integrity_check,
                           detail_check: detail_check,
                           issue_date_check: issue_date_check,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 41

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['type_supported'] = 'type_supported'
  @_hash['portrait_presence_check'] = 'portrait_presence_check'
  @_hash['portrait_details_check'] = 'portrait_details_check'
  @_hash['image_composition_check'] = 'image_composition_check'
  @_hash['integrity_check'] = 'integrity_check'
  @_hash['detail_check'] = 'detail_check'
  @_hash['issue_date_check'] = 'issue_date_check'
  @_hash
end

.nullablesObject

An array for nullable fields



59
60
61
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 59

def self.nullables
  []
end

.optionalsObject

An array for optional fields



54
55
56
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 54

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



128
129
130
131
132
133
134
135
136
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 128

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} type_supported: #{@type_supported.inspect}, portrait_presence_check:"\
  " #{@portrait_presence_check.inspect}, portrait_details_check:"\
  " #{@portrait_details_check.inspect}, image_composition_check:"\
  " #{@image_composition_check.inspect}, integrity_check: #{@integrity_check.inspect},"\
  " detail_check: #{@detail_check.inspect}, issue_date_check: #{@issue_date_check.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



118
119
120
121
122
123
124
125
# File 'lib/the_plaid_api/models/fraud_analysis_details.rb', line 118

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} type_supported: #{@type_supported}, portrait_presence_check:"\
  " #{@portrait_presence_check}, portrait_details_check: #{@portrait_details_check},"\
  " image_composition_check: #{@image_composition_check}, integrity_check:"\
  " #{@integrity_check}, detail_check: #{@detail_check}, issue_date_check:"\
  " #{@issue_date_check}, additional_properties: #{@additional_properties}>"
end