Class: Onfleet::Destinations
- Inherits:
-
Object
- Object
- Onfleet::Destinations
- Defined in:
- lib/resources/destinations.rb
Overview
Destinations represent the location details for tasks, including exact coordinate and address information.
Instance Method Summary collapse
- #create(config, body) ⇒ Object
- #get(config, id) ⇒ Object
-
#match_metadata(config, body) ⇒ Object
ACTION: still needs to be tested.
Instance Method Details
#create(config, body) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/resources/destinations.rb', line 6 def create(config, body) method = 'post' path = 'destinations' Onfleet.request(config, method.to_sym, path, body.to_json) end |
#get(config, id) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/resources/destinations.rb', line 13 def get(config, id) method = 'get' path = "destinations/#{id}" Onfleet.request(config, method.to_sym, path) end |
#match_metadata(config, body) ⇒ Object
ACTION: still needs to be tested
21 22 23 24 25 26 |
# File 'lib/resources/destinations.rb', line 21 def (config, body) method = 'post' path = 'destinations/metadata' Onfleet.request(config, method.to_sym, path, body.to_json) end |