rainbow-submarine-test-3356 1.2.2
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 +7 -0
- data/Gemfile +7 -0
- data/README.md +150 -0
- data/Rakefile +8 -0
- data/docs/AppUser.md +14 -0
- data/docs/AppUserApi.md +616 -0
- data/docs/AppUserLink.md +9 -0
- data/docs/AppUserPreCreate.md +14 -0
- data/docs/AppUserResponse.md +8 -0
- data/docs/AppUserUpdate.md +12 -0
- data/docs/Client.md +12 -0
- data/docs/ClientInfo.md +15 -0
- data/docs/ClientResponse.md +8 -0
- data/docs/Conversation.md +9 -0
- data/docs/ConversationApi.md +192 -0
- data/docs/DeviceUpdate.md +10 -0
- data/docs/Event.md +8 -0
- data/docs/GetMessagesResponse.md +10 -0
- data/docs/Menu.md +9 -0
- data/docs/MenuApi.md +163 -0
- data/docs/MenuItem.md +13 -0
- data/docs/MenuResponse.md +8 -0
- data/docs/Message.md +17 -0
- data/docs/MessageResponse.md +9 -0
- data/docs/Postback.md +11 -0
- data/docs/TrackEventResponse.md +8 -0
- data/docs/TypingActivityTrigger.md +11 -0
- data/git_push.sh +55 -0
- data/lib/rainbow-submarine-test-3356.rb +61 -0
- data/lib/rainbow-submarine-test-3356/api/app_user_api.rb +585 -0
- data/lib/rainbow-submarine-test-3356/api/conversation_api.rb +189 -0
- data/lib/rainbow-submarine-test-3356/api/menu_api.rb +173 -0
- data/lib/rainbow-submarine-test-3356/api_client.rb +376 -0
- data/lib/rainbow-submarine-test-3356/api_error.rb +37 -0
- data/lib/rainbow-submarine-test-3356/configuration.rb +209 -0
- data/lib/rainbow-submarine-test-3356/models/app_user.rb +258 -0
- data/lib/rainbow-submarine-test-3356/models/app_user_link.rb +201 -0
- data/lib/rainbow-submarine-test-3356/models/app_user_pre_create.rb +246 -0
- data/lib/rainbow-submarine-test-3356/models/app_user_response.rb +192 -0
- data/lib/rainbow-submarine-test-3356/models/app_user_update.rb +223 -0
- data/lib/rainbow-submarine-test-3356/models/client.rb +248 -0
- data/lib/rainbow-submarine-test-3356/models/client_info.rb +250 -0
- data/lib/rainbow-submarine-test-3356/models/client_response.rb +187 -0
- data/lib/rainbow-submarine-test-3356/models/conversation.rb +206 -0
- data/lib/rainbow-submarine-test-3356/models/device_update.rb +205 -0
- data/lib/rainbow-submarine-test-3356/models/event.rb +192 -0
- data/lib/rainbow-submarine-test-3356/models/get_messages_response.rb +207 -0
- data/lib/rainbow-submarine-test-3356/models/menu.rb +203 -0
- data/lib/rainbow-submarine-test-3356/models/menu_item.rb +242 -0
- data/lib/rainbow-submarine-test-3356/models/menu_response.rb +192 -0
- data/lib/rainbow-submarine-test-3356/models/message.rb +303 -0
- data/lib/rainbow-submarine-test-3356/models/message_response.rb +206 -0
- data/lib/rainbow-submarine-test-3356/models/postback.rb +229 -0
- data/lib/rainbow-submarine-test-3356/models/track_event_response.rb +187 -0
- data/lib/rainbow-submarine-test-3356/models/typing_activity_trigger.rb +224 -0
- data/lib/rainbow-submarine-test-3356/version.rb +14 -0
- data/lib/swagger_client.rb +61 -0
- data/lib/swagger_client/api/app_user_api.rb +585 -0
- data/lib/swagger_client/api/conversation_api.rb +189 -0
- data/lib/swagger_client/api/menu_api.rb +173 -0
- data/lib/swagger_client/api_client.rb +376 -0
- data/lib/swagger_client/api_error.rb +37 -0
- data/lib/swagger_client/configuration.rb +209 -0
- data/lib/swagger_client/models/app_user.rb +258 -0
- data/lib/swagger_client/models/app_user_link.rb +201 -0
- data/lib/swagger_client/models/app_user_pre_create.rb +246 -0
- data/lib/swagger_client/models/app_user_response.rb +192 -0
- data/lib/swagger_client/models/app_user_update.rb +223 -0
- data/lib/swagger_client/models/client.rb +248 -0
- data/lib/swagger_client/models/client_info.rb +250 -0
- data/lib/swagger_client/models/client_response.rb +187 -0
- data/lib/swagger_client/models/conversation.rb +206 -0
- data/lib/swagger_client/models/device_update.rb +205 -0
- data/lib/swagger_client/models/event.rb +192 -0
- data/lib/swagger_client/models/get_messages_response.rb +207 -0
- data/lib/swagger_client/models/menu.rb +203 -0
- data/lib/swagger_client/models/menu_item.rb +242 -0
- data/lib/swagger_client/models/menu_response.rb +192 -0
- data/lib/swagger_client/models/message.rb +303 -0
- data/lib/swagger_client/models/message_response.rb +206 -0
- data/lib/swagger_client/models/postback.rb +229 -0
- data/lib/swagger_client/models/track_event_response.rb +187 -0
- data/lib/swagger_client/models/typing_activity_trigger.rb +224 -0
- data/lib/swagger_client/version.rb +14 -0
- data/rainbow-submarine-test-3356.gemspec +44 -0
- data/spec/api/app_user_api_spec.rb +162 -0
- data/spec/api/conversation_api_spec.rb +73 -0
- data/spec/api/menu_api_spec.rb +68 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/app_user_link_spec.rb +47 -0
- data/spec/models/app_user_pre_create_spec.rb +77 -0
- data/spec/models/app_user_response_spec.rb +41 -0
- data/spec/models/app_user_spec.rb +77 -0
- data/spec/models/app_user_update_spec.rb +65 -0
- data/spec/models/client_info_spec.rb +83 -0
- data/spec/models/client_response_spec.rb +41 -0
- data/spec/models/client_spec.rb +65 -0
- data/spec/models/conversation_spec.rb +47 -0
- data/spec/models/device_update_spec.rb +53 -0
- data/spec/models/event_spec.rb +41 -0
- data/spec/models/get_messages_response_spec.rb +53 -0
- data/spec/models/menu_item_spec.rb +71 -0
- data/spec/models/menu_response_spec.rb +41 -0
- data/spec/models/menu_spec.rb +47 -0
- data/spec/models/message_response_spec.rb +47 -0
- data/spec/models/message_spec.rb +95 -0
- data/spec/models/postback_spec.rb +59 -0
- data/spec/models/track_event_response_spec.rb +41 -0
- data/spec/models/typing_activity_trigger_spec.rb +59 -0
- data/spec/spec_helper.rb +110 -0
- data/swagger_client.gemspec +45 -0
- metadata +361 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
=begin
|
2
|
+
#Smooch
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
module RainbowSubmarineTest3356
|
13
|
+
VERSION = "1.2.2"
|
14
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
#Smooch
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
# Common files
|
13
|
+
require 'swagger_client/api_client'
|
14
|
+
require 'swagger_client/api_error'
|
15
|
+
require 'swagger_client/version'
|
16
|
+
require 'swagger_client/configuration'
|
17
|
+
|
18
|
+
# Models
|
19
|
+
require 'swagger_client/models/app_user'
|
20
|
+
require 'swagger_client/models/app_user_link'
|
21
|
+
require 'swagger_client/models/app_user_pre_create'
|
22
|
+
require 'swagger_client/models/app_user_response'
|
23
|
+
require 'swagger_client/models/app_user_update'
|
24
|
+
require 'swagger_client/models/client'
|
25
|
+
require 'swagger_client/models/client_info'
|
26
|
+
require 'swagger_client/models/client_response'
|
27
|
+
require 'swagger_client/models/conversation'
|
28
|
+
require 'swagger_client/models/device_update'
|
29
|
+
require 'swagger_client/models/event'
|
30
|
+
require 'swagger_client/models/get_messages_response'
|
31
|
+
require 'swagger_client/models/menu'
|
32
|
+
require 'swagger_client/models/menu_item'
|
33
|
+
require 'swagger_client/models/menu_response'
|
34
|
+
require 'swagger_client/models/message'
|
35
|
+
require 'swagger_client/models/message_response'
|
36
|
+
require 'swagger_client/models/postback'
|
37
|
+
require 'swagger_client/models/track_event_response'
|
38
|
+
require 'swagger_client/models/typing_activity_trigger'
|
39
|
+
|
40
|
+
# APIs
|
41
|
+
require 'swagger_client/api/app_user_api'
|
42
|
+
require 'swagger_client/api/conversation_api'
|
43
|
+
require 'swagger_client/api/menu_api'
|
44
|
+
|
45
|
+
module SwaggerClient
|
46
|
+
class << self
|
47
|
+
# Customize default settings for the SDK using block.
|
48
|
+
# SwaggerClient.configure do |config|
|
49
|
+
# config.username = "xxx"
|
50
|
+
# config.password = "xxx"
|
51
|
+
# end
|
52
|
+
# If no block given, return the default Configuration object.
|
53
|
+
def configure
|
54
|
+
if block_given?
|
55
|
+
yield(Configuration.default)
|
56
|
+
else
|
57
|
+
Configuration.default
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,585 @@
|
|
1
|
+
=begin
|
2
|
+
#Smooch
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require "uri"
|
13
|
+
|
14
|
+
module SwaggerClient
|
15
|
+
class AppUserApi
|
16
|
+
attr_accessor :api_client
|
17
|
+
|
18
|
+
def initialize(api_client = ApiClient.default)
|
19
|
+
@api_client = api_client
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# Update specified device information.
|
24
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
25
|
+
# @param device_id Id of the device.
|
26
|
+
# @param app_user_device_update Supported properties for an updateAppUserDevice request.
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [ClientResponse]
|
29
|
+
def app_user_device_update(user_id, device_id, app_user_device_update, opts = {})
|
30
|
+
data, _status_code, _headers = app_user_device_update_with_http_info(user_id, device_id, app_user_device_update, opts)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# Update specified device information.
|
36
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
37
|
+
# @param device_id Id of the device.
|
38
|
+
# @param app_user_device_update Supported properties for an updateAppUserDevice request.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Array<(ClientResponse, Fixnum, Hash)>] ClientResponse data, response status code and response headers
|
41
|
+
def app_user_device_update_with_http_info(user_id, device_id, app_user_device_update, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.app_user_device_update ..."
|
44
|
+
end
|
45
|
+
# verify the required parameter 'user_id' is set
|
46
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.app_user_device_update" if user_id.nil?
|
47
|
+
# verify the required parameter 'device_id' is set
|
48
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling AppUserApi.app_user_device_update" if device_id.nil?
|
49
|
+
# verify the required parameter 'app_user_device_update' is set
|
50
|
+
fail ArgumentError, "Missing the required parameter 'app_user_device_update' when calling AppUserApi.app_user_device_update" if app_user_device_update.nil?
|
51
|
+
# resource path
|
52
|
+
local_var_path = "/appusers/{userId}/devices/{deviceId}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'deviceId' + '}', device_id.to_s)
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = @api_client.object_to_http_body(app_user_device_update)
|
69
|
+
auth_names = ['appToken', 'jwt']
|
70
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => 'ClientResponse')
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: AppUserApi#app_user_device_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# Delete specified app users profile.
|
85
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [AppUserResponse]
|
88
|
+
def delete_app_user_profile(user_id, opts = {})
|
89
|
+
data, _status_code, _headers = delete_app_user_profile_with_http_info(user_id, opts)
|
90
|
+
return data
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# Delete specified app users profile.
|
95
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
98
|
+
def delete_app_user_profile_with_http_info(user_id, opts = {})
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.delete_app_user_profile ..."
|
101
|
+
end
|
102
|
+
# verify the required parameter 'user_id' is set
|
103
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.delete_app_user_profile" if user_id.nil?
|
104
|
+
# resource path
|
105
|
+
local_var_path = "/appusers/{userId}/profile".sub('{' + 'userId' + '}', user_id.to_s)
|
106
|
+
|
107
|
+
# query parameters
|
108
|
+
query_params = {}
|
109
|
+
|
110
|
+
# header parameters
|
111
|
+
header_params = {}
|
112
|
+
# HTTP header 'Accept' (if needed)
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = ['appToken', 'jwt']
|
123
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'AppUserResponse')
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: AppUserApi#delete_app_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Get the specified app user.
|
138
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [AppUserResponse]
|
141
|
+
def get_app_user(user_id, opts = {})
|
142
|
+
data, _status_code, _headers = get_app_user_with_http_info(user_id, opts)
|
143
|
+
return data
|
144
|
+
end
|
145
|
+
|
146
|
+
#
|
147
|
+
# Get the specified app user.
|
148
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
151
|
+
def get_app_user_with_http_info(user_id, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.get_app_user ..."
|
154
|
+
end
|
155
|
+
# verify the required parameter 'user_id' is set
|
156
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user" if user_id.nil?
|
157
|
+
# resource path
|
158
|
+
local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)
|
159
|
+
|
160
|
+
# query parameters
|
161
|
+
query_params = {}
|
162
|
+
|
163
|
+
# header parameters
|
164
|
+
header_params = {}
|
165
|
+
# HTTP header 'Accept' (if needed)
|
166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
167
|
+
# HTTP header 'Content-Type'
|
168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
169
|
+
|
170
|
+
# form parameters
|
171
|
+
form_params = {}
|
172
|
+
|
173
|
+
# http body (model)
|
174
|
+
post_body = nil
|
175
|
+
auth_names = ['appToken', 'jwt']
|
176
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
177
|
+
:header_params => header_params,
|
178
|
+
:query_params => query_params,
|
179
|
+
:form_params => form_params,
|
180
|
+
:body => post_body,
|
181
|
+
:auth_names => auth_names,
|
182
|
+
:return_type => 'AppUserResponse')
|
183
|
+
if @api_client.config.debugging
|
184
|
+
@api_client.config.logger.debug "API called: AppUserApi#get_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
185
|
+
end
|
186
|
+
return data, status_code, headers
|
187
|
+
end
|
188
|
+
|
189
|
+
#
|
190
|
+
# Get specified app users channel entity IDs.
|
191
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [AppUserResponse]
|
194
|
+
def get_app_user_entity_ids(user_id, opts = {})
|
195
|
+
data, _status_code, _headers = get_app_user_entity_ids_with_http_info(user_id, opts)
|
196
|
+
return data
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
# Get specified app users channel entity IDs.
|
201
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
202
|
+
# @param [Hash] opts the optional parameters
|
203
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
204
|
+
def get_app_user_entity_ids_with_http_info(user_id, opts = {})
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_entity_ids ..."
|
207
|
+
end
|
208
|
+
# verify the required parameter 'user_id' is set
|
209
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_entity_ids" if user_id.nil?
|
210
|
+
# resource path
|
211
|
+
local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)
|
212
|
+
|
213
|
+
# query parameters
|
214
|
+
query_params = {}
|
215
|
+
|
216
|
+
# header parameters
|
217
|
+
header_params = {}
|
218
|
+
# HTTP header 'Accept' (if needed)
|
219
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
220
|
+
# HTTP header 'Content-Type'
|
221
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
222
|
+
|
223
|
+
# form parameters
|
224
|
+
form_params = {}
|
225
|
+
|
226
|
+
# http body (model)
|
227
|
+
post_body = nil
|
228
|
+
auth_names = ['appToken', 'jwt']
|
229
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
230
|
+
:header_params => header_params,
|
231
|
+
:query_params => query_params,
|
232
|
+
:form_params => form_params,
|
233
|
+
:body => post_body,
|
234
|
+
:auth_names => auth_names,
|
235
|
+
:return_type => 'AppUserResponse')
|
236
|
+
if @api_client.config.debugging
|
237
|
+
@api_client.config.logger.debug "API called: AppUserApi#get_app_user_entity_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
238
|
+
end
|
239
|
+
return data, status_code, headers
|
240
|
+
end
|
241
|
+
|
242
|
+
#
|
243
|
+
# Link specified app user to given channel.
|
244
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
245
|
+
# @param app_user_link Supported properties for a linkAppUser request.
|
246
|
+
# @param [Hash] opts the optional parameters
|
247
|
+
# @return [AppUserResponse]
|
248
|
+
def link_app_user(user_id, app_user_link, opts = {})
|
249
|
+
data, _status_code, _headers = link_app_user_with_http_info(user_id, app_user_link, opts)
|
250
|
+
return data
|
251
|
+
end
|
252
|
+
|
253
|
+
#
|
254
|
+
# Link specified app user to given channel.
|
255
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
256
|
+
# @param app_user_link Supported properties for a linkAppUser request.
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
259
|
+
def link_app_user_with_http_info(user_id, app_user_link, opts = {})
|
260
|
+
if @api_client.config.debugging
|
261
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.link_app_user ..."
|
262
|
+
end
|
263
|
+
# verify the required parameter 'user_id' is set
|
264
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.link_app_user" if user_id.nil?
|
265
|
+
# verify the required parameter 'app_user_link' is set
|
266
|
+
fail ArgumentError, "Missing the required parameter 'app_user_link' when calling AppUserApi.link_app_user" if app_user_link.nil?
|
267
|
+
# resource path
|
268
|
+
local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = {}
|
272
|
+
|
273
|
+
# header parameters
|
274
|
+
header_params = {}
|
275
|
+
# HTTP header 'Accept' (if needed)
|
276
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
277
|
+
# HTTP header 'Content-Type'
|
278
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
279
|
+
|
280
|
+
# form parameters
|
281
|
+
form_params = {}
|
282
|
+
|
283
|
+
# http body (model)
|
284
|
+
post_body = @api_client.object_to_http_body(app_user_link)
|
285
|
+
auth_names = ['appToken', 'jwt']
|
286
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
287
|
+
:header_params => header_params,
|
288
|
+
:query_params => query_params,
|
289
|
+
:form_params => form_params,
|
290
|
+
:body => post_body,
|
291
|
+
:auth_names => auth_names,
|
292
|
+
:return_type => 'AppUserResponse')
|
293
|
+
if @api_client.config.debugging
|
294
|
+
@api_client.config.logger.debug "API called: AppUserApi#link_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
295
|
+
end
|
296
|
+
return data, status_code, headers
|
297
|
+
end
|
298
|
+
|
299
|
+
#
|
300
|
+
# Send an image message to the conversation
|
301
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
302
|
+
# @param source Image to be uploaded
|
303
|
+
# @param role Role of the sender
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @return [MessageResponse]
|
306
|
+
def post_image_message(user_id, source, role, opts = {})
|
307
|
+
data, _status_code, _headers = post_image_message_with_http_info(user_id, source, role, opts)
|
308
|
+
return data
|
309
|
+
end
|
310
|
+
|
311
|
+
#
|
312
|
+
# Send an image message to the conversation
|
313
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
314
|
+
# @param source Image to be uploaded
|
315
|
+
# @param role Role of the sender
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @return [Array<(MessageResponse, Fixnum, Hash)>] MessageResponse data, response status code and response headers
|
318
|
+
def post_image_message_with_http_info(user_id, source, role, opts = {})
|
319
|
+
if @api_client.config.debugging
|
320
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.post_image_message ..."
|
321
|
+
end
|
322
|
+
# verify the required parameter 'user_id' is set
|
323
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.post_image_message" if user_id.nil?
|
324
|
+
# verify the required parameter 'source' is set
|
325
|
+
fail ArgumentError, "Missing the required parameter 'source' when calling AppUserApi.post_image_message" if source.nil?
|
326
|
+
# verify the required parameter 'role' is set
|
327
|
+
fail ArgumentError, "Missing the required parameter 'role' when calling AppUserApi.post_image_message" if role.nil?
|
328
|
+
# resource path
|
329
|
+
local_var_path = "/appusers/{userId}/images".sub('{' + 'userId' + '}', user_id.to_s)
|
330
|
+
|
331
|
+
# query parameters
|
332
|
+
query_params = {}
|
333
|
+
|
334
|
+
# header parameters
|
335
|
+
header_params = {}
|
336
|
+
# HTTP header 'Accept' (if needed)
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
338
|
+
# HTTP header 'Content-Type'
|
339
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
340
|
+
|
341
|
+
# form parameters
|
342
|
+
form_params = {}
|
343
|
+
form_params["source"] = source
|
344
|
+
form_params["role"] = role
|
345
|
+
|
346
|
+
# http body (model)
|
347
|
+
post_body = nil
|
348
|
+
auth_names = ['appToken', 'jwt']
|
349
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
350
|
+
:header_params => header_params,
|
351
|
+
:query_params => query_params,
|
352
|
+
:form_params => form_params,
|
353
|
+
:body => post_body,
|
354
|
+
:auth_names => auth_names,
|
355
|
+
:return_type => 'MessageResponse')
|
356
|
+
if @api_client.config.debugging
|
357
|
+
@api_client.config.logger.debug "API called: AppUserApi#post_image_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
358
|
+
end
|
359
|
+
return data, status_code, headers
|
360
|
+
end
|
361
|
+
|
362
|
+
#
|
363
|
+
# Pre-create an app user.
|
364
|
+
# @param app_user_pre_create Supported properties for a preCreateAppUser request.
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @return [AppUserResponse]
|
367
|
+
def pre_create_app_user(app_user_pre_create, opts = {})
|
368
|
+
data, _status_code, _headers = pre_create_app_user_with_http_info(app_user_pre_create, opts)
|
369
|
+
return data
|
370
|
+
end
|
371
|
+
|
372
|
+
#
|
373
|
+
# Pre-create an app user.
|
374
|
+
# @param app_user_pre_create Supported properties for a preCreateAppUser request.
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
377
|
+
def pre_create_app_user_with_http_info(app_user_pre_create, opts = {})
|
378
|
+
if @api_client.config.debugging
|
379
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.pre_create_app_user ..."
|
380
|
+
end
|
381
|
+
# verify the required parameter 'app_user_pre_create' is set
|
382
|
+
fail ArgumentError, "Missing the required parameter 'app_user_pre_create' when calling AppUserApi.pre_create_app_user" if app_user_pre_create.nil?
|
383
|
+
# resource path
|
384
|
+
local_var_path = "/appusers"
|
385
|
+
|
386
|
+
# query parameters
|
387
|
+
query_params = {}
|
388
|
+
|
389
|
+
# header parameters
|
390
|
+
header_params = {}
|
391
|
+
# HTTP header 'Accept' (if needed)
|
392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
393
|
+
# HTTP header 'Content-Type'
|
394
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
395
|
+
|
396
|
+
# form parameters
|
397
|
+
form_params = {}
|
398
|
+
|
399
|
+
# http body (model)
|
400
|
+
post_body = @api_client.object_to_http_body(app_user_pre_create)
|
401
|
+
auth_names = ['jwt']
|
402
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
403
|
+
:header_params => header_params,
|
404
|
+
:query_params => query_params,
|
405
|
+
:form_params => form_params,
|
406
|
+
:body => post_body,
|
407
|
+
:auth_names => auth_names,
|
408
|
+
:return_type => 'AppUserResponse')
|
409
|
+
if @api_client.config.debugging
|
410
|
+
@api_client.config.logger.debug "API called: AppUserApi#pre_create_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
411
|
+
end
|
412
|
+
return data, status_code, headers
|
413
|
+
end
|
414
|
+
|
415
|
+
#
|
416
|
+
# Track an event for the given app user.
|
417
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
418
|
+
# @param event Supported properties for a trackEvent request.
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @return [TrackEventResponse]
|
421
|
+
def track_event(user_id, event, opts = {})
|
422
|
+
data, _status_code, _headers = track_event_with_http_info(user_id, event, opts)
|
423
|
+
return data
|
424
|
+
end
|
425
|
+
|
426
|
+
#
|
427
|
+
# Track an event for the given app user.
|
428
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
429
|
+
# @param event Supported properties for a trackEvent request.
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @return [Array<(TrackEventResponse, Fixnum, Hash)>] TrackEventResponse data, response status code and response headers
|
432
|
+
def track_event_with_http_info(user_id, event, opts = {})
|
433
|
+
if @api_client.config.debugging
|
434
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.track_event ..."
|
435
|
+
end
|
436
|
+
# verify the required parameter 'user_id' is set
|
437
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.track_event" if user_id.nil?
|
438
|
+
# verify the required parameter 'event' is set
|
439
|
+
fail ArgumentError, "Missing the required parameter 'event' when calling AppUserApi.track_event" if event.nil?
|
440
|
+
# resource path
|
441
|
+
local_var_path = "/appusers/{userId}/events".sub('{' + 'userId' + '}', user_id.to_s)
|
442
|
+
|
443
|
+
# query parameters
|
444
|
+
query_params = {}
|
445
|
+
|
446
|
+
# header parameters
|
447
|
+
header_params = {}
|
448
|
+
# HTTP header 'Accept' (if needed)
|
449
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
450
|
+
# HTTP header 'Content-Type'
|
451
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
452
|
+
|
453
|
+
# form parameters
|
454
|
+
form_params = {}
|
455
|
+
|
456
|
+
# http body (model)
|
457
|
+
post_body = @api_client.object_to_http_body(event)
|
458
|
+
auth_names = ['appToken', 'jwt']
|
459
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
460
|
+
:header_params => header_params,
|
461
|
+
:query_params => query_params,
|
462
|
+
:form_params => form_params,
|
463
|
+
:body => post_body,
|
464
|
+
:auth_names => auth_names,
|
465
|
+
:return_type => 'TrackEventResponse')
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug "API called: AppUserApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
468
|
+
end
|
469
|
+
return data, status_code, headers
|
470
|
+
end
|
471
|
+
|
472
|
+
#
|
473
|
+
# Unlink specified app user from given channel.
|
474
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
475
|
+
# @param channel Name of the channel.
|
476
|
+
# @param [Hash] opts the optional parameters
|
477
|
+
# @return [nil]
|
478
|
+
def unlink_app_user(user_id, channel, opts = {})
|
479
|
+
unlink_app_user_with_http_info(user_id, channel, opts)
|
480
|
+
return nil
|
481
|
+
end
|
482
|
+
|
483
|
+
#
|
484
|
+
# Unlink specified app user from given channel.
|
485
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
486
|
+
# @param channel Name of the channel.
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
489
|
+
def unlink_app_user_with_http_info(user_id, channel, opts = {})
|
490
|
+
if @api_client.config.debugging
|
491
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.unlink_app_user ..."
|
492
|
+
end
|
493
|
+
# verify the required parameter 'user_id' is set
|
494
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.unlink_app_user" if user_id.nil?
|
495
|
+
# verify the required parameter 'channel' is set
|
496
|
+
fail ArgumentError, "Missing the required parameter 'channel' when calling AppUserApi.unlink_app_user" if channel.nil?
|
497
|
+
# resource path
|
498
|
+
local_var_path = "/appusers/{userId}/channels/{channel}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'channel' + '}', channel.to_s)
|
499
|
+
|
500
|
+
# query parameters
|
501
|
+
query_params = {}
|
502
|
+
|
503
|
+
# header parameters
|
504
|
+
header_params = {}
|
505
|
+
# HTTP header 'Accept' (if needed)
|
506
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
507
|
+
# HTTP header 'Content-Type'
|
508
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
509
|
+
|
510
|
+
# form parameters
|
511
|
+
form_params = {}
|
512
|
+
|
513
|
+
# http body (model)
|
514
|
+
post_body = nil
|
515
|
+
auth_names = ['appToken', 'jwt']
|
516
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
517
|
+
:header_params => header_params,
|
518
|
+
:query_params => query_params,
|
519
|
+
:form_params => form_params,
|
520
|
+
:body => post_body,
|
521
|
+
:auth_names => auth_names)
|
522
|
+
if @api_client.config.debugging
|
523
|
+
@api_client.config.logger.debug "API called: AppUserApi#unlink_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
524
|
+
end
|
525
|
+
return data, status_code, headers
|
526
|
+
end
|
527
|
+
|
528
|
+
#
|
529
|
+
# Update the specified app user.
|
530
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
531
|
+
# @param app_user_update Supported properties for an updateAppUser request.
|
532
|
+
# @param [Hash] opts the optional parameters
|
533
|
+
# @return [AppUserResponse]
|
534
|
+
def update_app_user(user_id, app_user_update, opts = {})
|
535
|
+
data, _status_code, _headers = update_app_user_with_http_info(user_id, app_user_update, opts)
|
536
|
+
return data
|
537
|
+
end
|
538
|
+
|
539
|
+
#
|
540
|
+
# Update the specified app user.
|
541
|
+
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
542
|
+
# @param app_user_update Supported properties for an updateAppUser request.
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
545
|
+
def update_app_user_with_http_info(user_id, app_user_update, opts = {})
|
546
|
+
if @api_client.config.debugging
|
547
|
+
@api_client.config.logger.debug "Calling API: AppUserApi.update_app_user ..."
|
548
|
+
end
|
549
|
+
# verify the required parameter 'user_id' is set
|
550
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.update_app_user" if user_id.nil?
|
551
|
+
# verify the required parameter 'app_user_update' is set
|
552
|
+
fail ArgumentError, "Missing the required parameter 'app_user_update' when calling AppUserApi.update_app_user" if app_user_update.nil?
|
553
|
+
# resource path
|
554
|
+
local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)
|
555
|
+
|
556
|
+
# query parameters
|
557
|
+
query_params = {}
|
558
|
+
|
559
|
+
# header parameters
|
560
|
+
header_params = {}
|
561
|
+
# HTTP header 'Accept' (if needed)
|
562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
563
|
+
# HTTP header 'Content-Type'
|
564
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
565
|
+
|
566
|
+
# form parameters
|
567
|
+
form_params = {}
|
568
|
+
|
569
|
+
# http body (model)
|
570
|
+
post_body = @api_client.object_to_http_body(app_user_update)
|
571
|
+
auth_names = ['appToken', 'jwt']
|
572
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
573
|
+
:header_params => header_params,
|
574
|
+
:query_params => query_params,
|
575
|
+
:form_params => form_params,
|
576
|
+
:body => post_body,
|
577
|
+
:auth_names => auth_names,
|
578
|
+
:return_type => 'AppUserResponse')
|
579
|
+
if @api_client.config.debugging
|
580
|
+
@api_client.config.logger.debug "API called: AppUserApi#update_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
581
|
+
end
|
582
|
+
return data, status_code, headers
|
583
|
+
end
|
584
|
+
end
|
585
|
+
end
|