Class: FdxV660Api::PaymentDetailsEntity4
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::PaymentDetailsEntity4
- Defined in:
- lib/fdx_v660_api/models/payment_details_entity4.rb
Overview
Payment details
Instance Attribute Summary collapse
-
#escrow_amount ⇒ Float
The amount of payment applied to escrow.
-
#fees_amount ⇒ Float
The amount of payment applied to fees.
-
#insurance_amount ⇒ Float
The amount of payment applied to life/health/accident insurance on the loan.
-
#interest_amount ⇒ Float
The amount of payment applied to interest.
-
#pmi_amount ⇒ Float
The amount of payment applied to PMI.
-
#principal_amount ⇒ Float
The amount of payment applied to principal.
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(principal_amount: SKIP, interest_amount: SKIP, insurance_amount: SKIP, escrow_amount: SKIP, pmi_amount: SKIP, fees_amount: SKIP, additional_properties: nil) ⇒ PaymentDetailsEntity4
constructor
A new instance of PaymentDetailsEntity4.
-
#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(principal_amount: SKIP, interest_amount: SKIP, insurance_amount: SKIP, escrow_amount: SKIP, pmi_amount: SKIP, fees_amount: SKIP, additional_properties: nil) ⇒ PaymentDetailsEntity4
Returns a new instance of PaymentDetailsEntity4.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 66 def initialize(principal_amount: SKIP, interest_amount: SKIP, insurance_amount: SKIP, escrow_amount: SKIP, pmi_amount: SKIP, fees_amount: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @principal_amount = principal_amount unless principal_amount == SKIP @interest_amount = interest_amount unless interest_amount == SKIP @insurance_amount = insurance_amount unless insurance_amount == SKIP @escrow_amount = escrow_amount unless escrow_amount == SKIP @pmi_amount = pmi_amount unless pmi_amount == SKIP @fees_amount = fees_amount unless fees_amount == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#escrow_amount ⇒ Float
The amount of payment applied to escrow
27 28 29 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 27 def escrow_amount @escrow_amount end |
#fees_amount ⇒ Float
The amount of payment applied to fees
35 36 37 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 35 def fees_amount @fees_amount end |
#insurance_amount ⇒ Float
The amount of payment applied to life/health/accident insurance on the loan
23 24 25 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 23 def insurance_amount @insurance_amount end |
#interest_amount ⇒ Float
The amount of payment applied to interest
18 19 20 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 18 def interest_amount @interest_amount end |
#pmi_amount ⇒ Float
The amount of payment applied to PMI
31 32 33 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 31 def pmi_amount @pmi_amount end |
#principal_amount ⇒ Float
The amount of payment applied to principal
14 15 16 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 14 def principal_amount @principal_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. principal_amount = hash.key?('principalAmount') ? hash['principalAmount'] : SKIP interest_amount = hash.key?('interestAmount') ? hash['interestAmount'] : SKIP insurance_amount = hash.key?('insuranceAmount') ? hash['insuranceAmount'] : SKIP escrow_amount = hash.key?('escrowAmount') ? hash['escrowAmount'] : SKIP pmi_amount = hash.key?('pmiAmount') ? hash['pmiAmount'] : SKIP fees_amount = hash.key?('feesAmount') ? hash['feesAmount'] : SKIP # 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. PaymentDetailsEntity4.new(principal_amount: principal_amount, interest_amount: interest_amount, insurance_amount: insurance_amount, escrow_amount: escrow_amount, pmi_amount: pmi_amount, fees_amount: fees_amount, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['principal_amount'] = 'principalAmount' @_hash['interest_amount'] = 'interestAmount' @_hash['insurance_amount'] = 'insuranceAmount' @_hash['escrow_amount'] = 'escrowAmount' @_hash['pmi_amount'] = 'pmiAmount' @_hash['fees_amount'] = 'feesAmount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 50 def self.optionals %w[ principal_amount interest_amount insurance_amount escrow_amount pmi_amount fees_amount ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
124 125 126 127 128 129 130 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 124 def inspect class_name = self.class.name.split('::').last "<#{class_name} principal_amount: #{@principal_amount.inspect}, interest_amount:"\ " #{@interest_amount.inspect}, insurance_amount: #{@insurance_amount.inspect},"\ " escrow_amount: #{@escrow_amount.inspect}, pmi_amount: #{@pmi_amount.inspect}, fees_amount:"\ " #{@fees_amount.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
115 116 117 118 119 120 121 |
# File 'lib/fdx_v660_api/models/payment_details_entity4.rb', line 115 def to_s class_name = self.class.name.split('::').last "<#{class_name} principal_amount: #{@principal_amount}, interest_amount:"\ " #{@interest_amount}, insurance_amount: #{@insurance_amount}, escrow_amount:"\ " #{@escrow_amount}, pmi_amount: #{@pmi_amount}, fees_amount: #{@fees_amount},"\ " additional_properties: #{@additional_properties}>" end |