Class: ThePlaidApi::MonitoringLoanInsights
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::MonitoringLoanInsights
- Defined in:
- lib/the_plaid_api/models/monitoring_loan_insights.rb
Overview
An object representing the loan exposure subcategory of the report
Instance Attribute Summary collapse
-
#loan_disbursements_count ⇒ Float
The number of loan disbursements detected in the last 30 days.
-
#loan_payment_merchants_counts ⇒ LoanPaymentsMerchantCounts
Details regarding the number of unique loan payment merchants.
-
#loan_payments_counts ⇒ LoanPaymentsCounts
Details regarding the number of loan payments.
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(loan_payments_counts:, loan_disbursements_count:, loan_payment_merchants_counts:, additional_properties: nil) ⇒ MonitoringLoanInsights
constructor
A new instance of MonitoringLoanInsights.
-
#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(loan_payments_counts:, loan_disbursements_count:, loan_payment_merchants_counts:, additional_properties: nil) ⇒ MonitoringLoanInsights
Returns a new instance of MonitoringLoanInsights.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 44 def initialize(loan_payments_counts:, loan_disbursements_count:, loan_payment_merchants_counts:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @loan_payments_counts = loan_payments_counts @loan_disbursements_count = loan_disbursements_count @loan_payment_merchants_counts = loan_payment_merchants_counts @additional_properties = additional_properties end |
Instance Attribute Details
#loan_disbursements_count ⇒ Float
The number of loan disbursements detected in the last 30 days
18 19 20 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 18 def loan_disbursements_count @loan_disbursements_count end |
#loan_payment_merchants_counts ⇒ LoanPaymentsMerchantCounts
Details regarding the number of unique loan payment merchants
22 23 24 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 22 def loan_payment_merchants_counts @loan_payment_merchants_counts end |
#loan_payments_counts ⇒ LoanPaymentsCounts
Details regarding the number of loan payments
14 15 16 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 14 def loan_payments_counts @loan_payments_counts end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. loan_payments_counts = LoanPaymentsCounts.from_hash(hash['loan_payments_counts']) if hash['loan_payments_counts'] loan_disbursements_count = hash.key?('loan_disbursements_count') ? hash['loan_disbursements_count'] : nil if hash['loan_payment_merchants_counts'] loan_payment_merchants_counts = LoanPaymentsMerchantCounts.from_hash(hash['loan_payment_merchants_counts']) end # 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. MonitoringLoanInsights.new(loan_payments_counts: loan_payments_counts, loan_disbursements_count: loan_disbursements_count, loan_payment_merchants_counts: loan_payment_merchants_counts, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 32 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['loan_payments_counts'] = 'loan_payments_counts' @_hash['loan_disbursements_count'] = 'loan_disbursements_count' @_hash['loan_payment_merchants_counts'] = 'loan_payment_merchants_counts' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 35 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 96 97 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} loan_payments_counts: #{@loan_payments_counts.inspect},"\ " loan_disbursements_count: #{@loan_disbursements_count.inspect},"\ " loan_payment_merchants_counts: #{@loan_payment_merchants_counts.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/monitoring_loan_insights.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} loan_payments_counts: #{@loan_payments_counts}, loan_disbursements_count:"\ " #{@loan_disbursements_count}, loan_payment_merchants_counts:"\ " #{@loan_payment_merchants_counts}, additional_properties: #{@additional_properties}>" end |