Class: HyperTrack::Action
- Inherits:
-
SharedResource
- Object
- SharedResource
- HyperTrack::Action
- Includes:
- HyperTrack::ApiOperations::ActionAPI
- Defined in:
- lib/hypertrack/resources/action.rb
Constant Summary collapse
- API_BASE_PATH =
"actions/"- REQUIRED_FIELDS =
[]
- VALID_ATTRIBUTE_VALUES =
{ type: { allowed: [:pickup, :delivery, :dropoff, :visit, :stoppver, :task], allow_nil: true }, vehicle_type: { allowed: HyperTrack::SharedResource::VALID_VEHICLE_TYPES, allow_nil: true } }
Constants inherited from SharedResource
SharedResource::VALID_VEHICLE_TYPES
Instance Attribute Summary
Attributes inherited from SharedResource
Class Method Summary collapse
Methods included from HyperTrack::ApiOperations::ActionAPI
#cancel, #complete, #meter, #mileage
Methods inherited from SharedResource
#[], #[]=, get_class_name, #initialize, #keys, #to_json, #values
Methods included from HyperTrack::ApiOperations::Common::Create
Methods included from HyperTrack::ApiOperations::Common::Retrieve
Methods included from HyperTrack::ApiOperations::Common::List
Methods included from HyperTrack::ApiOperations::Common::Nearby
Methods included from HyperTrack::ApiOperations::Common::RetrieveByUniqueId
Methods included from HyperTrack::ApiOperations::Common::Update
Methods included from HyperTrack::ApiOperations::Common::Get
Methods included from HyperTrack::ApiOperations::Common::Patch
Constructor Details
This class inherits a constructor from HyperTrack::SharedResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HyperTrack::SharedResource
Class Method Details
.placeline(filter_params = {}) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/hypertrack/resources/action.rb', line 19 def self.placeline(filter_params={}) api_result = HyperTrack::ApiClient.fetch(get_class_name::API_BASE_PATH, filter_params) api_result['results'].each_with_index do |opts, idx| api_result['results'][idx] = get_class_name.new(opts['id'], opts) end api_result['results'] end |