Class: ThePlaidApi::LiabilityOverride
- Defined in:
- lib/the_plaid_api/models/liability_override.rb
Overview
Used to configure Sandbox test data for the Liabilities product
Instance Attribute Summary collapse
-
#balance_transfer_apr ⇒ Float
The balance transfer APR percentage value.
-
#cash_apr ⇒ Float
The cash APR percentage value.
-
#expected_payoff_date ⇒ Date
Override the ‘expected_payoff_date` field.
-
#guarantor ⇒ String
Override the ‘guarantor` field.
-
#interest_capitalization_grace_period_months ⇒ Float
If set, interest capitalization begins at the given number of months after loan origination.
-
#is_federal ⇒ TrueClass | FalseClass
Override the ‘is_federal` field.
-
#is_overdue ⇒ TrueClass | FalseClass
Override the ‘is_overdue` field.
-
#last_payment_amount ⇒ Float
Override the ‘last_payment_amount` field.
-
#loan_name ⇒ String
Override the ‘loan_name` field.
-
#loan_status ⇒ StudentLoanStatus
An object representing the status of the student loan.
-
#minimum_payment_amount ⇒ Float
Override the ‘minimum_payment_amount` field.
-
#nominal_apr ⇒ Float
The interest rate on the loan as a percentage.
-
#origination_date ⇒ Date
The date on which the loan was initially lent, in [ISO 8601](wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format.
-
#payment_reference_number ⇒ String
Override the ‘payment_reference_number` field.
-
#principal ⇒ Float
The original loan principal.
-
#pslf_status ⇒ PslfStatus
Information about the student’s eligibility in the Public Service Loan Forgiveness program.
-
#purchase_apr ⇒ Float
The purchase APR percentage value.
-
#repayment_model ⇒ StudentLoanRepaymentModel
Student loan repayment information used to configure Sandbox test data for the Liabilities product.
-
#repayment_plan_description ⇒ String
Override the ‘repayment_plan.description` field.
-
#repayment_plan_type ⇒ String
Override the ‘repayment_plan.type` field.
-
#sequence_number ⇒ String
Override the ‘sequence_number` field.
-
#servicer_address ⇒ Address
A physical mailing address.
-
#special_apr ⇒ Float
The special APR percentage value.
-
#type ⇒ String
The type of the liability object, either ‘credit` or `student`.
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(type:, purchase_apr:, cash_apr:, balance_transfer_apr:, special_apr:, last_payment_amount:, minimum_payment_amount:, is_overdue:, origination_date:, principal:, nominal_apr:, interest_capitalization_grace_period_months:, repayment_model:, expected_payoff_date:, guarantor:, is_federal:, loan_name:, loan_status:, payment_reference_number:, pslf_status:, repayment_plan_description:, repayment_plan_type:, sequence_number:, servicer_address:, additional_properties: nil) ⇒ LiabilityOverride
constructor
A new instance of LiabilityOverride.
-
#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(type:, purchase_apr:, cash_apr:, balance_transfer_apr:, special_apr:, last_payment_amount:, minimum_payment_amount:, is_overdue:, origination_date:, principal:, nominal_apr:, interest_capitalization_grace_period_months:, repayment_model:, expected_payoff_date:, guarantor:, is_federal:, loan_name:, loan_status:, payment_reference_number:, pslf_status:, repayment_plan_description:, repayment_plan_type:, sequence_number:, servicer_address:, additional_properties: nil) ⇒ LiabilityOverride
Returns a new instance of LiabilityOverride.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 173 def initialize(type:, purchase_apr:, cash_apr:, balance_transfer_apr:, special_apr:, last_payment_amount:, minimum_payment_amount:, is_overdue:, origination_date:, principal:, nominal_apr:, interest_capitalization_grace_period_months:, repayment_model:, expected_payoff_date:, guarantor:, is_federal:, loan_name:, loan_status:, payment_reference_number:, pslf_status:, repayment_plan_description:, repayment_plan_type:, sequence_number:, servicer_address:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type @purchase_apr = purchase_apr @cash_apr = cash_apr @balance_transfer_apr = balance_transfer_apr @special_apr = special_apr @last_payment_amount = last_payment_amount @minimum_payment_amount = minimum_payment_amount @is_overdue = is_overdue @origination_date = origination_date @principal = principal @nominal_apr = nominal_apr @interest_capitalization_grace_period_months = interest_capitalization_grace_period_months @repayment_model = repayment_model @expected_payoff_date = expected_payoff_date @guarantor = guarantor @is_federal = is_federal @loan_name = loan_name @loan_status = loan_status @payment_reference_number = payment_reference_number @pslf_status = pslf_status @repayment_plan_description = repayment_plan_description @repayment_plan_type = repayment_plan_type @sequence_number = sequence_number @servicer_address = servicer_address @additional_properties = additional_properties end |
Instance Attribute Details
#balance_transfer_apr ⇒ Float
The balance transfer APR percentage value. Can only be set if ‘type` is `credit`.
30 31 32 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 30 def balance_transfer_apr @balance_transfer_apr end |
#cash_apr ⇒ Float
The cash APR percentage value. Can only be set if ‘type` is `credit`.
25 26 27 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 25 def cash_apr @cash_apr end |
#expected_payoff_date ⇒ Date
Override the ‘expected_payoff_date` field. Can only be set if `type` is `student`.
79 80 81 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 79 def expected_payoff_date @expected_payoff_date end |
#guarantor ⇒ String
Override the ‘guarantor` field. Can only be set if `type` is `student`.
83 84 85 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 83 def guarantor @guarantor end |
#interest_capitalization_grace_period_months ⇒ Float
If set, interest capitalization begins at the given number of months after loan origination. By default interest is never capitalized. Can only be set if ‘type` is `student`.
69 70 71 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 69 def interest_capitalization_grace_period_months @interest_capitalization_grace_period_months end |
#is_federal ⇒ TrueClass | FalseClass
Override the ‘is_federal` field. Can only be set if `type` is `student`.
87 88 89 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 87 def is_federal @is_federal end |
#is_overdue ⇒ TrueClass | FalseClass
Override the ‘is_overdue` field
48 49 50 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 48 def is_overdue @is_overdue end |
#last_payment_amount ⇒ Float
Override the ‘last_payment_amount` field. Can only be set if `type` is `credit`.
39 40 41 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 39 def last_payment_amount @last_payment_amount end |
#loan_name ⇒ String
Override the ‘loan_name` field. Can only be set if `type` is `student`.
91 92 93 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 91 def loan_name @loan_name end |
#loan_status ⇒ StudentLoanStatus
An object representing the status of the student loan
95 96 97 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 95 def loan_status @loan_status end |
#minimum_payment_amount ⇒ Float
Override the ‘minimum_payment_amount` field. Can only be set if `type` is `credit` or `student`.
44 45 46 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 44 def minimum_payment_amount @minimum_payment_amount end |
#nominal_apr ⇒ Float
The interest rate on the loan as a percentage. Can only be set if ‘type` is `student`.
63 64 65 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 63 def nominal_apr @nominal_apr end |
#origination_date ⇒ Date
The date on which the loan was initially lent, in [ISO 8601](wikipedia.org/wiki/ISO_8601) (YYYY-MM-DD) format. Can only be set if ‘type` is `student`.
54 55 56 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 54 def origination_date @origination_date end |
#payment_reference_number ⇒ String
Override the ‘payment_reference_number` field. Can only be set if `type` is `student`.
100 101 102 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 100 def payment_reference_number @payment_reference_number end |
#principal ⇒ Float
The original loan principal. Can only be set if ‘type` is `student`.
58 59 60 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 58 def principal @principal end |
#pslf_status ⇒ PslfStatus
Information about the student’s eligibility in the Public Service Loan Forgiveness program. This is only returned if the institution is FedLoan (‘ins_116527`). Since FedLoan no longer services student loans, this field is no longer returned.
107 108 109 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 107 def pslf_status @pslf_status end |
#purchase_apr ⇒ Float
The purchase APR percentage value. For simplicity, this is the only interest rate used to calculate interest charges. Can only be set if ‘type` is `credit`.
21 22 23 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 21 def purchase_apr @purchase_apr end |
#repayment_model ⇒ StudentLoanRepaymentModel
Student loan repayment information used to configure Sandbox test data for the Liabilities product
74 75 76 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 74 def repayment_model @repayment_model end |
#repayment_plan_description ⇒ String
Override the ‘repayment_plan.description` field. Can only be set if `type` is `student`.
112 113 114 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 112 def repayment_plan_description @repayment_plan_description end |
#repayment_plan_type ⇒ String
Override the ‘repayment_plan.type` field. Can only be set if `type` is `student`. Possible values are: `“extended graduated”`, `“extended standard”`, `“graduated”`, `“income-contingent repayment”`, `“income-based repayment”`, `“income-sensitive repayment”`, `“interest only”`, `“other”`, `“pay as you earn”`, `“revised pay as you earn”`, `“standard”`, or `“saving on a valuable education”`.
121 122 123 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 121 def repayment_plan_type @repayment_plan_type end |
#sequence_number ⇒ String
Override the ‘sequence_number` field. Can only be set if `type` is `student`.
126 127 128 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 126 def sequence_number @sequence_number end |
#servicer_address ⇒ Address
A physical mailing address.
130 131 132 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 130 def servicer_address @servicer_address end |
#special_apr ⇒ Float
The special APR percentage value. Can only be set if ‘type` is `credit`.
34 35 36 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 34 def special_apr @special_apr end |
#type ⇒ String
The type of the liability object, either ‘credit` or `student`. Mortgages are not currently supported in the custom Sandbox.
15 16 17 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 15 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 214 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : nil purchase_apr = hash.key?('purchase_apr') ? hash['purchase_apr'] : nil cash_apr = hash.key?('cash_apr') ? hash['cash_apr'] : nil balance_transfer_apr = hash.key?('balance_transfer_apr') ? hash['balance_transfer_apr'] : nil special_apr = hash.key?('special_apr') ? hash['special_apr'] : nil last_payment_amount = hash.key?('last_payment_amount') ? hash['last_payment_amount'] : nil minimum_payment_amount = hash.key?('minimum_payment_amount') ? hash['minimum_payment_amount'] : nil is_overdue = hash.key?('is_overdue') ? hash['is_overdue'] : nil origination_date = hash.key?('origination_date') ? hash['origination_date'] : nil principal = hash.key?('principal') ? hash['principal'] : nil nominal_apr = hash.key?('nominal_apr') ? hash['nominal_apr'] : nil interest_capitalization_grace_period_months = hash.key?('interest_capitalization_grace_period_months') ? hash['interest_capitalization_grace_period_months'] : nil repayment_model = StudentLoanRepaymentModel.from_hash(hash['repayment_model']) if hash['repayment_model'] expected_payoff_date = hash.key?('expected_payoff_date') ? hash['expected_payoff_date'] : nil guarantor = hash.key?('guarantor') ? hash['guarantor'] : nil is_federal = hash.key?('is_federal') ? hash['is_federal'] : nil loan_name = hash.key?('loan_name') ? hash['loan_name'] : nil loan_status = StudentLoanStatus.from_hash(hash['loan_status']) if hash['loan_status'] payment_reference_number = hash.key?('payment_reference_number') ? hash['payment_reference_number'] : nil pslf_status = PslfStatus.from_hash(hash['pslf_status']) if hash['pslf_status'] repayment_plan_description = hash.key?('repayment_plan_description') ? hash['repayment_plan_description'] : nil repayment_plan_type = hash.key?('repayment_plan_type') ? hash['repayment_plan_type'] : nil sequence_number = hash.key?('sequence_number') ? hash['sequence_number'] : nil servicer_address = Address.from_hash(hash['servicer_address']) if hash['servicer_address'] # 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. LiabilityOverride.new(type: type, purchase_apr: purchase_apr, cash_apr: cash_apr, balance_transfer_apr: balance_transfer_apr, special_apr: special_apr, last_payment_amount: last_payment_amount, minimum_payment_amount: minimum_payment_amount, is_overdue: is_overdue, origination_date: origination_date, principal: principal, nominal_apr: nominal_apr, interest_capitalization_grace_period_months: interest_capitalization_grace_period_months, repayment_model: repayment_model, expected_payoff_date: expected_payoff_date, guarantor: guarantor, is_federal: is_federal, loan_name: loan_name, loan_status: loan_status, payment_reference_number: payment_reference_number, pslf_status: pslf_status, repayment_plan_description: repayment_plan_description, repayment_plan_type: repayment_plan_type, sequence_number: sequence_number, servicer_address: servicer_address, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 133 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['purchase_apr'] = 'purchase_apr' @_hash['cash_apr'] = 'cash_apr' @_hash['balance_transfer_apr'] = 'balance_transfer_apr' @_hash['special_apr'] = 'special_apr' @_hash['last_payment_amount'] = 'last_payment_amount' @_hash['minimum_payment_amount'] = 'minimum_payment_amount' @_hash['is_overdue'] = 'is_overdue' @_hash['origination_date'] = 'origination_date' @_hash['principal'] = 'principal' @_hash['nominal_apr'] = 'nominal_apr' @_hash['interest_capitalization_grace_period_months'] = 'interest_capitalization_grace_period_months' @_hash['repayment_model'] = 'repayment_model' @_hash['expected_payoff_date'] = 'expected_payoff_date' @_hash['guarantor'] = 'guarantor' @_hash['is_federal'] = 'is_federal' @_hash['loan_name'] = 'loan_name' @_hash['loan_status'] = 'loan_status' @_hash['payment_reference_number'] = 'payment_reference_number' @_hash['pslf_status'] = 'pslf_status' @_hash['repayment_plan_description'] = 'repayment_plan_description' @_hash['repayment_plan_type'] = 'repayment_plan_type' @_hash['sequence_number'] = 'sequence_number' @_hash['servicer_address'] = 'servicer_address' @_hash end |
.nullables ⇒ Object
An array for nullable fields
169 170 171 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 169 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
164 165 166 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 164 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 308 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, purchase_apr: #{@purchase_apr.inspect}, cash_apr:"\ " #{@cash_apr.inspect}, balance_transfer_apr: #{@balance_transfer_apr.inspect}, special_apr:"\ " #{@special_apr.inspect}, last_payment_amount: #{@last_payment_amount.inspect},"\ " minimum_payment_amount: #{@minimum_payment_amount.inspect}, is_overdue:"\ " #{@is_overdue.inspect}, origination_date: #{@origination_date.inspect}, principal:"\ " #{@principal.inspect}, nominal_apr: #{@nominal_apr.inspect},"\ ' interest_capitalization_grace_period_months:'\ " #{@interest_capitalization_grace_period_months.inspect}, repayment_model:"\ " #{@repayment_model.inspect}, expected_payoff_date: #{@expected_payoff_date.inspect},"\ " guarantor: #{@guarantor.inspect}, is_federal: #{@is_federal.inspect}, loan_name:"\ " #{@loan_name.inspect}, loan_status: #{@loan_status.inspect}, payment_reference_number:"\ " #{@payment_reference_number.inspect}, pslf_status: #{@pslf_status.inspect},"\ " repayment_plan_description: #{@repayment_plan_description.inspect}, repayment_plan_type:"\ " #{@repayment_plan_type.inspect}, sequence_number: #{@sequence_number.inspect},"\ " servicer_address: #{@servicer_address.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/the_plaid_api/models/liability_override.rb', line 290 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, purchase_apr: #{@purchase_apr}, cash_apr: #{@cash_apr},"\ " balance_transfer_apr: #{@balance_transfer_apr}, special_apr: #{@special_apr},"\ " last_payment_amount: #{@last_payment_amount}, minimum_payment_amount:"\ " #{@minimum_payment_amount}, is_overdue: #{@is_overdue}, origination_date:"\ " #{@origination_date}, principal: #{@principal}, nominal_apr: #{@nominal_apr},"\ ' interest_capitalization_grace_period_months:'\ " #{@interest_capitalization_grace_period_months}, repayment_model: #{@repayment_model},"\ " expected_payoff_date: #{@expected_payoff_date}, guarantor: #{@guarantor}, is_federal:"\ " #{@is_federal}, loan_name: #{@loan_name}, loan_status: #{@loan_status},"\ " payment_reference_number: #{@payment_reference_number}, pslf_status: #{@pslf_status},"\ " repayment_plan_description: #{@repayment_plan_description}, repayment_plan_type:"\ " #{@repayment_plan_type}, sequence_number: #{@sequence_number}, servicer_address:"\ " #{@servicer_address}, additional_properties: #{@additional_properties}>" end |