Class: ThePlaidApi::CreditEmploymentVerification
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditEmploymentVerification
- Defined in:
- lib/the_plaid_api/models/credit_employment_verification.rb
Overview
The object containing proof of employment data for an individual.
Instance Attribute Summary collapse
-
#account_id ⇒ String
ID of the payroll provider account.
-
#employee_type ⇒ String
The type of employment for the individual.
-
#employer ⇒ CreditEmployerVerification
An object containing employer data.
-
#end_date ⇒ Date
End of employment, if applicable.
-
#last_paystub_date ⇒ Date
The date of the employee’s most recent paystub in ISO 8601 format (YYYY-MM-DD).
-
#platform_ids ⇒ CreditPlatformIds
The object containing a set of ids related to an employee.
-
#start_date ⇒ Date
Start of employment in ISO 8601 format (YYYY-MM-DD).
-
#status ⇒ String
Current employment status.
-
#title ⇒ String
Current title of employee.
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(account_id:, status:, start_date:, end_date:, employer:, title:, platform_ids:, employee_type:, last_paystub_date:, additional_properties: nil) ⇒ CreditEmploymentVerification
constructor
A new instance of CreditEmploymentVerification.
-
#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(account_id:, status:, start_date:, end_date:, employer:, title:, platform_ids:, employee_type:, last_paystub_date:, additional_properties: nil) ⇒ CreditEmploymentVerification
Returns a new instance of CreditEmploymentVerification.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 88 def initialize(account_id:, status:, start_date:, end_date:, employer:, title:, platform_ids:, employee_type:, last_paystub_date:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id @status = status @start_date = start_date @end_date = end_date @employer = employer @title = title @platform_ids = platform_ids @employee_type = employee_type @last_paystub_date = last_paystub_date @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
ID of the payroll provider account.
14 15 16 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 14 def account_id @account_id end |
#employee_type ⇒ String
The type of employment for the individual. ‘“FULL_TIME”`: A full-time employee. `“PART_TIME”`: A part-time employee. `“CONTRACTOR”`: An employee typically hired externally through a contracting group. `“TEMPORARY”`: A temporary employee. `“OTHER”`: The employee type is not one of the above defined types.
48 49 50 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 48 def employee_type @employee_type end |
#employer ⇒ CreditEmployerVerification
An object containing employer data.
30 31 32 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 30 def employer @employer end |
#end_date ⇒ Date
End of employment, if applicable. Provided in ISO 8601 format (YYY-MM-DD).
26 27 28 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 26 def end_date @end_date end |
#last_paystub_date ⇒ Date
The date of the employee’s most recent paystub in ISO 8601 format (YYYY-MM-DD).
53 54 55 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 53 def last_paystub_date @last_paystub_date end |
#platform_ids ⇒ CreditPlatformIds
The object containing a set of ids related to an employee.
38 39 40 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 38 def platform_ids @platform_ids end |
#start_date ⇒ Date
Start of employment in ISO 8601 format (YYYY-MM-DD).
22 23 24 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 22 def start_date @start_date end |
#status ⇒ String
Current employment status.
18 19 20 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 18 def status @status end |
#title ⇒ String
Current title of employee.
34 35 36 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 34 def title @title end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 107 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('account_id') ? hash['account_id'] : nil status = hash.key?('status') ? hash['status'] : nil start_date = hash.key?('start_date') ? hash['start_date'] : nil end_date = hash.key?('end_date') ? hash['end_date'] : nil employer = CreditEmployerVerification.from_hash(hash['employer']) if hash['employer'] title = hash.key?('title') ? hash['title'] : nil platform_ids = CreditPlatformIds.from_hash(hash['platform_ids']) if hash['platform_ids'] employee_type = hash.key?('employee_type') ? hash['employee_type'] : nil last_paystub_date = hash.key?('last_paystub_date') ? hash['last_paystub_date'] : 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. CreditEmploymentVerification.new(account_id: account_id, status: status, start_date: start_date, end_date: end_date, employer: employer, title: title, platform_ids: platform_ids, employee_type: employee_type, last_paystub_date: last_paystub_date, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 56 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['status'] = 'status' @_hash['start_date'] = 'start_date' @_hash['end_date'] = 'end_date' @_hash['employer'] = 'employer' @_hash['title'] = 'title' @_hash['platform_ids'] = 'platform_ids' @_hash['employee_type'] = 'employee_type' @_hash['last_paystub_date'] = 'last_paystub_date' @_hash end |
.nullables ⇒ Object
An array for nullable fields
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 76 def self.nullables %w[ account_id status start_date end_date title employee_type last_paystub_date ] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 71 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
152 153 154 155 156 157 158 159 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 152 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, status: #{@status.inspect}, start_date:"\ " #{@start_date.inspect}, end_date: #{@end_date.inspect}, employer: #{@employer.inspect},"\ " title: #{@title.inspect}, platform_ids: #{@platform_ids.inspect}, employee_type:"\ " #{@employee_type.inspect}, last_paystub_date: #{@last_paystub_date.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
143 144 145 146 147 148 149 |
# File 'lib/the_plaid_api/models/credit_employment_verification.rb', line 143 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, status: #{@status}, start_date: #{@start_date},"\ " end_date: #{@end_date}, employer: #{@employer}, title: #{@title}, platform_ids:"\ " #{@platform_ids}, employee_type: #{@employee_type}, last_paystub_date:"\ " #{@last_paystub_date}, additional_properties: #{@additional_properties}>" end |