class Radar::Trip
Constants
- RESOURCE_NAME
Public Class Methods
all(params: nil)
click to toggle source
# File lib/radar/trip.rb, line 5 def self.all(params: nil) path = resource_base_path response = api_client.get(path, params: params) api_client.parsed_response(response, object_class: self) end
restart(id:)
click to toggle source
# File lib/radar/trip.rb, line 15 def self.restart(id:) path = [resource_base_path, id].join('/') response = api_client.patch(path, params: { status: 'started' }) api_client.parsed_response(response, object_class: self) end
start(params:)
click to toggle source
# File lib/radar/trip.rb, line 11 def self.start(params:) Radar::Track.create(params: params) end
stop(id:)
click to toggle source
# File lib/radar/trip.rb, line 21 def self.stop(id:) path = [resource_base_path, id].join('/') response = api_client.patch(path, params: { status: 'canceled' }) api_client.parsed_response(response, object_class: self) end