Sha256: 7f0443f2816e74b5b53c9ae6f5c47a1772de92b95eabe186cb5b383652549760
Contents?: true
Size: 984 Bytes
Versions: 81
Compression:
Stored size: 984 Bytes
Contents
# # deviceId string Device ID (36-char UUID) # startAt string The earliest date to include in the results. format: date-time # stopAt string The latest date to include in the results. format: date-time # # Method: devices.register module Alula class DeviceCellularHistoryProc < Alula::RpcResource ONE_DAY = 86_400 class Response < Alula::RpcResponse end def self.call(device_id:, start_at: nil, stop_at: nil) # Helpers to set start/stop if only one is passed seven_days_in_seconds = Alula::DeviceCellularHistoryProc::ONE_DAY * 7 stop_at = start_at + seven_days_in_seconds if stop_at.nil? start_at = stop_at - seven_days_in_seconds if start_at.nil? request( http_method: :post, path: '/rpc/v1/devices/cellular/history/get', payload: { deviceId: device_id, startAt: start_at.utc.iso8601, stopAt: stop_at.utc.iso8601 }, handler: Response ) end end end
Version data entries
81 entries across 81 versions & 1 rubygems