Class: Harnex::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/harnex/runtime/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delivered_atObject

Returns the value of attribute delivered_at

Returns:

  • (Object)

    the current value of delivered_at



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def delivered_at
  @delivered_at
end

#enter_onlyObject

Returns the value of attribute enter_only

Returns:

  • (Object)

    the current value of enter_only



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def enter_only
  @enter_only
end

#errorObject

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def error
  @error
end

#forceObject

Returns the value of attribute force

Returns:

  • (Object)

    the current value of force



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def force
  @force
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def id
  @id
end

#queued_atObject

Returns the value of attribute queued_at

Returns:

  • (Object)

    the current value of queued_at



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def queued_at
  @queued_at
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def status
  @status
end

#submitObject

Returns the value of attribute submit

Returns:

  • (Object)

    the current value of submit



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def submit
  @submit
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



2
3
4
# File 'lib/harnex/runtime/message.rb', line 2

def text
  @text
end

Instance Method Details

#to_hObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/harnex/runtime/message.rb', line 3

def to_h
  {
    id: id,
    status: status.to_s,
    queued_at: queued_at&.iso8601,
    delivered_at: delivered_at&.iso8601,
    text_preview: preview_text,
    error: error
  }
end