Class: SubskribeDevClient::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/subskribe_dev/api/users_api.rb,
lib/subskribe_dev2/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.



19
20
21
# File 'lib/subskribe_dev/api/users_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/subskribe_dev/api/users_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#accept_terms_for_current_user(opts = {}) ⇒ nil

Accept terms and conditions Before a user gains access to the application, they must accept Subskribe’s terms and conditions. This operation requires user bound access tokens.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


26
27
28
29
# File 'lib/subskribe_dev/api/users_api.rb', line 26

def accept_terms_for_current_user(opts = {})
  accept_terms_for_current_user_with_http_info(opts)
  nil
end

#accept_terms_for_current_user_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Accept terms and conditions Before a user gains access to the application, they must accept Subskribe&#39;s terms and conditions. This operation requires user bound access tokens.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



35
36
37
38
39
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
# File 'lib/subskribe_dev/api/users_api.rb', line 35

def accept_terms_for_current_user_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.accept_terms_for_current_user ...'
  end
  # resource path
  local_var_path = '/users/terms-and-conditions'

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

#add_user(opts = {}) ⇒ String

Add a new user Add a new user to the system. Users in the system must have unique emails. If successful, the path to the new user object is returned and a welcome email containing a temporary password will be sent to the email associated with the user. The login credentials expires in 24 hours. If the user does not login to the system within that time, a new invitation is required.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


72
73
74
75
# File 'lib/subskribe_dev/api/users_api.rb', line 72

def add_user(opts = {})
  data, _status_code, _headers = add_user_with_http_info(opts)
  data
end

#add_user_group(opts = {}) ⇒ UserGroupJson

Add user group Create a new user group based on the parameters in the input

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



122
123
124
125
# File 'lib/subskribe_dev/api/users_api.rb', line 122

def add_user_group(opts = {})
  data, _status_code, _headers = add_user_group_with_http_info(opts)
  data
end

#add_user_group_with_http_info(opts = {}) ⇒ Array<(UserGroupJson, Fixnum, Hash)>

Add user group Create a new user group based on the parameters in the input

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    UserGroupJson data, response status code and response headers



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/subskribe_dev/api/users_api.rb', line 132

def add_user_group_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.add_user_group ...'
  end
  # resource path
  local_var_path = '/userGroups'

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

#add_user_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Add a new user Add a new user to the system. Users in the system must have unique emails. If successful, the path to the new user object is returned and a welcome email containing a temporary password will be sent to the email associated with the user. The login credentials expires in 24 hours. If the user does not login to the system within that time, a new invitation is required.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String data, response status code and response headers



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/subskribe_dev/api/users_api.rb', line 82

def add_user_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.add_user ...'
  end
  # resource path
  local_var_path = '/users'

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

#delete_user_group(user_group_id, opts = {}) ⇒ UserGroupJson

Delete user group Delete the user group by Id

Parameters:

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

    the optional parameters

Returns:



170
171
172
173
# File 'lib/subskribe_dev/api/users_api.rb', line 170

def delete_user_group(user_group_id, opts = {})
  data, _status_code, _headers = delete_user_group_with_http_info(user_group_id, opts)
  data
end

#delete_user_group_with_http_info(user_group_id, opts = {}) ⇒ Array<(UserGroupJson, Fixnum, Hash)>

Delete user group Delete the user group by Id

Parameters:

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

    the optional parameters

Returns:

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

    UserGroupJson data, response status code and response headers



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
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/subskribe_dev/api/users_api.rb', line 180

def delete_user_group_with_http_info(user_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.delete_user_group ...'
  end
  # verify the required parameter 'user_group_id' is set
  if @api_client.config.client_side_validation && user_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_group_id' when calling UsersApi.delete_user_group"
  end
  # resource path
  local_var_path = '/userGroups/{userGroupId}'.sub('{' + 'userGroupId' + '}', user_group_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'])

  # form parameters
  form_params = {}

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

#disable_user(id, opts = {}) ⇒ UserJson

Disable user Disables a user by Id. If successful, returns the user just disabled

Parameters:

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

    the optional parameters

Returns:



222
223
224
225
# File 'lib/subskribe_dev/api/users_api.rb', line 222

def disable_user(id, opts = {})
  data, _status_code, _headers = disable_user_with_http_info(id, opts)
  data
end

#disable_user_with_http_info(id, opts = {}) ⇒ Array<(UserJson, Fixnum, Hash)>

Disable user Disables a user by Id. If successful, returns the user just disabled

Parameters:

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

    the optional parameters

Returns:

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

    UserJson data, response status code and response headers



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
266
267
268
# File 'lib/subskribe_dev/api/users_api.rb', line 232

def disable_user_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.disable_user ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.disable_user"
  end
  # resource path
  local_var_path = '/users/disable/{id}'.sub('{' + 'id' + '}', 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'])

  # form parameters
  form_params = {}

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

#enable_user(id, opts = {}) ⇒ UserJson

Enable user Enables a user by Id. If successful, returns the user just enabled

Parameters:

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

    the optional parameters

Returns:



274
275
276
277
# File 'lib/subskribe_dev/api/users_api.rb', line 274

def enable_user(id, opts = {})
  data, _status_code, _headers = enable_user_with_http_info(id, opts)
  data
end

#enable_user_with_http_info(id, opts = {}) ⇒ Array<(UserJson, Fixnum, Hash)>

Enable user Enables a user by Id. If successful, returns the user just enabled

Parameters:

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

    the optional parameters

Returns:

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

    UserJson data, response status code and response headers



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

def enable_user_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.enable_user ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.enable_user"
  end
  # resource path
  local_var_path = '/users/enable/{id}'.sub('{' + 'id' + '}', 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'])

  # form parameters
  form_params = {}

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

#get_user(id, opts = {}) ⇒ UserJson

Get user by Id Returns a specific user by Id

Parameters:

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

    the optional parameters

Returns:



326
327
328
329
# File 'lib/subskribe_dev/api/users_api.rb', line 326

def get_user(id, opts = {})
  data, _status_code, _headers = get_user_with_http_info(id, opts)
  data
end

#get_user_group(user_group_id, opts = {}) ⇒ UserGroupJson

Get user group Retrieve a user group by Id

Parameters:

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

    the optional parameters

Returns:



378
379
380
381
# File 'lib/subskribe_dev/api/users_api.rb', line 378

def get_user_group(user_group_id, opts = {})
  data, _status_code, _headers = get_user_group_with_http_info(user_group_id, opts)
  data
end

#get_user_group_with_http_info(user_group_id, opts = {}) ⇒ Array<(UserGroupJson, Fixnum, Hash)>

Get user group Retrieve a user group by Id

Parameters:

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

    the optional parameters

Returns:

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

    UserGroupJson data, response status code and response headers



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

def get_user_group_with_http_info(user_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.get_user_group ...'
  end
  # verify the required parameter 'user_group_id' is set
  if @api_client.config.client_side_validation && user_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_group_id' when calling UsersApi.get_user_group"
  end
  # resource path
  local_var_path = '/userGroups/{userGroupId}'.sub('{' + 'userGroupId' + '}', user_group_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'])

  # form parameters
  form_params = {}

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

#get_user_groups(opts = {}) ⇒ Array<UserGroupJson>

Get user groups Get all available user groups

Parameters:

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

    the optional parameters

Returns:



429
430
431
432
# File 'lib/subskribe_dev/api/users_api.rb', line 429

def get_user_groups(opts = {})
  data, _status_code, _headers = get_user_groups_with_http_info(opts)
  data
end

#get_user_groups_with_http_info(opts = {}) ⇒ Array<(Array<UserGroupJson>, Fixnum, Hash)>

Get user groups Get all available user groups

Parameters:

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

    the optional parameters

Returns:

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

    Array<UserGroupJson> data, response status code and response headers



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
466
467
468
469
470
# File 'lib/subskribe_dev/api/users_api.rb', line 438

def get_user_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.get_user_groups ...'
  end
  # resource path
  local_var_path = '/userGroups'

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

#get_user_with_http_info(id, opts = {}) ⇒ Array<(UserJson, Fixnum, Hash)>

Get user by Id Returns a specific user by Id

Parameters:

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

    the optional parameters

Returns:

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

    UserJson data, response status code and response headers



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
365
366
367
368
369
370
371
372
# File 'lib/subskribe_dev/api/users_api.rb', line 336

def get_user_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.get_user ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user"
  end
  # resource path
  local_var_path = '/users/{id}'.sub('{' + 'id' + '}', 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'])

  # form parameters
  form_params = {}

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

#get_users(opts = {}) ⇒ UserPaginationResponseJson

Get users list Returns a paginated list of users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)
  • :limit (Integer)

Returns:



477
478
479
480
# File 'lib/subskribe_dev/api/users_api.rb', line 477

def get_users(opts = {})
  data, _status_code, _headers = get_users_with_http_info(opts)
  data
end

#get_users_with_http_info(opts = {}) ⇒ Array<(UserPaginationResponseJson, Fixnum, Hash)>

Get users list Returns a paginated list of users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)
  • :limit (Integer)

Returns:

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

    UserPaginationResponseJson data, response status code and response headers



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

def get_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.get_users ...'
  end
  # resource path
  local_var_path = '/users'

  # query parameters
  query_params = {}
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['ApiKeyAuth']
  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 => 'UserPaginationResponseJson')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#resend_email_for_existing_user(email, opts = {}) ⇒ String

Resend welcome email Resend welcome email conditioning temporary credentials. This is required if the user does not register within 24 hours of user activation

Parameters:

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

    the optional parameters

Returns:

  • (String)


528
529
530
531
# File 'lib/subskribe_dev/api/users_api.rb', line 528

def resend_email_for_existing_user(email, opts = {})
  data, _status_code, _headers = resend_email_for_existing_user_with_http_info(email, opts)
  data
end

#resend_email_for_existing_user_with_http_info(email, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Resend welcome email Resend welcome email conditioning temporary credentials. This is required if the user does not register within 24 hours of user activation

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
# File 'lib/subskribe_dev/api/users_api.rb', line 538

def resend_email_for_existing_user_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.resend_email_for_existing_user ...'
  end
  # verify the required parameter 'email' is set
  if @api_client.config.client_side_validation && email.nil?
    fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.resend_email_for_existing_user"
  end
  # resource path
  local_var_path = '/users/resend-email/{email}'.sub('{' + 'email' + '}', email.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'])

  # form parameters
  form_params = {}

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

#update_user(id, opts = {}) ⇒ nil

Update user Updates the user information. Email cannot be updated.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


581
582
583
584
# File 'lib/subskribe_dev/api/users_api.rb', line 581

def update_user(id, opts = {})
  update_user_with_http_info(id, opts)
  nil
end

#update_user_group(opts = {}) ⇒ UserGroupJson

Update user group Updates the specified user group according to the input

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



635
636
637
638
# File 'lib/subskribe_dev/api/users_api.rb', line 635

def update_user_group(opts = {})
  data, _status_code, _headers = update_user_group_with_http_info(opts)
  data
end

#update_user_group_with_http_info(opts = {}) ⇒ Array<(UserGroupJson, Fixnum, Hash)>

Update user group Updates the specified user group according to the input

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    UserGroupJson data, response status code and response headers



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/subskribe_dev/api/users_api.rb', line 645

def update_user_group_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.update_user_group ...'
  end
  # resource path
  local_var_path = '/userGroups'

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

#update_user_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update user Updates the user information. Email cannot be updated.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/subskribe_dev/api/users_api.rb', line 592

def update_user_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.update_user ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.update_user"
  end
  # resource path
  local_var_path = '/users/{id}'.sub('{' + 'id' + '}', 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(opts[:'body'])
  auth_names = ['ApiKeyAuth']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_csv(opts = {}) ⇒ nil

Bulk user upload Loads a list of users to be added to in CSV format.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


683
684
685
686
# File 'lib/subskribe_dev/api/users_api.rb', line 683

def upload_csv(opts = {})
  upload_csv_with_http_info(opts)
  nil
end

#upload_csv_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Bulk user upload Loads a list of users to be added to in CSV format.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



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

def upload_csv_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.upload_csv ...'
  end
  # resource path
  local_var_path = '/users/upload'

  # 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(['text/csv'])

  # form parameters
  form_params = {}

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