Sha256: ac5739ac40469be1ddb6cc84553ae5be9e6d785691c02344a1071bc5692bdda8
Contents?: true
Size: 1.26 KB
Versions: 81
Compression:
Stored size: 1.26 KB
Contents
module Alula class DeviceSignalAddProc < Alula::RpcResource class Response < Alula::RpcResponse def initialize(response) super(response) # # This RPC response gives a new EventLog item data = response.data['result']['data'][0] @data = Alula::DeviceEventLog.new(data['id'], data['attributes']) end end def self.call(action:, customer_id:, dealer_id:, device_id:, group_id:, log_format:, mac:, relay_status:, signal_account_number:, signal_event_code:, signal_event_qualifier:, signal_partition:, signal_user_zone:, sn:) payload = { action: action, customerId: customer_id, dealerId: dealer_id, deviceId: device_id, groupId: group_id, logFormat: log_format, mac: mac, relayStatus: relay_status, signalAccountNumber: signal_account_number, signalEventCode: signal_event_code, signalEventQualifier: signal_event_qualifier, signalPartition: signal_partition, signalUserZone: signal_user_zone, sn: sn, } request( http_method: :post, path: '/rpc/v1/devices/signal/add', payload: payload, handler: Response ) end end end
Version data entries
81 entries across 81 versions & 1 rubygems