Class: DjiMqttConnect::Thing::Product::FlighttaskUndoServicesMessage

Inherits:
ServicesMessage show all
Defined in:
lib/dji_mqtt_connect/messages/thing/product/services/flighttask_undo.rb

Overview

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ServicesMessage

#humanized_summary

Methods inherited from Message

current_timestamp, generate_bid, generate_tid, #to_s

Class Method Details

.build(flight_ids:, bid: generate_bid, tid: generate_tid, timestamp: current_timestamp) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dji_mqtt_connect/messages/thing/product/services/flighttask_undo.rb', line 8

def self.build(flight_ids:, bid: generate_bid, tid: generate_tid, timestamp: current_timestamp)
  new(
    bid: bid,
    tid: tid,
    timestamp: timestamp,
    _method: "flighttask_undo",
    data: {
      flight_ids: flight_ids
    }
  )
end

Instance Method Details

#flight_idsObject

All the flight IDs in the message



27
28
29
# File 'lib/dji_mqtt_connect/messages/thing/product/services/flighttask_undo.rb', line 27

def flight_ids
  data.flight_ids
end

#humanized_summary_interpolationObject



31
32
33
34
35
# File 'lib/dji_mqtt_connect/messages/thing/product/services/flighttask_undo.rb', line 31

def humanized_summary_interpolation
  super.merge(
    flight_ids: flight_ids.join(", ")
  )
end