Class: Rubillow::Mortgage
- Inherits:
-
Object
- Object
- Rubillow::Mortgage
- Defined in:
- lib/rubillow/mortgage.rb
Overview
Interface for the Mortgage API.
Read the more about this API at: http://www.zillow.com/howto/api/MortgageAPIOverview.htm
Class Method Summary collapse
-
.monthly_payments(options = {}) ⇒ Models::MonthlyPayments
Retrieve the current monthly payment information for a given loan amount.
-
.rate_summary(options = {}) ⇒ Models::RateSummary
Retrieve the current rates for today and one week ago for each loan type.
Class Method Details
.monthly_payments(options = {}) ⇒ Models::MonthlyPayments
Retrieve the current monthly payment information for a given loan amount
Read more at: http://www.zillow.com/howto/api/GetMonthlyPayments.htm.
* Either the down or dollars down options are required.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/rubillow/mortgage.rb', line 55 def self.monthly_payments( = {}) = { :zws_id => Rubillow.configuration.zwsid, :price => nil, :down => nil, :dollarsdown => nil, :zip => nil, }.merge!() [:output] = 'xml' if [:price].nil? raise ArgumentError, "The price option is required" end if [:down].nil? && [:dollarsdown].nil? raise ArgumentError, "Either the down or dollarsdown option is required" end Models::MonthlyPayments.new(Rubillow::Request.get("GetMonthlyPayments", )) end |
.rate_summary(options = {}) ⇒ Models::RateSummary
Retrieve the current rates for today and one week ago for each loan type.
Read more at: http://www.zillow.com/howto/api/GetRateSummary.htm.
22 23 24 25 26 27 28 29 30 |
# File 'lib/rubillow/mortgage.rb', line 22 def self.rate_summary( = {}) = { :zws_id => Rubillow.configuration.zwsid, :state => nil, }.merge!() [:output] = 'xml' Models::RateSummary.new(Rubillow::Request.get("GetRateSummary", )) end |