Class: ThePlaidApi::BeaconUserIdNumber
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BeaconUserIdNumber
- Defined in:
- lib/the_plaid_api/models/beacon_user_id_number.rb
Overview
The ID number associated with a Beacon User.
Instance Attribute Summary collapse
-
#type ⇒ IdNumberType
A globally unique and human readable ID type, specific to the country and document category.
-
#value ⇒ String
Value of identity document value typed in by user.
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(value:, type:, additional_properties: nil) ⇒ BeaconUserIdNumber
constructor
A new instance of BeaconUserIdNumber.
-
#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(value:, type:, additional_properties: nil) ⇒ BeaconUserIdNumber
Returns a new instance of BeaconUserIdNumber.
45 46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 45 def initialize(value:, type:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @value = value @type = type @additional_properties = additional_properties end |
Instance Attribute Details
#type ⇒ IdNumberType
A globally unique and human readable ID type, specific to the country and document category. For more context on this field, see [Input Validation Rules](cognitohq.com/docs/flow/flow-hybrid-input-validation#id-num bers).
25 26 27 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 25 def type @type end |
#value ⇒ String
Value of identity document value typed in by user. Alpha-numeric, with all formatting characters stripped. For specific format requirements by ID type, see [Input Validation Rules](plaid.com/docs/identity-verification/hybrid-input-validatio n/#id-numbers).
18 19 20 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 18 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. value = hash.key?('value') ? hash['value'] : nil type = hash.key?('type') ? hash['type'] : 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. BeaconUserIdNumber.new(value: value, type: type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['value'] = 'value' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 36 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
83 84 85 86 87 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 83 def inspect class_name = self.class.name.split('::').last "<#{class_name} value: #{@value.inspect}, type: #{@type.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
76 77 78 79 80 |
# File 'lib/the_plaid_api/models/beacon_user_id_number.rb', line 76 def to_s class_name = self.class.name.split('::').last "<#{class_name} value: #{@value}, type: #{@type}, additional_properties:"\ " #{@additional_properties}>" end |