Class: Hopo::AutoRater

Inherits:
Rater show all
Defined in:
lib/hopo/rater/auto_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') ⇒ AutoRater

Returns a new instance of AutoRater.



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

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

Instance Method Details

#optional_fields?Boolean

Returns:

  • (Boolean)


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

def optional_fields?
  {
    :num_vehicles => 'Number representing the total count of vehicles',
    :num_drivers => 'Number representing the total number of drivers'
  }
end

#required_fields?Boolean

Returns:

  • (Boolean)


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

def required_fields?
  {
    :zip => 'Five diging Zip Code for location',
    :model_year => 'Not Required - defaults to 2012',
    :make => 'Not Required - defaults to Toyota',
    :model => 'Not Required - defaults to Camry'
  }
end