apiverve_loanpaymentcalculator 1.2.3 → 1.2.5
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 +4 -4
- data/README.md +52 -6
- data/lib/apiverve_loanpaymentcalculator/client.rb +2 -2
- data/lib/apiverve_loanpaymentcalculator.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a840e8b33dddb6529cf4a1512da0f296c31a5f04934dabe504417fe7973072ce
|
|
4
|
+
data.tar.gz: e4f20ff34885cd6ff9ac86128d44abffdd86ec5e6e1c6a5888b8540d1ce11efb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16e821ae9f4719a67e4fe993eeca48d6d29ecf2510b449a61ac3876a4ee5e31a29f37b183c8f8dd1f3c3f34e36d77fedce3ff11a33f35940913c47d0ec597bf0
|
|
7
|
+
data.tar.gz: 732e8a3c42905ac416b91804d891f89677bc0adc013d99a519cac30be827da7140609e46aaa34165419fa4d33208cc5092d0189fa0f58a179d523dbb5ed89a49
|
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.
|
|
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.
|
|
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 }, '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 = {
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_loanpaymentcalculator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- APIVerve
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -61,7 +60,9 @@ dependencies:
|
|
|
61
60
|
description: Loan Calculator is a payment calculation API that computes monthly loan
|
|
62
61
|
payments, total interest, and overall loan costs based on principal, annual interest
|
|
63
62
|
rate, and term length. Include an optional down payment to determine adjusted financing
|
|
64
|
-
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.
|
|
65
66
|
email:
|
|
66
67
|
- hello@apiverve.com
|
|
67
68
|
executables: []
|
|
@@ -80,7 +81,6 @@ metadata:
|
|
|
80
81
|
source_code_uri: https://github.com/apiverve/loanpaymentcalculator-API/tree/main/ruby
|
|
81
82
|
changelog_uri: https://apiverve.com/changelog
|
|
82
83
|
documentation_uri: https://docs.apiverve.com/ref/loanpaymentcalculator
|
|
83
|
-
post_install_message:
|
|
84
84
|
rdoc_options: []
|
|
85
85
|
require_paths:
|
|
86
86
|
- lib
|
|
@@ -95,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
requirements: []
|
|
98
|
-
rubygems_version:
|
|
99
|
-
signing_key:
|
|
98
|
+
rubygems_version: 4.0.23
|
|
100
99
|
specification_version: 4
|
|
101
100
|
summary: Loan Calculator API - Ruby Client
|
|
102
101
|
test_files: []
|