qismo 0.13.0 → 0.15.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 +556 -324
- data/lib/qismo/client.rb +31 -19
- data/lib/qismo/collection.rb +21 -0
- data/lib/qismo/object.rb +21 -0
- data/lib/qismo/objectified_hash.rb +30 -0
- data/lib/qismo/objects/agent_service.rb +53 -0
- data/lib/qismo/objects/broadcast_job.rb +99 -0
- data/lib/qismo/objects/broadcast_log.rb +59 -0
- data/lib/qismo/objects/custom_channel.rb +35 -0
- data/lib/qismo/objects/custom_channel_message_response.rb +19 -0
- data/lib/qismo/objects/customer_room.rb +85 -0
- data/lib/qismo/objects/fb_channel.rb +31 -0
- data/lib/qismo/objects/hsm_template.rb +111 -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 +67 -0
- data/lib/qismo/objects/qiscus_channel.rb +27 -0
- data/lib/qismo/objects/room_additional_info.rb +15 -0
- data/lib/qismo/objects/tag.rb +27 -0
- data/lib/qismo/objects/telegram_channel.rb +31 -0
- data/lib/qismo/objects/user.rb +99 -0
- data/lib/qismo/objects/wa_channel.rb +111 -0
- data/lib/qismo/objects/wa_credit_info.rb +71 -0
- data/lib/qismo/objects/waca_channel.rb +55 -0
- data/lib/qismo/objects/webhook.rb +15 -0
- data/lib/qismo/types.rb +10 -1
- data/lib/qismo/version.rb +1 -1
- data/lib/qismo/webhook_requests/on_agent_allocation_needed.rb +8 -2
- data/lib/qismo/webhook_requests/on_custom_button_clicked.rb +15 -7
- data/lib/qismo/webhook_requests/on_custom_channel_message_sent.rb +18 -6
- data/lib/qismo/webhook_requests/on_message_for_bot_sent.rb +18 -6
- data/lib/qismo/webhook_requests/on_new_session_initiated.rb +30 -10
- data/lib/qismo/webhook_requests/on_room_resolved.rb +15 -5
- data/lib/qismo.rb +28 -34
- data/qismo.gemspec +1 -0
- metadata +40 -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
data/lib/qismo/client.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Qismo
|
4
|
+
# Qismo ruby client
|
5
|
+
#
|
4
6
|
class Client
|
5
7
|
include Qismo::Api
|
6
8
|
|
@@ -42,9 +44,9 @@ module Qismo
|
|
42
44
|
#
|
43
45
|
# @param path [String]
|
44
46
|
# @param body [Hash]
|
45
|
-
# @return [Qismo::
|
47
|
+
# @return [Qismo::ObjectifiedHash]
|
46
48
|
def post(path, body = {})
|
47
|
-
request(:post, path, json: body)
|
49
|
+
request(:post, path, json: body.compact)
|
48
50
|
end
|
49
51
|
|
50
52
|
# Send HTTP request with post method to upload file
|
@@ -53,25 +55,25 @@ module Qismo
|
|
53
55
|
# @param body [Hash]
|
54
56
|
# @return [Qismo::SingleObject]
|
55
57
|
def post_upload(path, body = {})
|
56
|
-
request(:post, form: body)
|
58
|
+
request(:post, path, form: body.compact)
|
57
59
|
end
|
58
60
|
|
59
61
|
# Send HTTP request with get method
|
60
62
|
#
|
61
63
|
# @param path [String]
|
62
64
|
# @param params [Hash]
|
63
|
-
# @return [Qismo::
|
65
|
+
# @return [Qismo::ObjectifiedHash]
|
64
66
|
def get(path, params = {})
|
65
|
-
request(:get, path, params: params)
|
67
|
+
request(:get, path, params: params.compact)
|
66
68
|
end
|
67
69
|
|
68
70
|
# Send HTTP request with delete method
|
69
71
|
#
|
70
72
|
# @param path [String]
|
71
73
|
# @param params [Hash]
|
72
|
-
# @return [Qismo::
|
74
|
+
# @return [Qismo::ObjectifiedHash]
|
73
75
|
def delete(path, params = {})
|
74
|
-
request(:delete, path, params: params)
|
76
|
+
request(:delete, path, params: params.compact)
|
75
77
|
end
|
76
78
|
|
77
79
|
# Send HTTP request
|
@@ -81,16 +83,16 @@ module Qismo
|
|
81
83
|
# @param headers [Hash]
|
82
84
|
# @param params [Hash]
|
83
85
|
# @param json [Hash]
|
84
|
-
# @return [Qismo::
|
85
|
-
def request(method, path,
|
86
|
-
res = connection.request(method, @url + path,
|
87
|
-
headers: headers,
|
88
|
-
params: params,
|
89
|
-
json: json
|
90
|
-
})
|
86
|
+
# @return [Qismo::ObjectifiedHash]
|
87
|
+
def request(method, path, options = {})
|
88
|
+
res = connection.request(method, @url + path, options.compact)
|
91
89
|
|
92
90
|
if res.status.success?
|
93
|
-
|
91
|
+
begin
|
92
|
+
return JSON.parse(res.to_s, object_class: Qismo::ObjectifiedHash)
|
93
|
+
rescue JSON::ParserError
|
94
|
+
return res.to_s
|
95
|
+
end
|
94
96
|
end
|
95
97
|
|
96
98
|
if res.status.server_error?
|
@@ -98,10 +100,10 @@ module Qismo
|
|
98
100
|
end
|
99
101
|
|
100
102
|
if res.status.client_error?
|
101
|
-
body =
|
103
|
+
body = JSON.parse(res.to_s, object_class: Qismo::ObjectifiedHash)
|
102
104
|
|
103
105
|
error = body.errors
|
104
|
-
error = error.message if error.is_a?(
|
106
|
+
error = error.message if error.is_a?(Hash)
|
105
107
|
|
106
108
|
error_klass_map = {
|
107
109
|
400 => BadRequestError,
|
@@ -146,7 +148,7 @@ module Qismo
|
|
146
148
|
http.headers({
|
147
149
|
"Qiscus-App-Id": @app_id,
|
148
150
|
"Qiscus-Secret-Key": @secret_key,
|
149
|
-
"User-Agent": user_agent
|
151
|
+
"User-Agent": user_agent
|
150
152
|
})
|
151
153
|
end
|
152
154
|
|
@@ -154,13 +156,23 @@ module Qismo
|
|
154
156
|
#
|
155
157
|
# @return [Hash]
|
156
158
|
def user_agent
|
157
|
-
{
|
159
|
+
format = {
|
160
|
+
lib_name: "Qismo Ruby",
|
158
161
|
lib_version: Qismo::VERSION,
|
159
162
|
lang: "ruby",
|
160
163
|
lang_version: RUBY_VERSION,
|
161
164
|
platform: RUBY_PLATFORM,
|
162
165
|
engine: defined?(RUBY_ENGINE) ? RUBY_ENGINE : ""
|
163
166
|
}
|
167
|
+
|
168
|
+
"#{format[:lib_name]}/#{format[:lib_version]} (#{format[:platform]}; #{format[:lang]}; v#{format[:lang_version]}) app_id:#{@app_id}"
|
169
|
+
end
|
170
|
+
|
171
|
+
# Default broadcast name for using in send broadcast api
|
172
|
+
#
|
173
|
+
# @return [String]
|
174
|
+
def default_broadcast_name
|
175
|
+
Time.current.strftime("%d/%m/%Y, %H:%I %z")
|
164
176
|
end
|
165
177
|
end
|
166
178
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Qismo
|
2
|
+
# Class to handle paginated response from API
|
3
|
+
#
|
4
|
+
class Collection < Array
|
5
|
+
# Collection object
|
6
|
+
#
|
7
|
+
# @param data [Array]
|
8
|
+
# @param prev_page [String,Integer]
|
9
|
+
# @param next_page [String,Integer]
|
10
|
+
# @param pagination_type [String]
|
11
|
+
def initialize(data, prev_page: nil, next_page: nil)
|
12
|
+
super(data)
|
13
|
+
|
14
|
+
@prev_page = prev_page
|
15
|
+
@next_page = next_page
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_reader :next_page
|
19
|
+
attr_reader :prev_page
|
20
|
+
end
|
21
|
+
end
|
data/lib/qismo/object.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "dry-struct"
|
2
|
+
|
3
|
+
module Qismo
|
4
|
+
# Object interface
|
5
|
+
#
|
6
|
+
class Object < Dry::Struct
|
7
|
+
include Qismo::Types
|
8
|
+
|
9
|
+
transform_keys(&:to_sym)
|
10
|
+
|
11
|
+
class << self
|
12
|
+
# Create object from array of hash
|
13
|
+
#
|
14
|
+
# @param array [Array<Hash>]
|
15
|
+
# @return [Array<Object>]
|
16
|
+
def from_array(array)
|
17
|
+
array.map { |a| new(a) }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Qismo
|
2
|
+
# Objectified hash interface for accesing hash using dot notation
|
3
|
+
#
|
4
|
+
class ObjectifiedHash < Hash
|
5
|
+
# method missing patch
|
6
|
+
def method_missing(method, *args, &block)
|
7
|
+
return super unless respond_to?(method)
|
8
|
+
|
9
|
+
fetch(method.to_s)
|
10
|
+
end
|
11
|
+
|
12
|
+
# respond to patch
|
13
|
+
def respond_to?(method_name, include_private = false)
|
14
|
+
fetch(method_name.to_s)
|
15
|
+
|
16
|
+
true
|
17
|
+
rescue KeyError
|
18
|
+
super(method_name, include_private)
|
19
|
+
end
|
20
|
+
|
21
|
+
# respond to missing patch
|
22
|
+
def respond_to_missing?(method_name, include_private = false)
|
23
|
+
fetch(method_name.to_s)
|
24
|
+
|
25
|
+
true
|
26
|
+
rescue KeyError
|
27
|
+
super(method_name, include_private)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Qismo
|
2
|
+
# Objects module to handle schema for API response
|
3
|
+
#
|
4
|
+
module Objects
|
5
|
+
# Agent service object
|
6
|
+
#
|
7
|
+
class AgentService < Qismo::Object
|
8
|
+
# @!attribute [r] created_at
|
9
|
+
# @return [String]
|
10
|
+
attribute? :created_at, Types::String.optional
|
11
|
+
|
12
|
+
# @!attribute [r] first_comment_id
|
13
|
+
# @return [String]
|
14
|
+
attribute? :first_comment_id, Types::String.optional
|
15
|
+
|
16
|
+
# @!attribute [r] first_comment_timestamp
|
17
|
+
# @return [String]
|
18
|
+
attribute? :first_comment_timestamp, Types::String.optional
|
19
|
+
|
20
|
+
# @!attribute [r] is_resolved
|
21
|
+
# @return [TrueClass,FalseClass]
|
22
|
+
attribute? :is_resolved, Types::Bool.optional
|
23
|
+
|
24
|
+
# @!attribute [r] last_comment_id
|
25
|
+
# @return [String]
|
26
|
+
attribute? :last_comment_id, Types::String.optional
|
27
|
+
|
28
|
+
# @!attribute [r] notes
|
29
|
+
# @return [String]
|
30
|
+
attribute? :notes, Types::String.optional
|
31
|
+
|
32
|
+
# @!attribute [r] resolved_at
|
33
|
+
# @return [String]
|
34
|
+
attribute? :resolved_at, Types::String.optional
|
35
|
+
|
36
|
+
# @!attribute [r] retrieved_at
|
37
|
+
# @return [String]
|
38
|
+
attribute? :retrieved_at, Types::String.optional
|
39
|
+
|
40
|
+
# @!attribute [r] room_id
|
41
|
+
# @return [Integer]
|
42
|
+
attribute? :room_id, Types::String.optional
|
43
|
+
|
44
|
+
# @!attribute [r] updated_at
|
45
|
+
# @return [String]
|
46
|
+
attribute? :updated_at, Types::String.optional
|
47
|
+
|
48
|
+
# @!attribute [r] user_id
|
49
|
+
# @return [Integer]
|
50
|
+
attribute? :user_id, Types::Int.optional
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Broadcast job object
|
4
|
+
#
|
5
|
+
class BroadcastJob < Qismo::Object
|
6
|
+
# Broadcast job user object
|
7
|
+
#
|
8
|
+
class User < Qismo::Object
|
9
|
+
# @!attribute [r] name
|
10
|
+
# @return [String]
|
11
|
+
attribute? :name, Types::String.optional
|
12
|
+
end
|
13
|
+
|
14
|
+
# @!attribute [r] user
|
15
|
+
# @return [Qismo::Objects::BroadcastJob::User]
|
16
|
+
attribute? :user, User.optional
|
17
|
+
|
18
|
+
# @!attribute [r] broadcast_job_id
|
19
|
+
# @return [Integer]
|
20
|
+
attribute? :broadcast_job_id, Types::Int.optional
|
21
|
+
|
22
|
+
# @!attribute [r] broadcast_logs
|
23
|
+
# @return [Array<Qismo::Objects::BroadcastLog>]
|
24
|
+
attribute? :broadcast_logs, Types.Array(Qismo::Objects::BroadcastLog.optional).optional
|
25
|
+
|
26
|
+
# @!attribute [r] language
|
27
|
+
# @return [String]
|
28
|
+
attribute? :language, Types::String.optional
|
29
|
+
|
30
|
+
# @!attribute [r] name
|
31
|
+
# @return [String]
|
32
|
+
attribute? :name, Types::String.optional
|
33
|
+
|
34
|
+
# @!attribute [r] namespace
|
35
|
+
# @return [String]
|
36
|
+
attribute? :namespace, Types::String.optional
|
37
|
+
|
38
|
+
# @!attribute [r] canceled_at
|
39
|
+
# @return [String]
|
40
|
+
attribute? :canceled_at, Types::String.optional
|
41
|
+
|
42
|
+
# @!attribute [r] canceled_by
|
43
|
+
# @return [Integer]
|
44
|
+
attribute? :canceled_by, Types::Int.optional
|
45
|
+
|
46
|
+
# @!attribute [r] channel_id
|
47
|
+
# @return [Integer]
|
48
|
+
attribute? :channel_id, Types::Int.optional
|
49
|
+
|
50
|
+
# @!attribute [r] channel_name
|
51
|
+
# @return [String]
|
52
|
+
attribute? :channel_name, Types::String.optional
|
53
|
+
|
54
|
+
# @!attribute [r] created_at
|
55
|
+
# @return [String]
|
56
|
+
attribute? :created_at, Types::String.optional
|
57
|
+
|
58
|
+
# @!attribute [r] id
|
59
|
+
# @return [Integer]
|
60
|
+
attribute? :id, Types::Int | Types::String
|
61
|
+
|
62
|
+
# @!attribute [r] started_at
|
63
|
+
# @return [String]
|
64
|
+
attribute? :started_at, Types::String.optional
|
65
|
+
|
66
|
+
# @!attribute [r] status
|
67
|
+
# @return [String]
|
68
|
+
attribute? :status, Types::String.optional
|
69
|
+
|
70
|
+
# @!attribute [r] template_detail_id
|
71
|
+
# @return [Integer]
|
72
|
+
attribute? :template_detail_id, Types::Int.optional
|
73
|
+
|
74
|
+
# @!attribute [r] template_id
|
75
|
+
# @return [Integer]
|
76
|
+
attribute? :template_id, Types::Int.optional
|
77
|
+
|
78
|
+
# @!attribute [r] template_name
|
79
|
+
# @return [String]
|
80
|
+
attribute? :template_name, Types::String.optional
|
81
|
+
|
82
|
+
# @!attribute [r] total_failed
|
83
|
+
# @return [Integer]
|
84
|
+
attribute? :total_failed, Types::Int.optional
|
85
|
+
|
86
|
+
# @!attribute [r] total_read
|
87
|
+
# @return [Integer]
|
88
|
+
attribute? :total_read, Types::Int.optional
|
89
|
+
|
90
|
+
# @!attribute [r] total_received
|
91
|
+
# @return [Integer]
|
92
|
+
attribute? :total_received, Types::Int.optional
|
93
|
+
|
94
|
+
# @!attribute [r] total_recipient
|
95
|
+
# @return [Integer]
|
96
|
+
attribute? :total_recipient, Types::Int.optional
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Broadcast log object
|
4
|
+
#
|
5
|
+
class BroadcastLog < Qismo::Object
|
6
|
+
# @!attribute [r] button_params
|
7
|
+
# @return [String]
|
8
|
+
attribute? :button_params, Types::String.optional
|
9
|
+
|
10
|
+
# @!attribute [r] customer_name
|
11
|
+
# @return [String]
|
12
|
+
attribute? :customer_name, Types::String.optional
|
13
|
+
|
14
|
+
# @!attribute [r] header_value
|
15
|
+
# @return [String]
|
16
|
+
attribute? :header_value, Types::String.optional
|
17
|
+
|
18
|
+
# @!attribute [r] id
|
19
|
+
# @return [Integer]
|
20
|
+
attribute? :id, Types::Int.optional
|
21
|
+
|
22
|
+
# @!attribute [r] message
|
23
|
+
# @return [String]
|
24
|
+
attribute? :message, Types::String.optional
|
25
|
+
|
26
|
+
# @!attribute [r] message_id
|
27
|
+
# @return [String]
|
28
|
+
attribute? :message_id, Types::String.optional
|
29
|
+
|
30
|
+
# @!attribute [r] notes
|
31
|
+
# @return [String]
|
32
|
+
attribute? :notes, Types::String.optional
|
33
|
+
|
34
|
+
# @!attribute [r] params
|
35
|
+
# @return [String]
|
36
|
+
attribute? :params, Types::String.optional
|
37
|
+
|
38
|
+
# @!attribute [r] phone_number
|
39
|
+
# @return [String]
|
40
|
+
attribute? :phone_number, Types::String.optional
|
41
|
+
|
42
|
+
# @!attribute [r] sent_at
|
43
|
+
# @return [String]
|
44
|
+
attribute? :sent_at, Types::String.optional
|
45
|
+
|
46
|
+
# @!attribute [r] status
|
47
|
+
# @return [String]
|
48
|
+
attribute? :status, Types::String.optional
|
49
|
+
|
50
|
+
# @!attribute [r] template_name
|
51
|
+
# @return [String]
|
52
|
+
attribute? :template_name, Types::String.optional
|
53
|
+
|
54
|
+
# @!attribute [r] variables
|
55
|
+
# @return [String]
|
56
|
+
attribute? :variables, Types::String.optional
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -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,19 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# Custom channel message response object
|
4
|
+
#
|
5
|
+
class CustomChannelMessageResponse < Qismo::Object
|
6
|
+
# @!attribute [r] agent
|
7
|
+
# @return [Qismo::Objects::User]
|
8
|
+
attribute? :agent, Qismo::Objects::User.optional
|
9
|
+
|
10
|
+
# @!attribute [r] agent_service
|
11
|
+
# @return [Qismo::Objects::AgentService]
|
12
|
+
attribute? :agent_service, Qismo::Objects::AgentService.optional
|
13
|
+
|
14
|
+
# @!attribute [r] room_log
|
15
|
+
# @return [Qismo::Objects::CustomerRoom]
|
16
|
+
attribute? :room_log, Qismo::Objects::CustomerRoom
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require "qismo/object"
|
2
|
+
|
3
|
+
module Qismo
|
4
|
+
module Objects
|
5
|
+
# Customer room object
|
6
|
+
#
|
7
|
+
class CustomerRoom < Qismo::Object
|
8
|
+
# @!attribute [r] channel_id
|
9
|
+
# @return [Integer]
|
10
|
+
attribute? :channel_id, Types::Int.optional
|
11
|
+
|
12
|
+
# @!attribute [r] contact_id
|
13
|
+
# @return [Integer]
|
14
|
+
attribute? :contact_id, Types::Int.optional
|
15
|
+
|
16
|
+
# @!attribute [r] id
|
17
|
+
# @return [Integer]
|
18
|
+
attribute? :id, Types::Int.optional
|
19
|
+
|
20
|
+
# @!attribute [r] is_handled_by_bot
|
21
|
+
# @return [TrueClass,FalseClass]
|
22
|
+
attribute? :is_handled_by_bot, Types::Bool.optional
|
23
|
+
|
24
|
+
# @!attribute [r] is_resolved
|
25
|
+
# @return [String]
|
26
|
+
attribute? :is_resolved, Types::Bool
|
27
|
+
|
28
|
+
# @!attribute [r] is_waiting
|
29
|
+
# @return [TrueClass,FalseClass]
|
30
|
+
attribute? :is_waiting, Types::Bool
|
31
|
+
|
32
|
+
# @!attribute [r] last_comment_sender
|
33
|
+
# @return [String]
|
34
|
+
attribute? :last_comment_sender, String
|
35
|
+
|
36
|
+
# @!attribute [r] last_comment_sender_type
|
37
|
+
# @return [String]
|
38
|
+
attribute? :last_comment_sender_type, Types::String.optional
|
39
|
+
|
40
|
+
# @!attribute [r] last_comment_text
|
41
|
+
# @return [String]
|
42
|
+
attribute? :last_comment_text, Types::String.optional
|
43
|
+
|
44
|
+
# @!attribute [r] last_comment_timestamp
|
45
|
+
# @return [String]
|
46
|
+
attribute? :last_comment_timestamp, Types::String.optional
|
47
|
+
|
48
|
+
# @!attribute [r] last_customer_comment_text
|
49
|
+
# @return [String]
|
50
|
+
attribute? :last_customer_comment_text, Types::String.optional
|
51
|
+
|
52
|
+
# @!attribute [r] last_customer_timestamp
|
53
|
+
# @return [String]
|
54
|
+
attribute? :last_customer_timestamp, Types::String.optional
|
55
|
+
|
56
|
+
# @!attribute [r] name
|
57
|
+
# @return [String]
|
58
|
+
attribute? :name, Types::String.optional
|
59
|
+
|
60
|
+
# @!attribute [r] room_badge
|
61
|
+
# @return [String]
|
62
|
+
attribute? :room_badge, Types::String.optional
|
63
|
+
|
64
|
+
# @!attribute [r] room_id
|
65
|
+
# @return [String]
|
66
|
+
attribute? :room_id, Types::Int.optional
|
67
|
+
|
68
|
+
# @!attribute [r] room_type
|
69
|
+
# @return [String]
|
70
|
+
attribute? :room_type, Types::String.optional
|
71
|
+
|
72
|
+
# @!attribute [r] source
|
73
|
+
# @return [String]
|
74
|
+
attribute? :source, Types::String.optional
|
75
|
+
|
76
|
+
# @!attribute [r] user_avatar_url
|
77
|
+
# @return [String]
|
78
|
+
attribute? :user_avatar_url, Types::String.optional
|
79
|
+
|
80
|
+
# @!attribute [r] user_id
|
81
|
+
# @return [String]
|
82
|
+
attribute? :user_id, Types::String.optional
|
83
|
+
end
|
84
|
+
end
|
85
|
+
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
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module Qismo
|
2
|
+
module Objects
|
3
|
+
# HSM template object
|
4
|
+
#
|
5
|
+
class HsmTemplate < Qismo::Object
|
6
|
+
# Hsm detail object
|
7
|
+
#
|
8
|
+
class HsmDetail < Qismo::Object
|
9
|
+
# Hsm detail button object
|
10
|
+
#
|
11
|
+
class Button < Qismo::Object
|
12
|
+
# @!attribute [r] text
|
13
|
+
# @return [String]
|
14
|
+
attribute? :text, Types::String.optional
|
15
|
+
|
16
|
+
# @!attribute [r] type
|
17
|
+
# @return [String]
|
18
|
+
attribute? :type, Types::String.optional
|
19
|
+
|
20
|
+
# @!attribute [r] url
|
21
|
+
# @return [String]
|
22
|
+
attribute? :url, Types::String.optional
|
23
|
+
|
24
|
+
# @!attribute [r] phone_number
|
25
|
+
# @return [String]
|
26
|
+
attribute? :phone_number, Types::String.optional
|
27
|
+
end
|
28
|
+
|
29
|
+
# @!attribute [r] approval_status
|
30
|
+
# @return [Integer]
|
31
|
+
attribute? :approval_status, Types::Int.optional
|
32
|
+
|
33
|
+
# @!attribute [r] buttons
|
34
|
+
# @return [Array<Qismo::Objects::HsmInfo::Button>]
|
35
|
+
attribute? :buttons, Types.Array(Button.optional).optional
|
36
|
+
|
37
|
+
# @!attribute [r] content
|
38
|
+
# @return [String]
|
39
|
+
attribute? :content, Types::String.optional
|
40
|
+
|
41
|
+
# @!attribute [r] footer
|
42
|
+
# @return [String]
|
43
|
+
attribute? :footer, Types::String.optional
|
44
|
+
|
45
|
+
# @!attribute [r] header_content
|
46
|
+
# @return [String]
|
47
|
+
attribute? :header_content, Types::String.optional
|
48
|
+
|
49
|
+
# @!attribute [r] header_default_value
|
50
|
+
# @return [String]
|
51
|
+
attribute? :header_default_value, Types::String.optional
|
52
|
+
|
53
|
+
# @!attribute [r] header_type
|
54
|
+
# @return [String]
|
55
|
+
attribute? :header_type, Types::String.optional
|
56
|
+
|
57
|
+
# @!attribute [r] id
|
58
|
+
# @return [Integer]
|
59
|
+
attribute? :id, Types::Int.optional
|
60
|
+
|
61
|
+
# @!attribute [r] language
|
62
|
+
# @return [String]
|
63
|
+
attribute? :language, Types::String.optional
|
64
|
+
|
65
|
+
# @!attribute [r] number_of_arguments
|
66
|
+
# @return [Integer]
|
67
|
+
attribute? :number_of_arguments, Types::Int.optional
|
68
|
+
|
69
|
+
# @!attribute [r] rejection_reason
|
70
|
+
# @return [String]
|
71
|
+
attribute? :rejection_reason, Types::String.optional
|
72
|
+
|
73
|
+
# @!attribute [r] tested
|
74
|
+
# @return [TrueClass,FalseClass]
|
75
|
+
attribute? :tested, Types::Bool.optional
|
76
|
+
end
|
77
|
+
|
78
|
+
# @!attribute [r] category
|
79
|
+
# @return [String]
|
80
|
+
attribute? :category, Types::String.optional
|
81
|
+
|
82
|
+
# @!attribute [r] channel_id
|
83
|
+
# @return [Integer]
|
84
|
+
attribute? :channel_id, Types::Int.optional
|
85
|
+
|
86
|
+
# @!attribute [r] channel_name
|
87
|
+
# @return [String]
|
88
|
+
attribute? :channel_name, Types::String.optional
|
89
|
+
|
90
|
+
# @!attribute [r] hsm_details
|
91
|
+
# @return [Array<Qismo::Objects::HsmInfo::HsmDetail>]
|
92
|
+
attribute? :hsm_details, Types.Array(HsmDetail.optional).optional
|
93
|
+
|
94
|
+
# @!attribute [r] id
|
95
|
+
# @return [Integer]
|
96
|
+
attribute? :id, Types::Int.optional
|
97
|
+
|
98
|
+
# @!attribute [r] name
|
99
|
+
# @return [String]
|
100
|
+
attribute? :name, Types::String.optional
|
101
|
+
|
102
|
+
# @!attribute [r] namespace
|
103
|
+
# @return [String]
|
104
|
+
attribute? :namespace, Types::String.optional
|
105
|
+
|
106
|
+
# @!attribute [r] type
|
107
|
+
# @return [Integer]
|
108
|
+
attribute? :type, Types::Int.optional
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|