Class: ThePlaidApi::CreditPlatformIds
- Defined in:
- lib/the_plaid_api/models/credit_platform_ids.rb
Overview
The object containing a set of ids related to an employee.
Instance Attribute Summary collapse
-
#employee_id ⇒ String
The ID of an employee as given by their employer.
-
#payroll_id ⇒ String
The ID of an employee as given by their payroll.
-
#position_id ⇒ String
The ID of the position of the 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(employee_id:, payroll_id:, position_id:, additional_properties: nil) ⇒ CreditPlatformIds
constructor
A new instance of CreditPlatformIds.
-
#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(employee_id:, payroll_id:, position_id:, additional_properties: nil) ⇒ CreditPlatformIds
Returns a new instance of CreditPlatformIds.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 47 def initialize(employee_id:, payroll_id:, position_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @employee_id = employee_id @payroll_id = payroll_id @position_id = position_id @additional_properties = additional_properties end |
Instance Attribute Details
#employee_id ⇒ String
The ID of an employee as given by their employer.
14 15 16 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 14 def employee_id @employee_id end |
#payroll_id ⇒ String
The ID of an employee as given by their payroll.
18 19 20 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 18 def payroll_id @payroll_id end |
#position_id ⇒ String
The ID of the position of the employee.
22 23 24 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 22 def position_id @position_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. employee_id = hash.key?('employee_id') ? hash['employee_id'] : nil payroll_id = hash.key?('payroll_id') ? hash['payroll_id'] : nil position_id = hash.key?('position_id') ? hash['position_id'] : 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. CreditPlatformIds.new(employee_id: employee_id, payroll_id: payroll_id, position_id: position_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['employee_id'] = 'employee_id' @_hash['payroll_id'] = 'payroll_id' @_hash['position_id'] = 'position_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 42 43 44 45 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 39 def self.nullables %w[ employee_id payroll_id position_id ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 34 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} employee_id: #{@employee_id.inspect}, payroll_id: #{@payroll_id.inspect},"\ " position_id: #{@position_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/the_plaid_api/models/credit_platform_ids.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} employee_id: #{@employee_id}, payroll_id: #{@payroll_id}, position_id:"\ " #{@position_id}, additional_properties: #{@additional_properties}>" end |