Class: ThePlaidApi::PrismCashScoreMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PrismCashScoreMetadata
- Defined in:
- lib/the_plaid_api/models/prism_cash_score_metadata.rb
Overview
An object containing metadata about the provided transactions.
Instance Attribute Summary collapse
-
#l1m_credit_value_cnt ⇒ Integer
Number of credit transactions in the last 30 days.
-
#l1m_debit_value_cnt ⇒ Integer
Number of debit transactions in the last 30 days.
-
#max_age ⇒ Integer
Number of days since the oldest transaction.
-
#max_age_credit ⇒ Integer
Number of days since the oldest credit transaction.
-
#max_age_debit ⇒ Integer
Number of days since the oldest debit transaction.
-
#min_age ⇒ Integer
Number of days since the latest transaction.
-
#min_age_credit ⇒ Integer
Number of days since the latest credit transaction.
-
#min_age_debit ⇒ Integer
Number of days since the latest debit transaction.
-
#num_trxn_credit ⇒ Integer
Number of credit transactions.
-
#num_trxn_debit ⇒ Integer
Number of debit transactions.
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(max_age:, min_age:, min_age_credit:, min_age_debit:, max_age_debit:, max_age_credit:, num_trxn_credit:, num_trxn_debit:, l1m_credit_value_cnt:, l1m_debit_value_cnt:, additional_properties: nil) ⇒ PrismCashScoreMetadata
constructor
A new instance of PrismCashScoreMetadata.
-
#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(max_age:, min_age:, min_age_credit:, min_age_debit:, max_age_debit:, max_age_credit:, num_trxn_credit:, num_trxn_debit:, l1m_credit_value_cnt:, l1m_debit_value_cnt:, additional_properties: nil) ⇒ PrismCashScoreMetadata
Returns a new instance of PrismCashScoreMetadata.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 89 def initialize(max_age:, min_age:, min_age_credit:, min_age_debit:, max_age_debit:, max_age_credit:, num_trxn_credit:, num_trxn_debit:, l1m_credit_value_cnt:, l1m_debit_value_cnt:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @max_age = max_age @min_age = min_age @min_age_credit = min_age_credit @min_age_debit = min_age_debit @max_age_debit = max_age_debit @max_age_credit = max_age_credit @num_trxn_credit = num_trxn_credit @num_trxn_debit = num_trxn_debit @l1m_credit_value_cnt = l1m_credit_value_cnt @l1m_debit_value_cnt = l1m_debit_value_cnt @additional_properties = additional_properties end |
Instance Attribute Details
#l1m_credit_value_cnt ⇒ Integer
Number of credit transactions in the last 30 days.
46 47 48 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 46 def l1m_credit_value_cnt @l1m_credit_value_cnt end |
#l1m_debit_value_cnt ⇒ Integer
Number of debit transactions in the last 30 days.
50 51 52 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 50 def l1m_debit_value_cnt @l1m_debit_value_cnt end |
#max_age ⇒ Integer
Number of days since the oldest transaction.
14 15 16 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 14 def max_age @max_age end |
#max_age_credit ⇒ Integer
Number of days since the oldest credit transaction.
34 35 36 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 34 def max_age_credit @max_age_credit end |
#max_age_debit ⇒ Integer
Number of days since the oldest debit transaction.
30 31 32 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 30 def max_age_debit @max_age_debit end |
#min_age ⇒ Integer
Number of days since the latest transaction.
18 19 20 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 18 def min_age @min_age end |
#min_age_credit ⇒ Integer
Number of days since the latest credit transaction.
22 23 24 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 22 def min_age_credit @min_age_credit end |
#min_age_debit ⇒ Integer
Number of days since the latest debit transaction.
26 27 28 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 26 def min_age_debit @min_age_debit end |
#num_trxn_credit ⇒ Integer
Number of credit transactions.
38 39 40 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 38 def num_trxn_credit @num_trxn_credit end |
#num_trxn_debit ⇒ Integer
Number of debit transactions.
42 43 44 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 42 def num_trxn_debit @num_trxn_debit end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 110 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. max_age = hash.key?('max_age') ? hash['max_age'] : nil min_age = hash.key?('min_age') ? hash['min_age'] : nil min_age_credit = hash.key?('min_age_credit') ? hash['min_age_credit'] : nil min_age_debit = hash.key?('min_age_debit') ? hash['min_age_debit'] : nil max_age_debit = hash.key?('max_age_debit') ? hash['max_age_debit'] : nil max_age_credit = hash.key?('max_age_credit') ? hash['max_age_credit'] : nil num_trxn_credit = hash.key?('num_trxn_credit') ? hash['num_trxn_credit'] : nil num_trxn_debit = hash.key?('num_trxn_debit') ? hash['num_trxn_debit'] : nil l1m_credit_value_cnt = hash.key?('l1m_credit_value_cnt') ? hash['l1m_credit_value_cnt'] : nil l1m_debit_value_cnt = hash.key?('l1m_debit_value_cnt') ? hash['l1m_debit_value_cnt'] : 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. PrismCashScoreMetadata.new(max_age: max_age, min_age: min_age, min_age_credit: min_age_credit, min_age_debit: min_age_debit, max_age_debit: max_age_debit, max_age_credit: max_age_credit, num_trxn_credit: num_trxn_credit, num_trxn_debit: num_trxn_debit, l1m_credit_value_cnt: l1m_credit_value_cnt, l1m_debit_value_cnt: l1m_debit_value_cnt, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['max_age'] = 'max_age' @_hash['min_age'] = 'min_age' @_hash['min_age_credit'] = 'min_age_credit' @_hash['min_age_debit'] = 'min_age_debit' @_hash['max_age_debit'] = 'max_age_debit' @_hash['max_age_credit'] = 'max_age_credit' @_hash['num_trxn_credit'] = 'num_trxn_credit' @_hash['num_trxn_debit'] = 'num_trxn_debit' @_hash['l1m_credit_value_cnt'] = 'l1m_credit_value_cnt' @_hash['l1m_debit_value_cnt'] = 'l1m_debit_value_cnt' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 74 def self.nullables %w[ max_age min_age min_age_credit min_age_debit max_age_debit max_age_credit num_trxn_credit num_trxn_debit l1m_credit_value_cnt l1m_debit_value_cnt ] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 69 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
163 164 165 166 167 168 169 170 171 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 163 def inspect class_name = self.class.name.split('::').last "<#{class_name} max_age: #{@max_age.inspect}, min_age: #{@min_age.inspect}, min_age_credit:"\ " #{@min_age_credit.inspect}, min_age_debit: #{@min_age_debit.inspect}, max_age_debit:"\ " #{@max_age_debit.inspect}, max_age_credit: #{@max_age_credit.inspect}, num_trxn_credit:"\ " #{@num_trxn_credit.inspect}, num_trxn_debit: #{@num_trxn_debit.inspect},"\ " l1m_credit_value_cnt: #{@l1m_credit_value_cnt.inspect}, l1m_debit_value_cnt:"\ " #{@l1m_debit_value_cnt.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
153 154 155 156 157 158 159 160 |
# File 'lib/the_plaid_api/models/prism_cash_score_metadata.rb', line 153 def to_s class_name = self.class.name.split('::').last "<#{class_name} max_age: #{@max_age}, min_age: #{@min_age}, min_age_credit:"\ " #{@min_age_credit}, min_age_debit: #{@min_age_debit}, max_age_debit: #{@max_age_debit},"\ " max_age_credit: #{@max_age_credit}, num_trxn_credit: #{@num_trxn_credit}, num_trxn_debit:"\ " #{@num_trxn_debit}, l1m_credit_value_cnt: #{@l1m_credit_value_cnt}, l1m_debit_value_cnt:"\ " #{@l1m_debit_value_cnt}, additional_properties: #{@additional_properties}>" end |