Class: ThePlaidApi::CreditBankEmployment
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditBankEmployment
- Defined in:
- lib/the_plaid_api/models/credit_bank_employment.rb
Overview
Detailed information for the bank employment.
Instance Attribute Summary collapse
-
#account_id ⇒ String
Plaid’s unique identifier for the account.
-
#bank_employment_id ⇒ String
A unique identifier for the bank employment.
-
#earliest_deposit_date ⇒ Date
The date of the earliest deposit from this employer from within the period of the days requested.
-
#employer ⇒ CreditBankEmployer
Object containing employer data.
-
#latest_deposit_date ⇒ Date
The date of the most recent deposit from this employer.
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(bank_employment_id:, account_id:, employer:, latest_deposit_date:, earliest_deposit_date:, additional_properties: nil) ⇒ CreditBankEmployment
constructor
A new instance of CreditBankEmployment.
-
#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(bank_employment_id:, account_id:, employer:, latest_deposit_date:, earliest_deposit_date:, additional_properties: nil) ⇒ CreditBankEmployment
Returns a new instance of CreditBankEmployment.
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 54 def initialize(bank_employment_id:, account_id:, employer:, latest_deposit_date:, earliest_deposit_date:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @bank_employment_id = bank_employment_id @account_id = account_id @employer = employer @latest_deposit_date = latest_deposit_date @earliest_deposit_date = earliest_deposit_date @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
Plaid’s unique identifier for the account.
18 19 20 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 18 def account_id @account_id end |
#bank_employment_id ⇒ String
A unique identifier for the bank employment.
14 15 16 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 14 def bank_employment_id @bank_employment_id end |
#earliest_deposit_date ⇒ Date
The date of the earliest deposit from this employer from within the period of the days requested.
31 32 33 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 31 def earliest_deposit_date @earliest_deposit_date end |
#employer ⇒ CreditBankEmployer
Object containing employer data.
22 23 24 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 22 def employer @employer end |
#latest_deposit_date ⇒ Date
The date of the most recent deposit from this employer.
26 27 28 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 26 def latest_deposit_date @latest_deposit_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bank_employment_id = hash.key?('bank_employment_id') ? hash['bank_employment_id'] : nil account_id = hash.key?('account_id') ? hash['account_id'] : nil employer = CreditBankEmployer.from_hash(hash['employer']) if hash['employer'] latest_deposit_date = hash.key?('latest_deposit_date') ? hash['latest_deposit_date'] : nil earliest_deposit_date = hash.key?('earliest_deposit_date') ? hash['earliest_deposit_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. CreditBankEmployment.new(bank_employment_id: bank_employment_id, account_id: account_id, employer: employer, latest_deposit_date: latest_deposit_date, earliest_deposit_date: earliest_deposit_date, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['bank_employment_id'] = 'bank_employment_id' @_hash['account_id'] = 'account_id' @_hash['employer'] = 'employer' @_hash['latest_deposit_date'] = 'latest_deposit_date' @_hash['earliest_deposit_date'] = 'earliest_deposit_date' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 45 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} bank_employment_id: #{@bank_employment_id.inspect}, account_id:"\ " #{@account_id.inspect}, employer: #{@employer.inspect}, latest_deposit_date:"\ " #{@latest_deposit_date.inspect}, earliest_deposit_date: #{@earliest_deposit_date.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 104 105 |
# File 'lib/the_plaid_api/models/credit_bank_employment.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} bank_employment_id: #{@bank_employment_id}, account_id: #{@account_id},"\ " employer: #{@employer}, latest_deposit_date: #{@latest_deposit_date},"\ " earliest_deposit_date: #{@earliest_deposit_date}, additional_properties:"\ " #{@additional_properties}>" end |