Class: ThePlaidApi::IncomeVerificationPrecheckEmployer
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::IncomeVerificationPrecheckEmployer
- Defined in:
- lib/the_plaid_api/models/income_verification_precheck_employer.rb
Overview
Information about the end user’s employer
Instance Attribute Summary collapse
-
#address ⇒ IncomeVerificationPrecheckEmployerAddress
The address of the employer.
-
#name ⇒ String
The employer’s name.
-
#tax_id ⇒ String
The employer’s tax id.
-
#url ⇒ String
The URL for the employer’s public website.
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(name: SKIP, address: SKIP, tax_id: SKIP, url: SKIP, additional_properties: nil) ⇒ IncomeVerificationPrecheckEmployer
constructor
A new instance of IncomeVerificationPrecheckEmployer.
-
#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(name: SKIP, address: SKIP, tax_id: SKIP, url: SKIP, additional_properties: nil) ⇒ IncomeVerificationPrecheckEmployer
Returns a new instance of IncomeVerificationPrecheckEmployer.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 58 def initialize(name: SKIP, address: SKIP, tax_id: SKIP, url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @address = address unless address == SKIP @tax_id = tax_id unless tax_id == SKIP @url = url unless url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ IncomeVerificationPrecheckEmployerAddress
The address of the employer
18 19 20 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 18 def address @address end |
#name ⇒ String
The employer’s name
14 15 16 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 14 def name @name end |
#tax_id ⇒ String
The employer’s tax id
22 23 24 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 22 def tax_id @tax_id end |
#url ⇒ String
The URL for the employer’s public website
26 27 28 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 26 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP address = IncomeVerificationPrecheckEmployerAddress.from_hash(hash['address']) if hash['address'] tax_id = hash.key?('tax_id') ? hash['tax_id'] : SKIP url = hash.key?('url') ? hash['url'] : 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. IncomeVerificationPrecheckEmployer.new(name: name, address: address, tax_id: tax_id, url: url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['address'] = 'address' @_hash['tax_id'] = 'tax_id' @_hash['url'] = 'url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 52 53 54 55 56 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 49 def self.nullables %w[ name address tax_id url ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 39 def self.optionals %w[ name address tax_id url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, address: #{@address.inspect}, tax_id:"\ " #{@tax_id.inspect}, url: #{@url.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/the_plaid_api/models/income_verification_precheck_employer.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, address: #{@address}, tax_id: #{@tax_id}, url: #{@url},"\ " additional_properties: #{@additional_properties}>" end |