Class: CycloneLariat::Messages::V2::Command
- Inherits:
-
Abstract
- Object
- LunaPark::Entities::Attributable
- Abstract
- CycloneLariat::Messages::V2::Command
show all
- Defined in:
- lib/cyclone_lariat/messages/v2/command.rb
Constant Summary
collapse
- KIND =
'command'
Instance Method Summary
collapse
Methods inherited from Abstract
#==, #client_error_details=, #client_error_message=, #data, #deduplication_id=, #fifo?, #group_id=, #params, #processed?, #processed_at=, #received_at=, #request_id=, #sent_at=, #to_json, #validation, #version=
Instance Method Details
#kind ⇒ Object
16
17
18
|
# File 'lib/cyclone_lariat/messages/v2/command.rb', line 16
def kind
KIND
end
|
#object ⇒ Object
38
39
40
|
# File 'lib/cyclone_lariat/messages/v2/command.rb', line 38
def object
@object ||= {}
end
|
#serialize ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/cyclone_lariat/messages/v2/command.rb', line 20
def serialize
{
uuid: uuid,
publisher: publisher,
type: [kind, type].join('_'),
version: version,
data: data,
request_id: request_id,
sent_at: sent_at&.iso8601(3),
subject: subject,
object: object
}.compact
end
|
#subject ⇒ Object
34
35
36
|
# File 'lib/cyclone_lariat/messages/v2/command.rb', line 34
def subject
@subject ||= {}
end
|