Class: Hopo::HomeRater

Inherits:
Rater show all
Defined in:
lib/hopo/rater/home_rater.rb

Constant Summary

Constants inherited from Rater

Rater::API_PATH, Rater::API_VERSION, Rater::BASE_URL

Instance Attribute Summary

Attributes inherited from Rater

#line, #premium_mode, #sorter

Attributes inherited from API

#default_params, #http, #path, #ssl, #uri, #url

Instance Method Summary collapse

Methods included from Utils::Sorter

#sort_rates

Methods included from Utils::Calculator

#factor_rates

Methods inherited from API

#full_path, #params, #params=

Methods included from Connections::Response

included

Methods included from Connections::Request

#delete, #get, included, #patch, #post, #put

Constructor Details

#initialize(premium_mode = 'annually', sorter = 'premium-asc') ⇒ HomeRater

Returns a new instance of HomeRater.



4
5
6
# File 'lib/hopo/rater/home_rater.rb', line 4

def initialize(premium_mode='annually', sorter='premium-asc')
  super('home', premium_mode, sorter)
end

Instance Method Details

#optional_fields?Boolean

Returns:

  • (Boolean)


17
18
19
20
21
22
23
# File 'lib/hopo/rater/home_rater.rb', line 17

def optional_fields?
  {
    :test1 => 'test 1',
    :test2 => 'test 2',
    :test3 => 'test 3'
  }
end

#required_fields?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
15
# File 'lib/hopo/rater/home_rater.rb', line 8

def required_fields?
  {
    :zip => 'Five diging Zip Code for location',
    :cov_a => 'The Coverage Amount for the Home - Minimum 10000',
    :year_built => 'Year Home was built - 1800 to 2014',
    :construction_type => 'Material used for Home - [Frame, Masonry, Adobe, Log]'
  }
end