Class: ArtikCloud::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/artikcloud/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



18
19
20
# File 'lib/artikcloud/api/users_api.rb', line 18

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/artikcloud/api/users_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#create_user_properties(user_id, properties, opts = {}) ⇒ PropertiesEnvelope

Create User Application Properties Create application properties for a user

Parameters:

  • user_id

    User Id

  • properties

    Properties to be updated

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:



29
30
31
32
# File 'lib/artikcloud/api/users_api.rb', line 29

def create_user_properties(user_id, properties, opts = {})
  data, _status_code, _headers = create_user_properties_with_http_info(user_id, properties, opts)
  return data
end

#create_user_properties_with_http_info(user_id, properties, opts = {}) ⇒ Array<(PropertiesEnvelope, Fixnum, Hash)>

Create User Application Properties Create application properties for a user

Parameters:

  • user_id

    User Id

  • properties

    Properties to be updated

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:

  • (Array<(PropertiesEnvelope, Fixnum, Hash)>)

    PropertiesEnvelope data, response status code and response headers



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
# File 'lib/artikcloud/api/users_api.rb', line 41

def create_user_properties_with_http_info(user_id, properties, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.create_user_properties ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.create_user_properties" if user_id.nil?
  # verify the required parameter 'properties' is set
  fail ArgumentError, "Missing the required parameter 'properties' when calling UsersApi.create_user_properties" if properties.nil?
  # resource path
  local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'aid'] = opts[:'aid'] if !opts[:'aid'].nil?

  # 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(properties)
  auth_names = ['artikcloud_oauth']
  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 => 'PropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_user_properties(user_id, opts = {}) ⇒ PropertiesEnvelope

Delete User Application Properties Deletes a user’s application properties

Parameters:

  • user_id

    User Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:



88
89
90
91
# File 'lib/artikcloud/api/users_api.rb', line 88

def delete_user_properties(user_id, opts = {})
  data, _status_code, _headers = delete_user_properties_with_http_info(user_id, opts)
  return data
end

#delete_user_properties_with_http_info(user_id, opts = {}) ⇒ Array<(PropertiesEnvelope, Fixnum, Hash)>

Delete User Application Properties Deletes a user&#39;s application properties

Parameters:

  • user_id

    User Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:

  • (Array<(PropertiesEnvelope, Fixnum, Hash)>)

    PropertiesEnvelope data, response status code and response headers



99
100
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
# File 'lib/artikcloud/api/users_api.rb', line 99

def delete_user_properties_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.delete_user_properties ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_properties" if user_id.nil?
  # resource path
  local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'aid'] = opts[:'aid'] if !opts[:'aid'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'PropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#delete_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self(opts = {}) ⇒ UserEnvelope

Get Current User Profile Get’s the current user’s profile

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



140
141
142
143
# File 'lib/artikcloud/api/users_api.rb', line 140

def get_self(opts = {})
  data, _status_code, _headers = get_self_with_http_info(opts)
  return data
end

#get_self_with_http_info(opts = {}) ⇒ Array<(UserEnvelope, Fixnum, Hash)>

Get Current User Profile Get&#39;s the current user&#39;s profile

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UserEnvelope, Fixnum, Hash)>)

    UserEnvelope data, response status code and response headers



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/artikcloud/api/users_api.rb', line 149

def get_self_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_self ..."
  end
  # resource path
  local_var_path = "/users/self".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'UserEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_self\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_device_types(user_id, opts = {}) ⇒ DeviceTypesEnvelope

Get User Device Types Retrieve User’s Device Types

Parameters:

  • user_id

    User ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :include_shared (BOOLEAN)

    Optional. Boolean (true/false) - If false, only return the user&#39;s device types. If true, also return device types shared by other users.

Returns:



191
192
193
194
# File 'lib/artikcloud/api/users_api.rb', line 191

def get_user_device_types(user_id, opts = {})
  data, _status_code, _headers = get_user_device_types_with_http_info(user_id, opts)
  return data
end

#get_user_device_types_with_http_info(user_id, opts = {}) ⇒ Array<(DeviceTypesEnvelope, Fixnum, Hash)>

Get User Device Types Retrieve User&#39;s Device Types

Parameters:

  • user_id

    User ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :include_shared (BOOLEAN)

    Optional. Boolean (true/false) - If false, only return the user&#39;s device types. If true, also return device types shared by other users.

Returns:

  • (Array<(DeviceTypesEnvelope, Fixnum, Hash)>)

    DeviceTypesEnvelope data, response status code and response headers



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/artikcloud/api/users_api.rb', line 204

def get_user_device_types_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_device_types ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_device_types" if user_id.nil?
  # resource path
  local_var_path = "/users/{userId}/devicetypes".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'includeShared'] = opts[:'include_shared'] if !opts[:'include_shared'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'DeviceTypesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_device_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_devices(user_id, opts = {}) ⇒ DevicesEnvelope

Get User Devices Retrieve User’s Devices

Parameters:

  • user_id

    User ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :include_properties (BOOLEAN)

    Optional. Boolean (true/false) - If false, only return the user&#39;s device types. If true, also return device types shared by other users.

  • :owner (String)

    Return owned and/or shared devices. Default to ALL.

  • :include_share_info (BOOLEAN)

    Include share info

  • :dtid (String)

    Return only devices of this device type. If empty, assumes all device types allowed by the authorization.

Returns:



254
255
256
257
# File 'lib/artikcloud/api/users_api.rb', line 254

def get_user_devices(user_id, opts = {})
  data, _status_code, _headers = get_user_devices_with_http_info(user_id, opts)
  return data
end

#get_user_devices_with_http_info(user_id, opts = {}) ⇒ Array<(DevicesEnvelope, Fixnum, Hash)>

Get User Devices Retrieve User&#39;s Devices

Parameters:

  • user_id

    User ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :include_properties (BOOLEAN)

    Optional. Boolean (true/false) - If false, only return the user&#39;s device types. If true, also return device types shared by other users.

  • :owner (String)

    Return owned and/or shared devices. Default to ALL.

  • :include_share_info (BOOLEAN)

    Include share info

  • :dtid (String)

    Return only devices of this device type. If empty, assumes all device types allowed by the authorization.

Returns:

  • (Array<(DevicesEnvelope, Fixnum, Hash)>)

    DevicesEnvelope data, response status code and response headers



270
271
272
273
274
275
276
277
278
279
280
281
282
283
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
# File 'lib/artikcloud/api/users_api.rb', line 270

def get_user_devices_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_devices ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_devices" if user_id.nil?
  # resource path
  local_var_path = "/users/{userId}/devices".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'includeProperties'] = opts[:'include_properties'] if !opts[:'include_properties'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?
  query_params[:'includeShareInfo'] = opts[:'include_share_info'] if !opts[:'include_share_info'].nil?
  query_params[:'dtid'] = opts[:'dtid'] if !opts[:'dtid'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'DevicesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_properties(user_id, opts = {}) ⇒ PropertiesEnvelope

Get User application properties Get application properties of a user

Parameters:

  • user_id

    User Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:



318
319
320
321
# File 'lib/artikcloud/api/users_api.rb', line 318

def get_user_properties(user_id, opts = {})
  data, _status_code, _headers = get_user_properties_with_http_info(user_id, opts)
  return data
end

#get_user_properties_with_http_info(user_id, opts = {}) ⇒ Array<(PropertiesEnvelope, Fixnum, Hash)>

Get User application properties Get application properties of a user

Parameters:

  • user_id

    User Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:

  • (Array<(PropertiesEnvelope, Fixnum, Hash)>)

    PropertiesEnvelope data, response status code and response headers



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/artikcloud/api/users_api.rb', line 329

def get_user_properties_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_properties ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_properties" if user_id.nil?
  # resource path
  local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'aid'] = opts[:'aid'] if !opts[:'aid'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'PropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_rules(user_id, opts = {}) ⇒ RulesEnvelope

Get User Rules Retrieve User’s Rules

Parameters:

  • user_id

    User ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :exclude_disabled (BOOLEAN)

    Exclude disabled rules in the result.

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

  • :owner (String)

    Rule owner

Returns:



375
376
377
378
# File 'lib/artikcloud/api/users_api.rb', line 375

def get_user_rules(user_id, opts = {})
  data, _status_code, _headers = get_user_rules_with_http_info(user_id, opts)
  return data
end

#get_user_rules_with_http_info(user_id, opts = {}) ⇒ Array<(RulesEnvelope, Fixnum, Hash)>

Get User Rules Retrieve User&#39;s Rules

Parameters:

  • user_id

    User ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :exclude_disabled (BOOLEAN)

    Exclude disabled rules in the result.

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

  • :owner (String)

    Rule owner

Returns:

  • (Array<(RulesEnvelope, Fixnum, Hash)>)

    RulesEnvelope data, response status code and response headers



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/artikcloud/api/users_api.rb', line 389

def get_user_rules_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_rules ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_rules" if user_id.nil?
  if opts[:'owner'] && !['user', 'application', 'all'].include?(opts[:'owner'])
    fail ArgumentError, 'invalid value for "owner", must be one of user, application, all'
  end
  # resource path
  local_var_path = "/users/{userId}/rules".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'excludeDisabled'] = opts[:'exclude_disabled'] if !opts[:'exclude_disabled'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'RulesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_all_shares_for_user(user_id, filter, opts = {}) ⇒ DeviceSharingEnvelope

Get User shares Get User shares

Parameters:

  • user_id

    User ID.

  • filter

    filter

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

Returns:



440
441
442
443
# File 'lib/artikcloud/api/users_api.rb', line 440

def list_all_shares_for_user(user_id, filter, opts = {})
  data, _status_code, _headers = list_all_shares_for_user_with_http_info(user_id, filter, opts)
  return data
end

#list_all_shares_for_user_with_http_info(user_id, filter, opts = {}) ⇒ Array<(DeviceSharingEnvelope, Fixnum, Hash)>

Get User shares Get User shares

Parameters:

  • user_id

    User ID.

  • filter

    filter

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

Returns:

  • (Array<(DeviceSharingEnvelope, Fixnum, Hash)>)

    DeviceSharingEnvelope data, response status code and response headers



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/artikcloud/api/users_api.rb', line 453

def list_all_shares_for_user_with_http_info(user_id, filter, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.list_all_shares_for_user ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.list_all_shares_for_user" if user_id.nil?
  # verify the required parameter 'filter' is set
  fail ArgumentError, "Missing the required parameter 'filter' when calling UsersApi.list_all_shares_for_user" if filter.nil?
  # resource path
  local_var_path = "/users/{userId}/shares".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'filter'] = filter
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_oauth']
  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 => 'DeviceSharingEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#list_all_shares_for_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user_properties(user_id, properties, opts = {}) ⇒ PropertiesEnvelope

Update User Application Properties Updates application properties of a user

Parameters:

  • user_id

    User Id

  • properties

    Properties to be updated

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:



501
502
503
504
# File 'lib/artikcloud/api/users_api.rb', line 501

def update_user_properties(user_id, properties, opts = {})
  data, _status_code, _headers = update_user_properties_with_http_info(user_id, properties, opts)
  return data
end

#update_user_properties_with_http_info(user_id, properties, opts = {}) ⇒ Array<(PropertiesEnvelope, Fixnum, Hash)>

Update User Application Properties Updates application properties of a user

Parameters:

  • user_id

    User Id

  • properties

    Properties to be updated

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :aid (String)

    Application ID

Returns:

  • (Array<(PropertiesEnvelope, Fixnum, Hash)>)

    PropertiesEnvelope data, response status code and response headers



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
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/artikcloud/api/users_api.rb', line 513

def update_user_properties_with_http_info(user_id, properties, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.update_user_properties ..."
  end
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user_properties" if user_id.nil?
  # verify the required parameter 'properties' is set
  fail ArgumentError, "Missing the required parameter 'properties' when calling UsersApi.update_user_properties" if properties.nil?
  # resource path
  local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'aid'] = opts[:'aid'] if !opts[:'aid'].nil?

  # 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(properties)
  auth_names = ['artikcloud_oauth']
  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 => 'PropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end