Class: Oksky::Chat::Object::SupportDraftMessageResource

Inherits:
Base
  • Object
show all
Defined in:
lib/oksky/chat/object/support_draft_messages_resource.rb

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize

Constructor Details

This class inherits a constructor from Oksky::Chat::Object::Base

Instance Method Details

#commentObject



33
34
35
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 33

def comment
  content_value("comment")
end

#create_user_resolved_read_time_unixObject



37
38
39
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 37

def create_user_resolved_read_time_unix
  content_value("create_user_resolved_read_time_unix")
end

#created_at_unixObject



41
42
43
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 41

def created_at_unix
  content_value("created_at_unix")
end

#created_user_idObject



73
74
75
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 73

def created_user_id
  relationships.dig("created_user", "data", "id")
end

#idObject



6
7
8
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 6

def id
  @src.dig("id")
end

#kindObject



14
15
16
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 14

def kind
  content_value("kind")
end

#message_contentObject



10
11
12
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 10

def message_content
  content_value("message_content")
end

#relationshipsObject



57
58
59
60
61
62
63
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 57

def relationships
  if exist_relationships?
    return @src['relationships']
  else
    {}
  end
end

#resolved_time_unixObject



29
30
31
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 29

def resolved_time_unix
  content_value("resolved_time_unix")
end

#resolved_user_idObject



69
70
71
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 69

def resolved_user_id
  relationships.dig("resolved_user", "data", "id")
end

#room_idObject



77
78
79
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 77

def room_id
  relationships.dig("room", "data", "id")
end

#settingsHash

Returns:

  • (Hash)


19
20
21
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 19

def settings
  content_value("settings")
end

#statusString

in_review

Returns:

  • (String)


25
26
27
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 25

def status
  content_value("status")
end

#support_draft_messageObject



49
50
51
52
53
54
55
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 49

def support_draft_message
  if @src.has_key?('attributes')
    @src['attributes']
  else
    @src
  end
end

#support_idObject



65
66
67
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 65

def support_id
  relationships.dig("support", "data", "id")
end

#updated_at_unixObject



45
46
47
# File 'lib/oksky/chat/object/support_draft_messages_resource.rb', line 45

def updated_at_unix
  content_value("updated_at_unix")
end