Class: ThePlaidApi::PslfStatus
- Defined in:
- lib/the_plaid_api/models/pslf_status.rb
Overview
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.
Instance Attribute Summary collapse
-
#estimated_eligibility_date ⇒ Date
The estimated date borrower will have completed 120 qualifying monthly payments.
-
#payments_made ⇒ Integer
The number of qualifying payments that have been made.
-
#payments_remaining ⇒ Integer
The number of qualifying payments remaining.
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(estimated_eligibility_date:, payments_made:, payments_remaining:, additional_properties: nil) ⇒ PslfStatus
constructor
A new instance of PslfStatus.
-
#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(estimated_eligibility_date:, payments_made:, payments_remaining:, additional_properties: nil) ⇒ PslfStatus
Returns a new instance of PslfStatus.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 52 def initialize(estimated_eligibility_date:, payments_made:, payments_remaining:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @estimated_eligibility_date = estimated_eligibility_date @payments_made = payments_made @payments_remaining = payments_remaining @additional_properties = additional_properties end |
Instance Attribute Details
#estimated_eligibility_date ⇒ Date
The estimated date borrower will have completed 120 qualifying monthly payments. Returned in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD).
19 20 21 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 19 def estimated_eligibility_date @estimated_eligibility_date end |
#payments_made ⇒ Integer
The number of qualifying payments that have been made.
23 24 25 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 23 def payments_made @payments_made end |
#payments_remaining ⇒ Integer
The number of qualifying payments remaining.
27 28 29 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 27 def payments_remaining @payments_remaining end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. estimated_eligibility_date = hash.key?('estimated_eligibility_date') ? hash['estimated_eligibility_date'] : nil payments_made = hash.key?('payments_made') ? hash['payments_made'] : nil payments_remaining = hash.key?('payments_remaining') ? hash['payments_remaining'] : 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. PslfStatus.new(estimated_eligibility_date: estimated_eligibility_date, payments_made: payments_made, payments_remaining: payments_remaining, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['estimated_eligibility_date'] = 'estimated_eligibility_date' @_hash['payments_made'] = 'payments_made' @_hash['payments_remaining'] = 'payments_remaining' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 44 def self.nullables %w[ estimated_eligibility_date payments_made payments_remaining ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 39 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} estimated_eligibility_date: #{@estimated_eligibility_date.inspect},"\ " payments_made: #{@payments_made.inspect}, payments_remaining:"\ " #{@payments_remaining.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/pslf_status.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} estimated_eligibility_date: #{@estimated_eligibility_date}, payments_made:"\ " #{@payments_made}, payments_remaining: #{@payments_remaining}, additional_properties:"\ " #{@additional_properties}>" end |