Class: Shutl::Quote

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/shutl/quote.rb

Class Method Summary collapse

Class Method Details

.get(options) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/shutl/quote.rb', line 13

def get options
  pickup_postcode, delivery_postcode, vehicle = parse options

  response = post( '/quotes/', body:
                  {
    pickup_postcode:   pickup_postcode,
    delivery_postcode: delivery_postcode,
    vehicle:           vehicle,
    store_id:          1
  })

  handle response
end