Class: Oksky::Chat::Object::SupportsResource
- Inherits:
-
Base
- Object
- Base
- Oksky::Chat::Object::SupportsResource
show all
- Defined in:
- lib/oksky/chat/object/supports_resource.rb
Instance Method Summary
collapse
Methods inherited from Base
#[], #initialize
Instance Method Details
#customer_id ⇒ Object
48
49
50
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 48
def customer_id
relationships.dig("customer", "data", "id")
end
|
#end_time_unix ⇒ String<Oksky::Chat::Event::Support>
11
12
13
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 11
def end_time_unix
content_value('end_time_unix')
end
|
6
7
8
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 6
def id
@src.dig("id")
end
|
#latest_message_id ⇒ Object
44
45
46
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 44
def latest_message_id
relationships.dig("latest_message", "data", "id")
end
|
#members ⇒ Array
53
54
55
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 53
def members
relationships.dig("members", "data")
end
|
#relationships ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 28
def relationships
if exist_relationships?
return @src['relationships']
else
{}
end
end
|
40
41
42
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 40
def room_id
relationships.dig("room", "data", "id")
end
|
#start_time_unix ⇒ Hash<Oksky::Chat::Event::Support>
16
17
18
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 16
def start_time_unix
content_value("start_time_unix")
end
|
20
21
22
23
24
25
26
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 20
def support
if @src.has_key?('attributes')
@src['attributes']
else
@src
end
end
|
36
37
38
|
# File 'lib/oksky/chat/object/supports_resource.rb', line 36
def user_id
relationships.dig("user", "data", "id")
end
|