qismo 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/qismo/api.rb +136 -125
- data/lib/qismo/client.rb +5 -4
- data/lib/qismo/collection.rb +2 -0
- data/lib/qismo/object.rb +2 -0
- data/lib/qismo/objectified_hash.rb +5 -0
- data/lib/qismo/objects/agent_service.rb +4 -0
- data/lib/qismo/objects/broadcast_job.rb +4 -0
- data/lib/qismo/objects/broadcast_log.rb +2 -0
- data/lib/qismo/objects/custom_channel.rb +35 -0
- data/lib/qismo/objects/custom_channel_message_response.rb +2 -0
- data/lib/qismo/objects/customer_room.rb +2 -0
- data/lib/qismo/objects/fb_channel.rb +31 -0
- data/lib/qismo/objects/hsm_template.rb +6 -0
- data/lib/qismo/objects/ig_channel.rb +43 -0
- data/lib/qismo/objects/line_channel.rb +27 -0
- data/lib/qismo/objects/list_channels_response.rb +39 -0
- data/lib/qismo/objects/office_hour.rb +4 -0
- data/lib/qismo/objects/qiscus_channel.rb +27 -0
- data/lib/qismo/objects/room_additional_info.rb +2 -0
- data/lib/qismo/objects/tag.rb +4 -2
- data/lib/qismo/objects/telegram_channel.rb +31 -0
- data/lib/qismo/objects/user.rb +6 -0
- data/lib/qismo/objects/wa_channel.rb +111 -0
- data/lib/qismo/objects/wa_credit_info.rb +6 -0
- data/lib/qismo/objects/waca_channel.rb +55 -0
- data/lib/qismo/objects/webhook.rb +2 -0
- data/lib/qismo/types.rb +9 -0
- data/lib/qismo/version.rb +1 -1
- data/lib/qismo/webhook_requests/on_agent_allocation_needed.rb +6 -0
- data/lib/qismo/webhook_requests/on_custom_button_clicked.rb +10 -2
- data/lib/qismo/webhook_requests/on_custom_channel_message_sent.rb +12 -0
- data/lib/qismo/webhook_requests/on_message_for_bot_sent.rb +12 -0
- data/lib/qismo/webhook_requests/on_new_session_initiated.rb +20 -0
- data/lib/qismo/webhook_requests/on_room_resolved.rb +10 -0
- data/lib/qismo.rb +11 -0
- metadata +11 -2
@@ -1,11 +1,15 @@
|
|
1
1
|
module Qismo
|
2
|
+
# Objectified hash interface for accesing hash using dot notation
|
3
|
+
#
|
2
4
|
class ObjectifiedHash < Hash
|
5
|
+
# method missing patch
|
3
6
|
def method_missing(method, *args, &block)
|
4
7
|
return super unless respond_to?(method)
|
5
8
|
|
6
9
|
fetch(method.to_s)
|
7
10
|
end
|
8
11
|
|
12
|
+
# respond to patch
|
9
13
|
def respond_to?(method_name, include_private = false)
|
10
14
|
fetch(method_name.to_s)
|
11
15
|
|
@@ -14,6 +18,7 @@ module Qismo
|
|
14
18
|
super(method_name, include_private)
|
15
19
|
end
|
16
20
|
|
21
|
+
# respond to missing patch
|
17
22
|
def respond_to_missing?(method_name, include_private = false)
|
18
23
|
fetch(method_name.to_s)
|
19
24
|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Custom channel object
|
4
|
+
#
|
5
|
+
class CustomChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] webhook_url
|
11
|
+
# @return [String]
|
12
|
+
attribute? :webhook_url, Types::String.optional
|
13
|
+
|
14
|
+
# @!attribute [r] logo_url
|
15
|
+
# @return [String]
|
16
|
+
attribute? :logo_url, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] identifier_key
|
19
|
+
# @return [String]
|
20
|
+
attribute? :identifier_key, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] name
|
23
|
+
# @return [String]
|
24
|
+
attribute? :name, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] is_active
|
27
|
+
# @return [TrueClass,FalseClass]
|
28
|
+
attribute? :is_active, Types::Bool.optional
|
29
|
+
|
30
|
+
# @!attribute [r] use_channel_responder
|
31
|
+
# @return [TrueClass,FalseClass]
|
32
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Fb channel object
|
4
|
+
#
|
5
|
+
class FbChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] is_active
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :is_active, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] profile_name
|
15
|
+
# @return [String]
|
16
|
+
attribute? :profile_name, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] page_id
|
19
|
+
# @return [String]
|
20
|
+
attribute? :page_id, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] badge_url
|
23
|
+
# @return [String]
|
24
|
+
attribute? :badge_url, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] use_channel_responder
|
27
|
+
# @return [TrueClass,FalseClass]
|
28
|
+
attribute :use_channel_responder, Types::Bool.optional
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,7 +1,13 @@
|
|
1
1
|
module Qismo
|
2
2
|
module Objects
|
3
|
+
# HSM template object
|
4
|
+
#
|
3
5
|
class HsmTemplate < Qismo::Object
|
6
|
+
# Hsm detail object
|
7
|
+
#
|
4
8
|
class HsmDetail < Qismo::Object
|
9
|
+
# Hsm detail button object
|
10
|
+
#
|
5
11
|
class Button < Qismo::Object
|
6
12
|
# @!attribute [r] text
|
7
13
|
# @return [String]
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# IG channel object
|
4
|
+
#
|
5
|
+
class IgChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] is_active
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :is_active, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] name
|
15
|
+
# @return [String]
|
16
|
+
attribute? :name, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] page_id
|
19
|
+
# @return [String]
|
20
|
+
attribute? :page_id, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] badge_url
|
23
|
+
# @return [String]
|
24
|
+
attribute? :badge_url, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] use_channel_responder
|
27
|
+
# @return [TrueClass,FalseClass]
|
28
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
29
|
+
|
30
|
+
# @!attribute [r] ig_id
|
31
|
+
# @return [String]
|
32
|
+
attribute? :ig_id, Types::String.optional
|
33
|
+
|
34
|
+
# @!attribute [r] private_replies_enabled
|
35
|
+
# @return [TrueClass,FalseClass]
|
36
|
+
attribute? :private_replies_enabled, Types::Bool.optional
|
37
|
+
|
38
|
+
# @!attribute [r] private_replies_text
|
39
|
+
# @return [String]
|
40
|
+
attribute? :private_replies_text, Types::String.optional
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Line channel object
|
4
|
+
#
|
5
|
+
class LineChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] is_active
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :is_active, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] badge_url
|
15
|
+
# @return [String]
|
16
|
+
attribute? :badge_url, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] name
|
19
|
+
# @return [String]
|
20
|
+
attribute? :name, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] use_channel_responder
|
23
|
+
# @return [TrueClass,FalseClass]
|
24
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# List channels response object
|
4
|
+
#
|
5
|
+
class ListChannelsResponse < Qismo::Object
|
6
|
+
# @!attribute [r] custom_channels
|
7
|
+
# @return [Array<Qismo::Objects::CustomChannel>]
|
8
|
+
attribute? :custom_channels, Types.Array(Qismo::Objects::CustomChannel.optional).optional
|
9
|
+
|
10
|
+
# @!attribute [r] fb_channels
|
11
|
+
# @return [Array<Qismo::Objects::FbChannel>]
|
12
|
+
attribute? :fb_channels, Types.Array(Qismo::Objects::FbChannel.optional).optional
|
13
|
+
|
14
|
+
# @!attribute [r] ig_channels
|
15
|
+
# @return [Array<Qismo::Objects::IgChannel>]
|
16
|
+
attribute? :ig_channels, Types.Array(Qismo::Objects::IgChannel.optional).optional
|
17
|
+
|
18
|
+
# @!attribute [r] line_channels
|
19
|
+
# @return [Array<Qismo::Objects::LineChannel>]
|
20
|
+
attribute? :line_channels, Types.Array(Qismo::Objects::LineChannel.optional).optional
|
21
|
+
|
22
|
+
# @!attribute [r] qiscus_channels
|
23
|
+
# @return [Array<Qismo::Objects::QiscusChannel>]
|
24
|
+
attribute? :qiscus_channels, Types.Array(Qismo::Objects::QiscusChannel.optional).optional
|
25
|
+
|
26
|
+
# @!attribute [r] telegram_channels
|
27
|
+
# @return [Array<Qismo::Objects::TelegramChannel>]
|
28
|
+
attribute? :telegram_channels, Types.Array(Qismo::Objects::TelegramChannel.optional).optional
|
29
|
+
|
30
|
+
# @!attribute [r] wa_channels
|
31
|
+
# @return [Array<Qismo::Objects::WaChannel>]
|
32
|
+
attribute? :wa_channels, Types.Array(Qismo::Objects::WaChannel.optional).optional
|
33
|
+
|
34
|
+
# @!attribute [r] waca_channels
|
35
|
+
# @return [Array<Qismo::Objects::WacaChannel>]
|
36
|
+
attribute? :waca_channels, Types.Array(Qismo::Objects::WacaChannel.optional).optional
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Qiscus channel object
|
4
|
+
#
|
5
|
+
class QiscusChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] is_active
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :is_active, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] name
|
15
|
+
# @return [String]
|
16
|
+
attribute? :name, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] badge_url
|
19
|
+
# @return [String]
|
20
|
+
attribute? :badge_url, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] use_channel_responder
|
23
|
+
# @return [TrueClass,FalseClass]
|
24
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/qismo/objects/tag.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module Qismo
|
2
2
|
module Objects
|
3
|
+
# Tag object
|
4
|
+
#
|
3
5
|
class Tag < Qismo::Object
|
4
6
|
# @!attribute [r] created_at
|
5
7
|
# @return [String]
|
@@ -15,11 +17,11 @@ module Qismo
|
|
15
17
|
|
16
18
|
# @!attribute [r] room_tag_created_at
|
17
19
|
# @return [String]
|
18
|
-
attribute? :room_tag_created, Types::
|
20
|
+
attribute? :room_tag_created, Types::String.optional
|
19
21
|
|
20
22
|
# @!attribute [r] updated_at
|
21
23
|
# @return [String]
|
22
|
-
attribute? :updated_at, Types::
|
24
|
+
attribute? :updated_at, Types::String.optional
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Telegram channel object
|
4
|
+
#
|
5
|
+
class TelegramChannel < Qismo::Object
|
6
|
+
# @!attribute [r] id
|
7
|
+
# @return [Integer]
|
8
|
+
attribute? :id, Types::Int.optional
|
9
|
+
|
10
|
+
# @!attribute [r] is_active
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :is_active, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] name
|
15
|
+
# @return [String]
|
16
|
+
attribute? :name, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] username
|
19
|
+
# @return [String]
|
20
|
+
attribute? :username, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] badge_url
|
23
|
+
# @return [String]
|
24
|
+
attribute? :badge_url, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] use_channel_responder
|
27
|
+
# @return [TrueClass,FalseClass]
|
28
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/qismo/objects/user.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module Qismo
|
2
2
|
module Objects
|
3
|
+
# User object
|
4
|
+
#
|
3
5
|
class User < Qismo::Object
|
6
|
+
# User channel object
|
7
|
+
#
|
4
8
|
class Channel < Qismo::Object
|
5
9
|
# @!attribute [r] id
|
6
10
|
# @return [Integer]
|
@@ -11,6 +15,8 @@ module Qismo
|
|
11
15
|
attribute? :name, Types::String.optional
|
12
16
|
end
|
13
17
|
|
18
|
+
# User role object
|
19
|
+
#
|
14
20
|
class Role < Qismo::Object
|
15
21
|
# @!attribute [r] id
|
16
22
|
# @return [Integer]
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# WA channel object
|
4
|
+
#
|
5
|
+
class WaChannel < Qismo::Object
|
6
|
+
# @!attribute [r] allow_intl_hsm
|
7
|
+
# @return [TrueClass,FalseClass]
|
8
|
+
attribute? :allow_intl_hsm, Types::Bool.optional
|
9
|
+
|
10
|
+
# @!attribute [r] alter_app_id
|
11
|
+
# @return [TrueClass,FalseClass]
|
12
|
+
attribute? :alter_app_id, Types::Bool.optional
|
13
|
+
|
14
|
+
# @!attribute [r] badge_url
|
15
|
+
# @return [String]
|
16
|
+
attribute? :badge_url, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] base_url
|
19
|
+
# @return [String]
|
20
|
+
attribute? :base_url, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] business_id
|
23
|
+
# @return [String]
|
24
|
+
attribute? :business_id, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] business_verification_status
|
27
|
+
# @return [String]
|
28
|
+
attribute? :business_verification_status, Types::String.optional
|
29
|
+
|
30
|
+
# @!attribute [r] created_at
|
31
|
+
# @return [String]
|
32
|
+
attribute? :created_at, Types::String.optional
|
33
|
+
|
34
|
+
# @!attribute [r] forward_enabled
|
35
|
+
# @return [TrueClass,FalseClass]
|
36
|
+
attribute? :forward_enabled, Types::Bool.optional
|
37
|
+
|
38
|
+
# @!attribute [r] forward_url
|
39
|
+
# @return [String]
|
40
|
+
attribute? :forward_url, Types::String.optional
|
41
|
+
|
42
|
+
# @!attribute [r] hsm_24_enabled
|
43
|
+
# @return [TrueClass,FalseClass]
|
44
|
+
attribute? :hsm_24_enabled, Types::Bool.optional
|
45
|
+
|
46
|
+
# @!attribute [r] id
|
47
|
+
# @return [Integer]
|
48
|
+
attribute? :id, Types::Int.optional
|
49
|
+
|
50
|
+
# @!attribute [r] is_active
|
51
|
+
# @return [TrueClass,FalseClass]
|
52
|
+
attribute? :is_active, Types::Bool.optional
|
53
|
+
|
54
|
+
# @!attribute [r] is_auto_responder_enabled
|
55
|
+
# @return [TrueClass,FalseClass]
|
56
|
+
attribute? :is_auto_responder_enabled, Types::Bool.optional
|
57
|
+
|
58
|
+
# @!attribute [r] is_bot_enabled
|
59
|
+
# @return [TrueClass,FalseClass]
|
60
|
+
attribute? :is_bot_enabled, Types::Bool.optional
|
61
|
+
|
62
|
+
# @!attribute [r] is_on_cloud
|
63
|
+
# @return [TrueClass,FalseClass]
|
64
|
+
attribute? :is_on_cloud, Types::Bool.optional
|
65
|
+
|
66
|
+
# @!attribute [r] is_ssl_enabled
|
67
|
+
# @return [TrueClass,FalseClass]
|
68
|
+
attribute? :is_ssl_enabled, Types::Bool.optional
|
69
|
+
|
70
|
+
# @!attribute [r] name
|
71
|
+
# @return [String]
|
72
|
+
attribute? :name, Types::String.optional
|
73
|
+
|
74
|
+
# @!attribute [r] on_sync
|
75
|
+
# @return [TrueClass,FalseClass]
|
76
|
+
attribute? :on_sync, Types::Bool.optional
|
77
|
+
|
78
|
+
# @!attribute [r] phone_number
|
79
|
+
# @return [String]
|
80
|
+
attribute? :phone_number, Types::String.optional
|
81
|
+
|
82
|
+
# @!attribute [r] phone_number_id
|
83
|
+
# @return [String]
|
84
|
+
attribute? :phone_number_id, Types::String.optional
|
85
|
+
|
86
|
+
# @!attribute [r] phone_number_status
|
87
|
+
# @return [String]
|
88
|
+
attribute? :phone_number_status, Types::String.optional
|
89
|
+
|
90
|
+
# @!attribute [r] pin
|
91
|
+
# @return [String]
|
92
|
+
attribute? :pin, Types::String.optional
|
93
|
+
|
94
|
+
# @!attribute [r] platform
|
95
|
+
# @return [String]
|
96
|
+
attribute? :platform, Types::String.optional
|
97
|
+
|
98
|
+
# @!attribute [r] read_enabled
|
99
|
+
# @return [TrueClass,FalseClass]
|
100
|
+
attribute? :read_enabled, Types::Bool.optional
|
101
|
+
|
102
|
+
# @!attribute [r] updated_at
|
103
|
+
# @return [String]
|
104
|
+
attribute? :updated_at, Types::String.optional
|
105
|
+
|
106
|
+
# @!attribute [r] use_channel_responder
|
107
|
+
# @return [TrueClass,FalseClass]
|
108
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -1,7 +1,13 @@
|
|
1
1
|
module Qismo
|
2
2
|
module Objects
|
3
|
+
# WA credit info object
|
4
|
+
#
|
3
5
|
class WaCreditInfo < Qismo::Object
|
6
|
+
# Wa credit info channel object
|
7
|
+
#
|
4
8
|
class Channel < Qismo::Object
|
9
|
+
# WA last payment object
|
10
|
+
#
|
5
11
|
class LastPayment < Qismo::Object
|
6
12
|
# @!attribute [r] credit
|
7
13
|
# @return [String]
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Waca channel object
|
4
|
+
#
|
5
|
+
class WacaChannel < Qismo::Object
|
6
|
+
# @!attribute [r] badge_url
|
7
|
+
# @return [String]
|
8
|
+
attribute? :badge_url, Types::String.optional
|
9
|
+
|
10
|
+
# @!attribute [r] business_id
|
11
|
+
# @return [String]
|
12
|
+
attribute? :business_id, Types::String.optional
|
13
|
+
|
14
|
+
# @!attribute [r] created_at
|
15
|
+
# @return [String]
|
16
|
+
attribute? :created_at, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] updated_at
|
19
|
+
# @return [String]
|
20
|
+
attribute? :deleted_at, Types::Nil.optional
|
21
|
+
|
22
|
+
# @!attribute [r] id
|
23
|
+
# @return [Integer]
|
24
|
+
attribute? :id, Types::Int.optional
|
25
|
+
|
26
|
+
# @!attribute [r] is_active
|
27
|
+
# @return [TrueClass,FalseClass]
|
28
|
+
attribute? :is_active, Types::Bool.optional
|
29
|
+
|
30
|
+
# @!attribute [r] name
|
31
|
+
# @return [String]
|
32
|
+
attribute? :name, Types::String.optional
|
33
|
+
|
34
|
+
# @!attribute [r] phone_number
|
35
|
+
# @return [String]
|
36
|
+
attribute? :phone_number, Types::String.optional
|
37
|
+
|
38
|
+
# @!attribute [r] phone_number_id
|
39
|
+
# @return [String]
|
40
|
+
attribute? :phone_number_id, Types::String.optional
|
41
|
+
|
42
|
+
# @!attribute [r] updated_at
|
43
|
+
# @return [String]
|
44
|
+
attribute? :updated_at, Types::String.optional
|
45
|
+
|
46
|
+
# @!attribute [r] use_channel_responder
|
47
|
+
# @return [TrueClass,FalseClass]
|
48
|
+
attribute? :use_channel_responder, Types::Bool.optional
|
49
|
+
|
50
|
+
# @!attribute [r] webhook_identifier
|
51
|
+
# @return [String]
|
52
|
+
attribute? :webhook_identifier, Types::String.optional
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/qismo/types.rb
CHANGED
@@ -1,10 +1,19 @@
|
|
1
1
|
module Qismo
|
2
|
+
# Type specs module. Inherited from dry-types
|
3
|
+
#
|
2
4
|
module Types
|
3
5
|
include Dry.Types()
|
4
6
|
|
7
|
+
# @return [Integer]
|
5
8
|
Int = Params::Integer
|
9
|
+
|
10
|
+
# @return [String]
|
6
11
|
String = Coercible::String
|
12
|
+
|
13
|
+
# @return [TrueClass,FalseClass]
|
7
14
|
Bool = Params::Bool
|
15
|
+
|
16
|
+
# @return [Hash]
|
8
17
|
Hash = Params::Hash
|
9
18
|
end
|
10
19
|
end
|
data/lib/qismo/version.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
module Qismo
|
2
|
+
# Objects module to handle objectification of incoming webhook request
|
3
|
+
#
|
2
4
|
module WebhookRequests
|
5
|
+
# CAA webhook object
|
6
|
+
#
|
3
7
|
class OnAgentAllocationNeeded < Qismo::Object
|
8
|
+
# Candidate agent object
|
9
|
+
#
|
4
10
|
# @!attribute [r] avatar_url
|
5
11
|
# @return [String]
|
6
12
|
# @!attribute [r] created_at
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Qismo
|
2
2
|
module WebhookRequests
|
3
|
+
# Custom button webhook object
|
4
|
+
#
|
3
5
|
# @!attribute [r] additional_info
|
4
6
|
# @return [Array<AdditionalInfo>]
|
5
7
|
# @!attribute [r] agent
|
@@ -19,8 +21,8 @@ module Qismo
|
|
19
21
|
# @!attribute [r] tag
|
20
22
|
# @return [Array<Tag>]
|
21
23
|
class OnCustomButtonClicked < Qismo::Object
|
22
|
-
#
|
23
|
-
|
24
|
+
# Custom button webhook additional info object
|
25
|
+
#
|
24
26
|
# @!attribute [r] key
|
25
27
|
# @return [String]
|
26
28
|
# @!attribute [r] value
|
@@ -30,6 +32,8 @@ module Qismo
|
|
30
32
|
attribute? :value, (Types::String.optional | Types::Int.optional | Types::Params::Bool.optional)
|
31
33
|
end
|
32
34
|
|
35
|
+
# Custom button webhook agent object
|
36
|
+
#
|
33
37
|
# @!attribute [r] email
|
34
38
|
# @return [String]
|
35
39
|
# @!attribute [r] name
|
@@ -42,6 +46,8 @@ module Qismo
|
|
42
46
|
attribute? :type, Types::String.optional
|
43
47
|
end
|
44
48
|
|
49
|
+
# Custom webhook customer object
|
50
|
+
#
|
45
51
|
# @!attribute [r] avatar
|
46
52
|
# @return [String]
|
47
53
|
# @!attribute [r] name
|
@@ -54,6 +60,8 @@ module Qismo
|
|
54
60
|
attribute? :user_id, Types::String.optional
|
55
61
|
end
|
56
62
|
|
63
|
+
# Custom button webhook tag object
|
64
|
+
#
|
57
65
|
# @!attribute [r] id
|
58
66
|
# @return [Integer]
|
59
67
|
# @!attribute [r] name
|