qismo 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qismo/api.rb +483 -262
- data/lib/qismo/client.rb +30 -19
- data/lib/qismo/collection.rb +19 -0
- data/lib/qismo/object.rb +19 -0
- data/lib/qismo/objectified_hash.rb +25 -0
- data/lib/qismo/objects/agent_service.rb +49 -0
- data/lib/qismo/objects/broadcast_job.rb +95 -0
- data/lib/qismo/objects/broadcast_log.rb +57 -0
- data/lib/qismo/objects/custom_channel_message_response.rb +17 -0
- data/lib/qismo/objects/customer_room.rb +83 -0
- data/lib/qismo/objects/hsm_template.rb +105 -0
- data/lib/qismo/objects/office_hour.rb +63 -0
- data/lib/qismo/objects/room_additional_info.rb +13 -0
- data/lib/qismo/objects/tag.rb +25 -0
- data/lib/qismo/objects/user.rb +93 -0
- data/lib/qismo/objects/wa_credit_info.rb +65 -0
- data/lib/qismo/objects/webhook.rb +13 -0
- data/lib/qismo/types.rb +1 -1
- data/lib/qismo/version.rb +1 -1
- data/lib/qismo/webhook_requests/on_agent_allocation_needed.rb +2 -2
- data/lib/qismo/webhook_requests/on_custom_button_clicked.rb +5 -5
- data/lib/qismo/webhook_requests/on_custom_channel_message_sent.rb +6 -6
- data/lib/qismo/webhook_requests/on_message_for_bot_sent.rb +6 -6
- data/lib/qismo/webhook_requests/on_new_session_initiated.rb +10 -10
- data/lib/qismo/webhook_requests/on_room_resolved.rb +5 -5
- data/lib/qismo.rb +17 -34
- data/qismo.gemspec +1 -0
- metadata +31 -6
- data/lib/qismo/model.rb +0 -102
- data/lib/qismo/models/base.rb +0 -13
- data/lib/qismo/models/customer_room.rb +0 -6
- data/lib/qismo/util.rb +0 -31
@@ -0,0 +1,93 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
class User < Qismo::Object
|
4
|
+
class Channel < Qismo::Object
|
5
|
+
# @!attribute [r] id
|
6
|
+
# @return [Integer]
|
7
|
+
attribute? :id, Types::Int.optional
|
8
|
+
|
9
|
+
# @!attribute [r] name
|
10
|
+
# @return [String]
|
11
|
+
attribute? :name, Types::String.optional
|
12
|
+
end
|
13
|
+
|
14
|
+
class Role < Qismo::Object
|
15
|
+
# @!attribute [r] id
|
16
|
+
# @return [Integer]
|
17
|
+
attribute? :id, Types::Int.optional
|
18
|
+
|
19
|
+
# @!attribute [r] name
|
20
|
+
# @return [String]
|
21
|
+
attribute? :name, Types::String.optional
|
22
|
+
end
|
23
|
+
|
24
|
+
# @!attribute [r] user_channels
|
25
|
+
# @return [Array<Qismo::Objects::User::Channel>]
|
26
|
+
attribute? :user_channels, Types.Array(Channel.optional).optional
|
27
|
+
|
28
|
+
# @!attribute [r] user_roles
|
29
|
+
# @return [Array<Qismo::Objects::User::Role>]
|
30
|
+
attribute? :user_roles, Types.Array(Role.optional).optional
|
31
|
+
|
32
|
+
# @!attribute [r] avatar_url
|
33
|
+
# @return [String]
|
34
|
+
attribute? :avatar_url, Types::String.optional
|
35
|
+
|
36
|
+
# @!attribute [r] created_at
|
37
|
+
# @return [String]
|
38
|
+
attribute? :created_at, Types::String.optional
|
39
|
+
|
40
|
+
# @!attribute [r] email
|
41
|
+
# @return [String]
|
42
|
+
attribute? :email, Types::String.optional
|
43
|
+
|
44
|
+
# @!attribute [r] force_offline
|
45
|
+
# @return [TrueClass,FalseClass]
|
46
|
+
attribute? :force_offline, Types::Bool.optional
|
47
|
+
|
48
|
+
# @!attribute [r] id
|
49
|
+
# @return [Integer]
|
50
|
+
attribute? :id, Types::Int.optional
|
51
|
+
|
52
|
+
# @!attribute [r] is_available
|
53
|
+
# @return [TrueClass,FalseClass]
|
54
|
+
attribute? :is_available, Types::Bool.optional
|
55
|
+
|
56
|
+
# @!attribute [r] is_verified
|
57
|
+
# @return [TrueClass,FalseClass]
|
58
|
+
attribute? :is_verified, Types::Bool.optional
|
59
|
+
|
60
|
+
# @!attribute [r] last_login
|
61
|
+
# @return [String]
|
62
|
+
attribute? :last_login, Types::String.optional
|
63
|
+
|
64
|
+
# @!attribute [r] name
|
65
|
+
# @return [String]
|
66
|
+
attribute? :name, Types::String.optional
|
67
|
+
|
68
|
+
# @!attribute [r] sdk_email
|
69
|
+
# @return [String]
|
70
|
+
attribute? :sdk_email, Types::String.optional
|
71
|
+
|
72
|
+
# @!attribute [r] sdk_key
|
73
|
+
# @return [String]
|
74
|
+
attribute? :sdk_key, Types::String.optional
|
75
|
+
|
76
|
+
# @!attribute [r] type
|
77
|
+
# @return [String]
|
78
|
+
attribute? :type, Types::Int.optional
|
79
|
+
|
80
|
+
# @!attribute [r] type_as_string
|
81
|
+
# @return [String]
|
82
|
+
attribute? :type_as_string, Types::String.optional
|
83
|
+
|
84
|
+
# @!attribute [r] updated_at
|
85
|
+
# @return [String]
|
86
|
+
attribute? :updated_at, Types::String.optional
|
87
|
+
|
88
|
+
# @!attribute [r] current_customer_count
|
89
|
+
# @return [Integer]
|
90
|
+
attribute? :current_customer_count, Types::Int.optional
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
class WaCreditInfo < Qismo::Object
|
4
|
+
class Channel < Qismo::Object
|
5
|
+
class LastPayment < Qismo::Object
|
6
|
+
# @!attribute [r] credit
|
7
|
+
# @return [String]
|
8
|
+
attribute? :credit, Types::String.optional
|
9
|
+
|
10
|
+
# @!attribute [r] due_date
|
11
|
+
# @return [String]
|
12
|
+
attribute? :due_date, Types::String.optional
|
13
|
+
|
14
|
+
# @!attribute [r] id
|
15
|
+
# @return [Integer]
|
16
|
+
attribute? :id, Types::Int.optional
|
17
|
+
|
18
|
+
# @!attribute [r] issued_date
|
19
|
+
# @return [String]
|
20
|
+
attribute? :issued_date, Types::String.optional
|
21
|
+
|
22
|
+
# @!attribute [r] status
|
23
|
+
# @return [Integer]
|
24
|
+
attribute? :status, Types::Int.optional
|
25
|
+
|
26
|
+
# @!attribute [r] status_string
|
27
|
+
# @return [String]
|
28
|
+
attribute? :status_string, Types::String.optional
|
29
|
+
|
30
|
+
# @!attribute [r] updated_at
|
31
|
+
# @return [String]
|
32
|
+
attribute? :updated_at, Types::String.optional
|
33
|
+
end
|
34
|
+
|
35
|
+
# @!attribute [r] balance
|
36
|
+
# @return [Integer]
|
37
|
+
attribute? :balance, Types::Int.optional
|
38
|
+
|
39
|
+
# @!attribute [r] id
|
40
|
+
# @return [Integer]
|
41
|
+
attribute? :id, Types::Int.optional
|
42
|
+
|
43
|
+
# @!attribute [r] is_bsp_qiscus
|
44
|
+
# @return [TrueClass,FalseClass]
|
45
|
+
attribute? :is_bsp_qiscus, Types::Bool.optional
|
46
|
+
|
47
|
+
# @!attribute [r] last_payment
|
48
|
+
# @return [Qismo::Objects::WaCreditInfo::Channel]
|
49
|
+
attribute? :last_payment, LastPayment.optional
|
50
|
+
|
51
|
+
# @!attribute [r] name
|
52
|
+
# @return [String]
|
53
|
+
attribute? :name, Types::String.optional
|
54
|
+
end
|
55
|
+
|
56
|
+
# @!attribute [r] channels
|
57
|
+
# @return [Array<Qismo::Objects::WaCreditInfo::Channel>]
|
58
|
+
attribute? :channels, Types.Array(Channel.optional).optional
|
59
|
+
|
60
|
+
# @!attribute [r] free_sessions
|
61
|
+
# @return [Integer]
|
62
|
+
attribute? :free_sessions, Types::Int.optional
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
class Webhook < Qismo::Object
|
4
|
+
# @!attribute [r] url
|
5
|
+
# @return [String]
|
6
|
+
attribute? :url, Types::String.optional
|
7
|
+
|
8
|
+
# @!attribute [r] enabled
|
9
|
+
# @return [TrueClass,FalseClass]
|
10
|
+
attribute? :enabled, Types::Bool.optional
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/qismo/types.rb
CHANGED
data/lib/qismo/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Qismo
|
2
2
|
module WebhookRequests
|
3
|
-
class OnAgentAllocationNeeded < Qismo::
|
3
|
+
class OnAgentAllocationNeeded < Qismo::Object
|
4
4
|
# @!attribute [r] avatar_url
|
5
5
|
# @return [String]
|
6
6
|
# @!attribute [r] created_at
|
@@ -25,7 +25,7 @@ module Qismo
|
|
25
25
|
# @return [String]
|
26
26
|
# @!attribute [r] updated_at
|
27
27
|
# @return [String]
|
28
|
-
class CandidateAgent < Qismo::
|
28
|
+
class CandidateAgent < Qismo::Object
|
29
29
|
attribute? :avatar_url, Types::String.optional
|
30
30
|
attribute? :created_at, Types::String.optional
|
31
31
|
attribute? :email, Types::String.optional
|
@@ -18,14 +18,14 @@ module Qismo
|
|
18
18
|
# @return [Integer]
|
19
19
|
# @!attribute [r] tag
|
20
20
|
# @return [Array<Tag>]
|
21
|
-
class OnCustomButtonClicked < Qismo::
|
21
|
+
class OnCustomButtonClicked < Qismo::Object
|
22
22
|
# @!parse include Qismo::Models
|
23
23
|
|
24
24
|
# @!attribute [r] key
|
25
25
|
# @return [String]
|
26
26
|
# @!attribute [r] value
|
27
27
|
# @return [String,Integer,TrueClass,FalseClass]
|
28
|
-
class AdditionalInfo < Qismo::
|
28
|
+
class AdditionalInfo < Qismo::Object
|
29
29
|
attribute? :key, Types::String.optional
|
30
30
|
attribute? :value, (Types::String.optional | Types::Int.optional | Types::Params::Bool.optional)
|
31
31
|
end
|
@@ -36,7 +36,7 @@ module Qismo
|
|
36
36
|
# @return [String]
|
37
37
|
# @!attribute [r] type
|
38
38
|
# @return [String]
|
39
|
-
class Agent < Qismo::
|
39
|
+
class Agent < Qismo::Object
|
40
40
|
attribute? :email, Types::String.optional
|
41
41
|
attribute? :name, Types::String.optional
|
42
42
|
attribute? :type, Types::String.optional
|
@@ -48,7 +48,7 @@ module Qismo
|
|
48
48
|
# @return [String]
|
49
49
|
# @!attribute [r] user_id
|
50
50
|
# @return [String]
|
51
|
-
class Customer < Qismo::
|
51
|
+
class Customer < Qismo::Object
|
52
52
|
attribute? :avatar, Types::String.optional
|
53
53
|
attribute? :name, Types::String.optional
|
54
54
|
attribute? :user_id, Types::String.optional
|
@@ -64,7 +64,7 @@ module Qismo
|
|
64
64
|
# @return [String]
|
65
65
|
# @!attribute [r] room_tag_created_at
|
66
66
|
# @return [String]
|
67
|
-
class Tag < Qismo::
|
67
|
+
class Tag < Qismo::Object
|
68
68
|
attribute? :id, Types::Int.optional
|
69
69
|
attribute? :name, Types::String.optional
|
70
70
|
attribute? :created_at, Types::String.optional
|
@@ -2,7 +2,7 @@ module Qismo
|
|
2
2
|
module WebhookRequests
|
3
3
|
# @!attribute [r] payload
|
4
4
|
# @return [Payload]
|
5
|
-
class OnCustomChannelMessageSent < Qismo::
|
5
|
+
class OnCustomChannelMessageSent < Qismo::Object
|
6
6
|
# @!attribute [r] avatar_url
|
7
7
|
# @return [String]
|
8
8
|
# @!attribute [r] email
|
@@ -11,7 +11,7 @@ module Qismo
|
|
11
11
|
# @return [Integer]
|
12
12
|
# @!attribute [r] name
|
13
13
|
# @return [String]
|
14
|
-
class From < Qismo::
|
14
|
+
class From < Qismo::Object
|
15
15
|
attribute? :avatar_url, Types::String.optional
|
16
16
|
attribute? :email, Types::String.optional
|
17
17
|
attribute? :id, Types::Int.optional
|
@@ -38,7 +38,7 @@ module Qismo
|
|
38
38
|
# @return [String]
|
39
39
|
# @!attribute [r] unix_timestamp
|
40
40
|
# @return [String]
|
41
|
-
class Message < Qismo::
|
41
|
+
class Message < Qismo::Object
|
42
42
|
attribute? :comment_before_id, Types::Int.optional
|
43
43
|
attribute? :created_at, Types::String.optional
|
44
44
|
attribute? :id, Types::Int.optional
|
@@ -53,7 +53,7 @@ module Qismo
|
|
53
53
|
|
54
54
|
# @!attribute [r] email
|
55
55
|
# @return [String]
|
56
|
-
class Participant < Qismo::
|
56
|
+
class Participant < Qismo::Object
|
57
57
|
attribute? :email, Types::String.optional
|
58
58
|
end
|
59
59
|
|
@@ -67,7 +67,7 @@ module Qismo
|
|
67
67
|
# @return [Array<Participant>]
|
68
68
|
# @!attribute [r] room_avatar
|
69
69
|
# @return [String]
|
70
|
-
class Room < Qismo::
|
70
|
+
class Room < Qismo::Object
|
71
71
|
attribute? :id, Types::String.optional
|
72
72
|
attribute? :name, Types::String.optional
|
73
73
|
attribute? :options, Types::String.optional
|
@@ -83,7 +83,7 @@ module Qismo
|
|
83
83
|
# @return [Room]
|
84
84
|
# @!attribute [r] type
|
85
85
|
# @return [String]
|
86
|
-
class Payload < Qismo::
|
86
|
+
class Payload < Qismo::Object
|
87
87
|
attribute? :from, From.optional
|
88
88
|
attribute? :message, Message.optional
|
89
89
|
attribute? :room, Room.optional
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Qismo
|
2
2
|
module WebhookRequests
|
3
|
-
class OnMessageForBotSent < Qismo::
|
3
|
+
class OnMessageForBotSent < Qismo::Object
|
4
4
|
# @!attribute [r] avatar_url
|
5
5
|
# @return [String]
|
6
6
|
# @!attribute [r] email
|
@@ -9,7 +9,7 @@ module Qismo
|
|
9
9
|
# @return [Integer]
|
10
10
|
# @!attribute [r] name
|
11
11
|
# @return [String]
|
12
|
-
class From < Qismo::
|
12
|
+
class From < Qismo::Object
|
13
13
|
attribute? :avatar_url, Types::String.optional
|
14
14
|
attribute? :email, Types::String.optional
|
15
15
|
attribute? :id, Types::Int.optional
|
@@ -36,7 +36,7 @@ module Qismo
|
|
36
36
|
# @return [String]
|
37
37
|
# @!attribute [r] unix_timestamp
|
38
38
|
# @return [String]
|
39
|
-
class Message < Qismo::
|
39
|
+
class Message < Qismo::Object
|
40
40
|
attribute? :comment_before_id, Types::Int.optional
|
41
41
|
attribute? :created_at, Types::String.optional
|
42
42
|
attribute? :id, Types::Int.optional
|
@@ -51,7 +51,7 @@ module Qismo
|
|
51
51
|
|
52
52
|
# @!attribute [r] email
|
53
53
|
# @return [String]
|
54
|
-
class Participant < Qismo::
|
54
|
+
class Participant < Qismo::Object
|
55
55
|
attribute? :email, Types::String.optional
|
56
56
|
end
|
57
57
|
|
@@ -65,7 +65,7 @@ module Qismo
|
|
65
65
|
# @return [Array<Participant>]
|
66
66
|
# @!attribute [r] room_avatar
|
67
67
|
# @return [String]
|
68
|
-
class Room < Qismo::
|
68
|
+
class Room < Qismo::Object
|
69
69
|
attribute? :id, Types::String.optional
|
70
70
|
attribute? :name, Types::String.optional
|
71
71
|
attribute? :options, Types::String.optional
|
@@ -81,7 +81,7 @@ module Qismo
|
|
81
81
|
# @return [Room]
|
82
82
|
# @!attribute [r] type
|
83
83
|
# @return [String]
|
84
|
-
class Payload < Qismo::
|
84
|
+
class Payload < Qismo::Object
|
85
85
|
attribute? :from, From.optional
|
86
86
|
attribute? :message, Message.optional
|
87
87
|
attribute? :room, Room.optional
|
@@ -6,7 +6,7 @@ module Qismo
|
|
6
6
|
# @return [Payload]
|
7
7
|
# @!attribute [r] room_log
|
8
8
|
# @return [RoomLog]
|
9
|
-
class OnNewSessionInitiated < Qismo::
|
9
|
+
class OnNewSessionInitiated < Qismo::Object
|
10
10
|
# @!attribute [r] avatar_url
|
11
11
|
# @return [String]
|
12
12
|
# @!attribute [r] email
|
@@ -15,7 +15,7 @@ module Qismo
|
|
15
15
|
# @return [Integer]
|
16
16
|
# @!attribute [r] name
|
17
17
|
# @return [String]
|
18
|
-
class From < Qismo::
|
18
|
+
class From < Qismo::Object
|
19
19
|
attribute? :avatar_url, Types::String.optional
|
20
20
|
attribute? :email, Types::String.optional
|
21
21
|
attribute? :id, Types::Int.optional
|
@@ -42,7 +42,7 @@ module Qismo
|
|
42
42
|
# @return [String]
|
43
43
|
# @!attribute [r] unix_timestamp
|
44
44
|
# @return [String]
|
45
|
-
class Message < Qismo::
|
45
|
+
class Message < Qismo::Object
|
46
46
|
attribute? :comment_before_id, Types::Int.optional
|
47
47
|
attribute? :created_at, Types::String.optional
|
48
48
|
attribute? :id, Types::Int.optional
|
@@ -57,7 +57,7 @@ module Qismo
|
|
57
57
|
|
58
58
|
# @!attribute [r] email
|
59
59
|
# @return [String]
|
60
|
-
class Participant < Qismo::
|
60
|
+
class Participant < Qismo::Object
|
61
61
|
attribute? :email, Types::String.optional
|
62
62
|
end
|
63
63
|
|
@@ -71,7 +71,7 @@ module Qismo
|
|
71
71
|
# @return [Array<Participant>]
|
72
72
|
# @!attribute [r] room_avatar
|
73
73
|
# @return [String]
|
74
|
-
class Room < Qismo::
|
74
|
+
class Room < Qismo::Object
|
75
75
|
attribute? :id, Types::String.optional
|
76
76
|
attribute? :name, Types::String.optional
|
77
77
|
attribute? :options, Types::String.optional
|
@@ -87,7 +87,7 @@ module Qismo
|
|
87
87
|
# @return [Room]
|
88
88
|
# @!attribute [r] type
|
89
89
|
# @return [String]
|
90
|
-
class Payload < Qismo::
|
90
|
+
class Payload < Qismo::Object
|
91
91
|
attribute? :from, From.optional
|
92
92
|
attribute? :message, Message.optional
|
93
93
|
attribute? :room, Room.optional
|
@@ -97,14 +97,14 @@ module Qismo
|
|
97
97
|
# @return [String]
|
98
98
|
# @!attribute [r] value
|
99
99
|
# @return [String,Integer,TrueClass,FalseClass]
|
100
|
-
class UserProperty < Qismo::
|
100
|
+
class UserProperty < Qismo::Object
|
101
101
|
attribute? :key, Types::String.optional
|
102
102
|
attribute? :value, (Types::String.optional | Types::Int.optional | Types::Params::Bool.optional)
|
103
103
|
end
|
104
104
|
|
105
105
|
# @!attribute [r] timezone_offset
|
106
106
|
# @return [String]
|
107
|
-
class AdditionalExtras < Qismo::
|
107
|
+
class AdditionalExtras < Qismo::Object
|
108
108
|
attribute? :timezone_offset, Types::String
|
109
109
|
end
|
110
110
|
|
@@ -116,7 +116,7 @@ module Qismo
|
|
116
116
|
# @return [String]
|
117
117
|
# @!attribute [r] user_properties
|
118
118
|
# @return [Array<UserProperty>]
|
119
|
-
class Extras < Qismo::
|
119
|
+
class Extras < Qismo::Object
|
120
120
|
attribute? :additional_extras, AdditionalExtras.optional
|
121
121
|
attribute? :notes, Types::String
|
122
122
|
attribute? :timezone_offset, Types::String
|
@@ -147,7 +147,7 @@ module Qismo
|
|
147
147
|
# @return [String]
|
148
148
|
# @!attribute [r] user_id
|
149
149
|
# @return [String]
|
150
|
-
class RoomLog < Qismo::
|
150
|
+
class RoomLog < Qismo::Object
|
151
151
|
attribute? :channel_id, Types::Int
|
152
152
|
attribute? :created_at, Types::String
|
153
153
|
attribute? :extras, Extras
|
@@ -6,12 +6,12 @@ module Qismo
|
|
6
6
|
# @return [ResolvedBy]
|
7
7
|
# @!attribute [r] service
|
8
8
|
# @return [Service]
|
9
|
-
class OnRoomResolved < Qismo::
|
9
|
+
class OnRoomResolved < Qismo::Object
|
10
10
|
# @!attribute [r] key
|
11
11
|
# @return [String]
|
12
12
|
# @!attribute [r] value
|
13
13
|
# @return [String,Integer,TrueClass,FalseClass]
|
14
|
-
class AdditionalInfo < Qismo::
|
14
|
+
class AdditionalInfo < Qismo::Object
|
15
15
|
attribute? :key, Types::String.optional
|
16
16
|
attribute? :value, (Types::String.optional | Types::Int.optional | Types::Params::Bool.optional)
|
17
17
|
end
|
@@ -24,7 +24,7 @@ module Qismo
|
|
24
24
|
# @return [String]
|
25
25
|
# @!attribute [r] user_id
|
26
26
|
# @return [String]
|
27
|
-
class Customer < Qismo::
|
27
|
+
class Customer < Qismo::Object
|
28
28
|
attribute? :additional_info, Types.Array(AdditionalInfo.optional).optional
|
29
29
|
attribute? :avatar, Types::String.optional
|
30
30
|
attribute? :name, Types::String.optional
|
@@ -41,7 +41,7 @@ module Qismo
|
|
41
41
|
# @return [String]
|
42
42
|
# @!attribute [r] type
|
43
43
|
# @return [String]
|
44
|
-
class ResolvedBy < Qismo::
|
44
|
+
class ResolvedBy < Qismo::Object
|
45
45
|
attribute? :email, Types::String.optional
|
46
46
|
attribute? :id, Types::Int.optional
|
47
47
|
attribute? :is_available, Types::Bool.optional
|
@@ -63,7 +63,7 @@ module Qismo
|
|
63
63
|
# @return [String]
|
64
64
|
# @!attribute [r] source
|
65
65
|
# @return [String]
|
66
|
-
class Service < Qismo::
|
66
|
+
class Service < Qismo::Object
|
67
67
|
attribute? :first_comment_id, Types::String.optional
|
68
68
|
attribute? :last_comment_id, Types::String.optional
|
69
69
|
attribute? :id, Types::Int.optional
|
data/lib/qismo.rb
CHANGED
@@ -6,9 +6,24 @@ require "http"
|
|
6
6
|
|
7
7
|
require "qismo/version"
|
8
8
|
require "qismo/types"
|
9
|
-
require "qismo/
|
9
|
+
require "qismo/error"
|
10
10
|
|
11
|
-
require "qismo/
|
11
|
+
require "qismo/object"
|
12
|
+
require "qismo/objectified_hash"
|
13
|
+
require "qismo/collection"
|
14
|
+
|
15
|
+
require "qismo/objects/customer_room"
|
16
|
+
require "qismo/objects/tag"
|
17
|
+
require "qismo/objects/room_additional_info"
|
18
|
+
require "qismo/objects/broadcast_log"
|
19
|
+
require "qismo/objects/user"
|
20
|
+
require "qismo/objects/agent_service"
|
21
|
+
require "qismo/objects/webhook"
|
22
|
+
require "qismo/objects/office_hour"
|
23
|
+
require "qismo/objects/hsm_template"
|
24
|
+
require "qismo/objects/wa_credit_info"
|
25
|
+
require "qismo/objects/broadcast_job"
|
26
|
+
require "qismo/objects/custom_channel_message_response"
|
12
27
|
|
13
28
|
require "qismo/webhook_requests/on_agent_allocation_needed"
|
14
29
|
require "qismo/webhook_requests/on_custom_button_clicked"
|
@@ -17,40 +32,8 @@ require "qismo/webhook_requests/on_message_for_bot_sent"
|
|
17
32
|
require "qismo/webhook_requests/on_new_session_initiated"
|
18
33
|
require "qismo/webhook_requests/on_room_resolved"
|
19
34
|
|
20
|
-
require "qismo/error"
|
21
|
-
require "qismo/model"
|
22
35
|
require "qismo/api"
|
23
36
|
require "qismo/client"
|
24
37
|
|
25
38
|
module Qismo
|
26
|
-
class << self
|
27
|
-
# @!parse extend Qismo::Api
|
28
|
-
|
29
|
-
def configure
|
30
|
-
yield client
|
31
|
-
|
32
|
-
client
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
# @return [Qismo::Client]
|
38
|
-
def client
|
39
|
-
@client ||= Client.new
|
40
|
-
end
|
41
|
-
|
42
|
-
def method_missing(method, *args, &block)
|
43
|
-
return super unless client.respond_to?(method)
|
44
|
-
|
45
|
-
client.send(method, *args, &block)
|
46
|
-
end
|
47
|
-
|
48
|
-
def respond_to?(method_name, include_private = false)
|
49
|
-
client.respond_to?(method_name, include_private) || super(method_name, include_private)
|
50
|
-
end
|
51
|
-
|
52
|
-
def respond_to_missing?(method_name, include_private = false)
|
53
|
-
client.respond_to?(method_name, include_private) || super(method_name, include_private)
|
54
|
-
end
|
55
|
-
end
|
56
39
|
end
|
data/qismo.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qismo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qiscus Integration
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dry-validation
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.10'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.10'
|
55
69
|
description: Ruby wrapper for Qiscus Omnichannel public API
|
56
70
|
email:
|
57
71
|
- developer@qiscus.net
|
@@ -65,12 +79,23 @@ files:
|
|
65
79
|
- lib/qismo.rb
|
66
80
|
- lib/qismo/api.rb
|
67
81
|
- lib/qismo/client.rb
|
82
|
+
- lib/qismo/collection.rb
|
68
83
|
- lib/qismo/error.rb
|
69
|
-
- lib/qismo/
|
70
|
-
- lib/qismo/
|
71
|
-
- lib/qismo/
|
84
|
+
- lib/qismo/object.rb
|
85
|
+
- lib/qismo/objectified_hash.rb
|
86
|
+
- lib/qismo/objects/agent_service.rb
|
87
|
+
- lib/qismo/objects/broadcast_job.rb
|
88
|
+
- lib/qismo/objects/broadcast_log.rb
|
89
|
+
- lib/qismo/objects/custom_channel_message_response.rb
|
90
|
+
- lib/qismo/objects/customer_room.rb
|
91
|
+
- lib/qismo/objects/hsm_template.rb
|
92
|
+
- lib/qismo/objects/office_hour.rb
|
93
|
+
- lib/qismo/objects/room_additional_info.rb
|
94
|
+
- lib/qismo/objects/tag.rb
|
95
|
+
- lib/qismo/objects/user.rb
|
96
|
+
- lib/qismo/objects/wa_credit_info.rb
|
97
|
+
- lib/qismo/objects/webhook.rb
|
72
98
|
- lib/qismo/types.rb
|
73
|
-
- lib/qismo/util.rb
|
74
99
|
- lib/qismo/version.rb
|
75
100
|
- lib/qismo/webhook_requests/on_agent_allocation_needed.rb
|
76
101
|
- lib/qismo/webhook_requests/on_custom_button_clicked.rb
|