Class: Qismo::WebhookRequests::OnCustomChannelMessageSent

Inherits:
Object
  • Object
show all
Defined in:
lib/qismo/webhook_requests/on_custom_channel_message_sent.rb

Overview

Custom channel webhook object

Defined Under Namespace

Classes: From, Message, Participant, Payload, Room

Constant Summary

Constants included from Types

Types::Bool, Types::Hash, Types::Int, Types::String

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

from_array

Instance Attribute Details

#payloadPayload (readonly)

Returns:



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/qismo/webhook_requests/on_custom_channel_message_sent.rb', line 7

class OnCustomChannelMessageSent < Qismo::Object
  # Custom channel webhook from object
  #
  # @!attribute [r] avatar_url
  #   @return [String]
  # @!attribute [r] email
  #   @return [String]
  # @!attribute [r] id
  #   @return [Integer]
  # @!attribute [r] name
  #   @return [String]
  class From < Qismo::Object
    attribute? :avatar_url, Types::String.optional
    attribute? :email, Types::String.optional
    attribute? :id, Types::Int.optional
    attribute? :name, Types::String.optional
  end

  # Custom channel webhook message object
  #
  # @!attribute [r] comment_before_id
  #   @return [Integer]
  # @!attribute [r] created_at
  #   @return [String]
  # @!attribute [r] id
  #   @return [Integer]
  # @!attribute [r] payload
  #   @return [Hash]
  # @!attribute [r] text
  #   @return [String]
  # @!attribute [r] timestamp
  #   @return [String]
  # @!attribute [r] type
  #   @return [String]
  # @!attribute [r] unique_temp_id
  #   @return [String]
  # @!attribute [r] unix_nano_timestamp
  #   @return [String]
  # @!attribute [r] unix_timestamp
  #   @return [String]
  class Message < Qismo::Object
    attribute? :comment_before_id, Types::Int.optional
    attribute? :created_at, Types::String.optional
    attribute? :id, Types::Int.optional
    attribute? :payload, Types::Hash.optional
    attribute? :text, Types::String.optional
    attribute? :timestamp, Types::String.optional
    attribute? :type, Types::String.optional
    attribute? :unique_temp_id, Types::String.optional
    attribute? :unix_nano_timestamp, Types::String.optional
    attribute? :unix_timestamp, Types::String.optional
  end

  # Custom channel webhook participant object
  #
  # @!attribute [r] email
  #   @return [String]
  class Participant < Qismo::Object
    attribute? :email, Types::String.optional
  end

  # Custom channel webhook room object
  #
  # @!attribute [r] id
  #   @return [String]
  # @!attribute [r] name
  #   @return [String]
  # @!attribute [r] options
  #   @return [String]
  # @!attribute [r] participants
  #   @return [Array<Participant>]
  # @!attribute [r] room_avatar
  #   @return [String]
  class Room < Qismo::Object
    attribute? :id, Types::String.optional
    attribute? :name, Types::String.optional
    attribute? :options, Types::String.optional
    attribute? :participants, Types.Array(Participant.optional).optional
    attribute? :room_avatar, Types::String.optional
  end

  # Custom channel webhook payload object
  #
  # @!attribute [r] from
  #   @return [From]
  # @!attribute [r] message
  #   @return [Message]
  # @!attribute [r] room
  #   @return [Room]
  # @!attribute [r] type
  #   @return [String]
  class Payload < Qismo::Object
    attribute? :from, From.optional
    attribute? :message, Message.optional
    attribute? :room, Room.optional
  end

  attribute? :payload, Payload.optional
end