Class: SmoochApi::AppUserApi
- Inherits:
-
Object
- Object
- SmoochApi::AppUserApi
- Defined in:
- lib/smooch-api/api/app_user_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_app_user_profile(app_id, user_id, opts = {}) ⇒ AppUserResponse
Delete specified app user’s profile.
-
#delete_app_user_profile_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Delete specified app user's profile.
-
#get_app_user(app_id, user_id, opts = {}) ⇒ AppUserResponse
Get the specified app user.
-
#get_app_user_auth_code(app_id, user_id, opts = {}) ⇒ AuthCodeResponse
Get an auth code for facilitating a channel transfer.
-
#get_app_user_auth_code_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AuthCodeResponse, Fixnum, Hash)>
Get an auth code for facilitating a channel transfer.
-
#get_app_user_business_system_ids(app_id, user_id, opts = {}) ⇒ AppUserBusinessSystemsResponse
Get specified app user’s business system IDs.
-
#get_app_user_business_system_ids_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserBusinessSystemsResponse, Fixnum, Hash)>
Get specified app user's business system IDs.
-
#get_app_user_entity_ids(app_id, user_id, opts = {}) ⇒ AppUserChannelsResponse
Get specified app user’s channel entity IDs.
-
#get_app_user_entity_ids_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserChannelsResponse, Fixnum, Hash)>
Get specified app user's channel entity IDs.
-
#get_app_user_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Get the specified app user.
-
#get_link_requests(app_id, user_id, integration_ids, opts = {}) ⇒ LinkRequestResponse
Fetch link requests for the specified app user.
-
#get_link_requests_with_http_info(app_id, user_id, integration_ids, opts = {}) ⇒ Array<(LinkRequestResponse, Fixnum, Hash)>
Fetch link requests for the specified app user.
-
#initialize(api_client = ApiClient.default) ⇒ AppUserApi
constructor
A new instance of AppUserApi.
-
#link_app_user(app_id, user_id, app_user_link_body, opts = {}) ⇒ AppUserResponse
Link specified app user to given channel.
-
#link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Link specified app user to given channel.
-
#post_image_message(app_id, user_id, source, role, opts = {}) ⇒ MessageResponse
Send an image message to the conversation.
-
#post_image_message_with_http_info(app_id, user_id, source, role, opts = {}) ⇒ Array<(MessageResponse, Fixnum, Hash)>
Send an image message to the conversation.
-
#pre_create_app_user(app_id, app_user_pre_create_body, opts = {}) ⇒ AppUserResponse
Pre-create an app user.
-
#pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Pre-create an app user.
-
#unlink_app_user(app_id, user_id, channel, opts = {}) ⇒ nil
Unlink specified app user from given channel.
-
#unlink_app_user_with_http_info(app_id, user_id, channel, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unlink specified app user from given channel.
-
#update_app_user(app_id, user_id, app_user_update_body, opts = {}) ⇒ AppUserResponse
Update the specified app user.
-
#update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Update the specified app user.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AppUserApi
Returns a new instance of AppUserApi.
19 20 21 |
# File 'lib/smooch-api/api/app_user_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/smooch-api/api/app_user_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_app_user_profile(app_id, user_id, opts = {}) ⇒ AppUserResponse
Delete specified app user’s profile.
29 30 31 32 |
# File 'lib/smooch-api/api/app_user_api.rb', line 29 def delete_app_user_profile(app_id, user_id, opts = {}) data, _status_code, _headers = delete_app_user_profile_with_http_info(app_id, user_id, opts) return data end |
#delete_app_user_profile_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Delete specified app user's profile.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/smooch-api/api/app_user_api.rb', line 40 def delete_app_user_profile_with_http_info(app_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.delete_app_user_profile ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.delete_app_user_profile" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.delete_app_user_profile" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/profile".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#delete_app_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_app_user(app_id, user_id, opts = {}) ⇒ AppUserResponse
Get the specified app user.
90 91 92 93 |
# File 'lib/smooch-api/api/app_user_api.rb', line 90 def get_app_user(app_id, user_id, opts = {}) data, _status_code, _headers = get_app_user_with_http_info(app_id, user_id, opts) return data end |
#get_app_user_auth_code(app_id, user_id, opts = {}) ⇒ AuthCodeResponse
Get an auth code for facilitating a channel transfer
151 152 153 154 |
# File 'lib/smooch-api/api/app_user_api.rb', line 151 def get_app_user_auth_code(app_id, user_id, opts = {}) data, _status_code, _headers = get_app_user_auth_code_with_http_info(app_id, user_id, opts) return data end |
#get_app_user_auth_code_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AuthCodeResponse, Fixnum, Hash)>
Get an auth code for facilitating a channel transfer
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/smooch-api/api/app_user_api.rb', line 162 def get_app_user_auth_code_with_http_info(app_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_auth_code ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user_auth_code" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_auth_code" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/authcode".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuthCodeResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#get_app_user_auth_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_app_user_business_system_ids(app_id, user_id, opts = {}) ⇒ AppUserBusinessSystemsResponse
Get specified app user’s business system IDs.
212 213 214 215 |
# File 'lib/smooch-api/api/app_user_api.rb', line 212 def get_app_user_business_system_ids(app_id, user_id, opts = {}) data, _status_code, _headers = get_app_user_business_system_ids_with_http_info(app_id, user_id, opts) return data end |
#get_app_user_business_system_ids_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserBusinessSystemsResponse, Fixnum, Hash)>
Get specified app user's business system IDs.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/smooch-api/api/app_user_api.rb', line 223 def get_app_user_business_system_ids_with_http_info(app_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_business_system_ids ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user_business_system_ids" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_business_system_ids" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/businesssystems".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserBusinessSystemsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#get_app_user_business_system_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_app_user_entity_ids(app_id, user_id, opts = {}) ⇒ AppUserChannelsResponse
Get specified app user’s channel entity IDs.
273 274 275 276 |
# File 'lib/smooch-api/api/app_user_api.rb', line 273 def get_app_user_entity_ids(app_id, user_id, opts = {}) data, _status_code, _headers = get_app_user_entity_ids_with_http_info(app_id, user_id, opts) return data end |
#get_app_user_entity_ids_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserChannelsResponse, Fixnum, Hash)>
Get specified app user's channel entity IDs.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/smooch-api/api/app_user_api.rb', line 284 def get_app_user_entity_ids_with_http_info(app_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_entity_ids ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user_entity_ids" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_entity_ids" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/channels".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserChannelsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#get_app_user_entity_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_app_user_with_http_info(app_id, user_id, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Get the specified app user.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/smooch-api/api/app_user_api.rb', line 101 def get_app_user_with_http_info(app_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.get_app_user ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#get_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_link_requests(app_id, user_id, integration_ids, opts = {}) ⇒ LinkRequestResponse
Fetch link requests for the specified app user.
335 336 337 338 |
# File 'lib/smooch-api/api/app_user_api.rb', line 335 def get_link_requests(app_id, user_id, integration_ids, opts = {}) data, _status_code, _headers = get_link_requests_with_http_info(app_id, user_id, integration_ids, opts) return data end |
#get_link_requests_with_http_info(app_id, user_id, integration_ids, opts = {}) ⇒ Array<(LinkRequestResponse, Fixnum, Hash)>
Fetch link requests for the specified app user.
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'lib/smooch-api/api/app_user_api.rb', line 347 def get_link_requests_with_http_info(app_id, user_id, integration_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.get_link_requests ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_link_requests" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_link_requests" end # verify the required parameter 'integration_ids' is set if @api_client.config.client_side_validation && integration_ids.nil? fail ArgumentError, "Missing the required parameter 'integration_ids' when calling AppUserApi.get_link_requests" end if @api_client.config.client_side_validation && integration_ids.length < 1 fail ArgumentError, 'invalid value for "integration_ids" when calling AppUserApi.get_link_requests, number of items must be greater than or equal to 1.' end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/linkrequest".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'integrationIds'] = @api_client.build_collection_param(integration_ids, :csv) # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LinkRequestResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#get_link_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#link_app_user(app_id, user_id, app_user_link_body, opts = {}) ⇒ AppUserResponse
Link specified app user to given channel.
407 408 409 410 |
# File 'lib/smooch-api/api/app_user_api.rb', line 407 def link_app_user(app_id, user_id, app_user_link_body, opts = {}) data, _status_code, _headers = link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts) return data end |
#link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Link specified app user to given channel.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/smooch-api/api/app_user_api.rb', line 419 def link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.link_app_user ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.link_app_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.link_app_user" end # verify the required parameter 'app_user_link_body' is set if @api_client.config.client_side_validation && app_user_link_body.nil? fail ArgumentError, "Missing the required parameter 'app_user_link_body' when calling AppUserApi.link_app_user" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/channels".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(app_user_link_body) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#link_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_image_message(app_id, user_id, source, role, opts = {}) ⇒ MessageResponse
Send an image message to the conversation.
475 476 477 478 |
# File 'lib/smooch-api/api/app_user_api.rb', line 475 def (app_id, user_id, source, role, opts = {}) data, _status_code, _headers = (app_id, user_id, source, role, opts) return data end |
#post_image_message_with_http_info(app_id, user_id, source, role, opts = {}) ⇒ Array<(MessageResponse, Fixnum, Hash)>
Send an image message to the conversation.
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/smooch-api/api/app_user_api.rb', line 488 def (app_id, user_id, source, role, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.post_image_message ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.post_image_message" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.post_image_message" end # verify the required parameter 'source' is set if @api_client.config.client_side_validation && source.nil? fail ArgumentError, "Missing the required parameter 'source' when calling AppUserApi.post_image_message" end # verify the required parameter 'role' is set if @api_client.config.client_side_validation && role.nil? fail ArgumentError, "Missing the required parameter 'role' when calling AppUserApi.post_image_message" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/images".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["source"] = source form_params["role"] = role # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MessageResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#post_image_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pre_create_app_user(app_id, app_user_pre_create_body, opts = {}) ⇒ AppUserResponse
Pre-create an app user.
548 549 550 551 |
# File 'lib/smooch-api/api/app_user_api.rb', line 548 def pre_create_app_user(app_id, app_user_pre_create_body, opts = {}) data, _status_code, _headers = pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts) return data end |
#pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Pre-create an app user.
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/smooch-api/api/app_user_api.rb', line 559 def pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.pre_create_app_user ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.pre_create_app_user" end # verify the required parameter 'app_user_pre_create_body' is set if @api_client.config.client_side_validation && app_user_pre_create_body.nil? fail ArgumentError, "Missing the required parameter 'app_user_pre_create_body' when calling AppUserApi.pre_create_app_user" end # resource path local_var_path = "/v1/apps/{appId}/appusers".sub('{' + 'appId' + '}', app_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(app_user_pre_create_body) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#pre_create_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unlink_app_user(app_id, user_id, channel, opts = {}) ⇒ nil
Unlink specified app user from given channel.
610 611 612 613 |
# File 'lib/smooch-api/api/app_user_api.rb', line 610 def unlink_app_user(app_id, user_id, channel, opts = {}) unlink_app_user_with_http_info(app_id, user_id, channel, opts) return nil end |
#unlink_app_user_with_http_info(app_id, user_id, channel, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unlink specified app user from given channel.
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/smooch-api/api/app_user_api.rb', line 622 def unlink_app_user_with_http_info(app_id, user_id, channel, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.unlink_app_user ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.unlink_app_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.unlink_app_user" end # verify the required parameter 'channel' is set if @api_client.config.client_side_validation && channel.nil? fail ArgumentError, "Missing the required parameter 'channel' when calling AppUserApi.unlink_app_user" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}/channels/{channel}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'channel' + '}', channel.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#unlink_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_app_user(app_id, user_id, app_user_update_body, opts = {}) ⇒ AppUserResponse
Update the specified app user.
676 677 678 679 |
# File 'lib/smooch-api/api/app_user_api.rb', line 676 def update_app_user(app_id, user_id, app_user_update_body, opts = {}) data, _status_code, _headers = update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts) return data end |
#update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts = {}) ⇒ Array<(AppUserResponse, Fixnum, Hash)>
Update the specified app user.
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/smooch-api/api/app_user_api.rb', line 688 def update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AppUserApi.update_app_user ..." end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.update_app_user" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.update_app_user" end # verify the required parameter 'app_user_update_body' is set if @api_client.config.client_side_validation && app_user_update_body.nil? fail ArgumentError, "Missing the required parameter 'app_user_update_body' when calling AppUserApi.update_app_user" end # resource path local_var_path = "/v1/apps/{appId}/appusers/{userId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(app_user_update_body) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AppUserResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppUserApi#update_app_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |