Class: ThePlaidApi::WatchlistScreeningDocument
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::WatchlistScreeningDocument
- Defined in:
- lib/the_plaid_api/models/watchlist_screening_document.rb
Overview
An official document, usually issued by a governing body or institution, with an associated identifier.
Instance Attribute Summary collapse
-
#number ⇒ String
The numeric or alphanumeric identifier associated with this document.
-
#type ⇒ WatchlistScreeningDocumentType
The kind of official document represented by this object.
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:, number:, additional_properties: nil) ⇒ WatchlistScreeningDocument
constructor
A new instance of WatchlistScreeningDocument.
-
#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:, number:, additional_properties: nil) ⇒ WatchlistScreeningDocument
Returns a new instance of WatchlistScreeningDocument.
55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 55 def initialize(type:, number:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type @number = number @additional_properties = additional_properties end |
Instance Attribute Details
#number ⇒ String
The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces.
35 36 37 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 35 def number @number end |
#type ⇒ WatchlistScreeningDocumentType
The kind of official document represented by this object. ‘birth_certificate` - A certificate of birth `drivers_license` - A license to operate a motor vehicle `immigration_number` - Immigration or residence documents `military_id` - Identification issued by a military group `other` - Any document not covered by other categories `passport` - An official passport issue by a government `personal_identification` - Any generic personal identification that is not covered by other categories `ration_card` - Identification that entitles the holder to rations `ssn` - United States Social Security Number `student_id` - Identification issued by an educational institution `tax_id` - Identification issued for the purpose of collecting taxes `travel_document` - Visas, entry permits, refugee documents, etc. `voter_id` - Identification issued for the purpose of voting
29 30 31 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 29 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : nil number = hash.key?('number') ? hash['number'] : 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. WatchlistScreeningDocument.new(type: type, number: number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['number'] = 'number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 46 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, number: #{@number.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/the_plaid_api/models/watchlist_screening_document.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, number: #{@number}, additional_properties:"\ " #{@additional_properties}>" end |