apiverve_loanpaymentcalculator 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7a1819f07570465bbb946d4f0146a5f3403ce59d8457b50f41edf9257bf82af
4
- data.tar.gz: 74eba5f6253ca273d8c6bc965c2f945166df645b4126a845cd33d5f8a8d58dc1
3
+ metadata.gz: c3691a6e9fdbbea25b7a51391ff9e27b53bee41eedf29a081cdb077e751b198f
4
+ data.tar.gz: 721e6934a044b46536317a27ae6c498f5938472d4cc07b504af08143eca4f408
5
5
  SHA512:
6
- metadata.gz: 026d024ff0d165406e089e2da437fea9196f11fc9b3e52a596229e2114513d803b120aa36d28c7e2fe5536b02f7ec0ffb6a2f0e5eeacdb841a6e233e1484aa48
7
- data.tar.gz: f84a47f00ee562546458680991ad756f0dd0d3559d349cec0a8b80268467b478eebec2f9e96bf12bd6154c14a07311ae4714bb452106808cd299016c92fb6840
6
+ metadata.gz: fe35ac1a551fee02c970370e9436d571285b1c0e5b39d20cfcb1448a7d108260b67ca8d2103948aa52698ae2008147ff6997af2d8acf4046bba977bf3a8b7f20
7
+ data.tar.gz: 17c23603bec84b9691daf6e0c68faf6d1bc115fad2789807424f8db57400b42e42168ca2a8d7b47c0c2d2807d77e1d04131b67d2173faefb57ed222ed1e554c1
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Loan Calculator API - Ruby Gem
2
2
 
3
- Loan Calculator is a payment calculation API that computes monthly loan payments, total interest, and overall loan costs based on principal, annual interest rate, and term length. Include an optional down payment to determine adjusted financing balances and interest ratios.
3
+ Loan Calculator is a payment calculation API that computes monthly loan payments, total interest, and overall loan costs based on principal, annual interest rate, and term length. Include an optional down payment to determine adjusted financing balances and interest ratios. On paid plans, optional inputs add an extra-payment payoff plan with months and interest saved, payoff dates from a start date, biweekly or weekly payment figures, and an APR that includes upfront fees.
4
4
 
5
5
  ## Installation
6
6
 
@@ -38,7 +38,11 @@ client = APIVerve::Loanpaymentcalculator::Client.new(api_key: "YOUR_API_KEY")
38
38
  response = client.execute({
39
39
  loanAmount: 32000,
40
40
  interestRate: 8.5,
41
- loanTerm: 6
41
+ loanTerm: 6,
42
+ extraPayment: 100,
43
+ startDate: "2026-12-01",
44
+ paymentFrequency: "biweekly",
45
+ fees: 800
42
46
  })
43
47
 
44
48
  # Print the response
@@ -50,7 +54,7 @@ puts response
50
54
 
51
55
  ```ruby
52
56
  begin
53
- response = client.execute({ loanAmount: 32000, interestRate: 8.5, loanTerm: 6 })
57
+ response = client.execute({ loanAmount: 32000, interestRate: 8.5, loanTerm: 6, extraPayment: 100, startDate: "2026-12-01", paymentFrequency: "biweekly", fees: 800 })
54
58
  puts response["data"]
55
59
  rescue APIVerve::Loanpaymentcalculator::ValidationError => e
56
60
  puts "Validation error: #{e.errors.join(', ')}"
@@ -83,13 +87,13 @@ client = APIVerve::Loanpaymentcalculator::Client.new(
83
87
  "loanTerm": 6,
84
88
  "monthly_payment": 568.91,
85
89
  "total_interest_paid": 8961.4,
86
- "total_payment": 40961.52,
90
+ "total_payment": 40961.4,
87
91
  "interestRatio": 21.88,
88
92
  "formatted": {
89
93
  "loanAmount": "$32,000.00",
90
94
  "monthlyPayment": "$568.91",
91
95
  "totalInterestPaid": "$8,961.40",
92
- "totalPayment": "$40,961.52"
96
+ "totalPayment": "$40,961.40"
93
97
  },
94
98
  "amortization_schedule": [
95
99
  {
@@ -110,7 +114,49 @@ client = APIVerve::Loanpaymentcalculator::Client.new(
110
114
  "principal_payment": 347.11,
111
115
  "remaining_balance": 30965.99
112
116
  }
113
- ]
117
+ ],
118
+ "payoff_date": "2032-12-01",
119
+ "extra_payment": {
120
+ "extra_monthly_payment": 100,
121
+ "monthly_payment": 668.91,
122
+ "payoff_months": 59,
123
+ "months_saved": 13,
124
+ "total_interest_paid": 7214.73,
125
+ "total_payment": 39214.73,
126
+ "interest_saved": 1746.67,
127
+ "payoff_date": "2031-11-01",
128
+ "amortization_schedule": [
129
+ {
130
+ "month": 1,
131
+ "interest_payment": 226.67,
132
+ "principal_payment": 442.24,
133
+ "remaining_balance": 31557.76
134
+ },
135
+ {
136
+ "month": 2,
137
+ "interest_payment": 223.53,
138
+ "principal_payment": 445.37,
139
+ "remaining_balance": 31112.38
140
+ },
141
+ {
142
+ "month": 3,
143
+ "interest_payment": 220.38,
144
+ "principal_payment": 448.53,
145
+ "remaining_balance": 30663.86
146
+ }
147
+ ]
148
+ },
149
+ "payment_frequency": {
150
+ "frequency": "biweekly",
151
+ "payments_per_year": 26,
152
+ "number_of_payments": 156,
153
+ "payment": 262.19,
154
+ "total_interest_paid": 8901.77,
155
+ "total_payment": 40901.77,
156
+ "interest_saved": 59.62
157
+ },
158
+ "fees": 800,
159
+ "apr": 9.419
114
160
  }
115
161
  }
116
162
  ```
@@ -10,7 +10,7 @@ module APIVerve
10
10
  #
11
11
  # @example Basic usage
12
12
  # client = APIVerve::Loanpaymentcalculator::Client.new(api_key: "your_api_key")
13
- # response = client.execute({ loanAmount: 32000, interestRate: 8.5, loanTerm: 6 })
13
+ # response = client.execute({ loanAmount: 32000, interestRate: 8.5, loanTerm: 6, extraPayment: 100, startDate: "2026-12-01", paymentFrequency: "biweekly", fees: 800 })
14
14
  # puts response
15
15
  #
16
16
  # @see https://apiverve.com/marketplace/loanpaymentcalculator?utm_source=ruby&utm_medium=referral&utm_content=readme
@@ -19,7 +19,7 @@ module APIVerve
19
19
  DEFAULT_TIMEOUT = 30
20
20
 
21
21
  # Validation rules for parameters
22
- VALIDATION_RULES = { 'loanAmount' => { type: 'number', required: true, min: 0 }, 'interestRate' => { type: 'number', required: true, min: 0, max: 100 }, 'loanTerm' => { type: 'integer', required: true, min: 1, max: 50 }, 'downpayment' => { type: 'number', required: false, min: 0 } }
22
+ VALIDATION_RULES = { 'loanAmount' => { type: 'number', required: true, min: 0, max: 1000000000000 }, 'interestRate' => { type: 'number', required: true, min: 0, max: 100 }, 'loanTerm' => { type: 'integer', required: true, min: 1, max: 50 }, 'downpayment' => { type: 'number', required: false, min: 0 }, 'extraPayment' => { type: 'number', required: false, min: 0 }, 'startDate' => { type: 'string', required: false, format: 'date' }, 'paymentFrequency' => { type: 'string', required: false }, 'fees' => { type: 'number', required: false, min: 0 } }
23
23
 
24
24
  # Format validation patterns
25
25
  FORMAT_PATTERNS = {
@@ -4,6 +4,6 @@ require_relative "apiverve_loanpaymentcalculator/client"
4
4
 
5
5
  module APIVerve
6
6
  module Loanpaymentcalculator
7
- VERSION = "1.2.4"
7
+ VERSION = "1.2.6"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_loanpaymentcalculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
@@ -60,7 +60,9 @@ dependencies:
60
60
  description: Loan Calculator is a payment calculation API that computes monthly loan
61
61
  payments, total interest, and overall loan costs based on principal, annual interest
62
62
  rate, and term length. Include an optional down payment to determine adjusted financing
63
- balances and interest ratios.
63
+ balances and interest ratios. On paid plans, optional inputs add an extra-payment
64
+ payoff plan with months and interest saved, payoff dates from a start date, biweekly
65
+ or weekly payment figures, and an APR that includes upfront fees.
64
66
  email:
65
67
  - hello@apiverve.com
66
68
  executables: []