Constructor
    
    
    new Payoff(setup)
    
    
    Parameters:
    
    
    
        
        | Name | Type | Description | 
    
    
    
        
            
                | setup | object | A hash of available setup parameters. | 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
- See:
- 
        
            - Payoff#update for the available properties passed through to the initial loan setup.
 
 
    
    
    
    
    
    
    
        Members
        
            
(static, readonly) payments :array
    The list of supplemental payments that have been added to the loan.
    Type:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
Methods
        
            
    
    
    addPayment(payment)
    
    
    Add a supplemental payment to the loan.
    Parameters:
    
    
    
        
        | Name | Type | Description | 
    
    
    
        
            
                | payment | object | A hash of payment parameters. Properties
    
    
        
        | Name | Type | Attributes | Default | Description |  
            
                | amount | number |  |  | The amount of extra principal being paid |  
            
                | month | number |  |  | The month of the extra payment |  
            
                | year | number |  |  | The year of the extra payment |  
            
                | recurring | boolean | <optional> 
 | false | Whether it's a single-time or recurring payment |  
            
                | endMonth | number | <optional> 
 |  | The last month of the recurring payment |  
            
                | endYear | number | <optional> 
 |  | The last year of the recurring payment |  | 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
removePayment(options)
    
    
    Remove a supplemental payment from the loan.
    Parameters:
    
    
    
        
        | Name | Type | Description | 
    
    
    
        
            
                | options | object | A hash of option parameters Properties
    
    
        
        | Name | Type | Description |  
            
                | id | number | The id of the payment to remove |  | 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
update(terms)
    
    
    Recalculate the payoff properties and amortization table.
    Parameters:
    
    
    
        
        | Name | Type | Description | 
    
    
    
        
            
                | terms | object | A hash of loan parameters. Used to define/update the basic terms of a loan. Properties
    
    
        
        | Name | Type | Description |  
            
                | amount | number | The total amount being borrowed. |  
            
                | duration | integer | The number of months the loan is spread over. |  
            
                | rate | number | The annual interest rate of the loan (ex. 0.05 for 5% APR). |  
            
                | startMonth | integer | The month the loan begins (indexed 1-12). |  
            
                | startYear | integer | The year the loan begins. |  | 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source: