Class: NucleusApi::AdminClientApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nucleus_api/api/admin_client_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AdminClientApi

Returns a new instance of AdminClientApi.



19
20
21
# File 'lib/nucleus_api/api/admin_client_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/nucleus_api/api/admin_client_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_admin_client_using_post(client, opts = {}) ⇒ AdminClient

create

Parameters:

  • client

    client

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

    the optional parameters

Returns:



26
27
28
29
# File 'lib/nucleus_api/api/admin_client_api.rb', line 26

def create_admin_client_using_post(client, opts = {})
  data, _status_code, _headers = create_admin_client_using_post_with_http_info(client, opts)
  data
end

#create_admin_client_using_post_with_http_info(client, opts = {}) ⇒ Array<(AdminClient, Fixnum, Hash)>

create

Parameters:

  • client

    client

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

    the optional parameters

Returns:

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

    AdminClient data, 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
67
68
69
70
71
72
73
# File 'lib/nucleus_api/api/admin_client_api.rb', line 35

def create_admin_client_using_post_with_http_info(client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.create_admin_client_using_post ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling AdminClientApi.create_admin_client_using_post"
  end
  # resource path
  local_var_path = '/admin/v1/client'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # 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(client)
  auth_names = ['oauth2']
  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 => 'AdminClient')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminClientApi#create_admin_client_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_admin_client_using_delete(client_id, opts = {}) ⇒ nil

delete

Parameters:

  • client_id

    client_id

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

    the optional parameters

Returns:

  • (nil)


78
79
80
81
# File 'lib/nucleus_api/api/admin_client_api.rb', line 78

def delete_admin_client_using_delete(client_id, opts = {})
  delete_admin_client_using_delete_with_http_info(client_id, opts)
  nil
end

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

delete

Parameters:

  • client_id

    client_id

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
117
118
119
120
121
122
# File 'lib/nucleus_api/api/admin_client_api.rb', line 87

def delete_admin_client_using_delete_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.delete_admin_client_using_delete ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminClientApi.delete_admin_client_using_delete"
  end
  # resource path
  local_var_path = '/admin/v1/client/{client_id}'.sub('{' + 'client_id' + '}', client_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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: AdminClientApi#delete_admin_client_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_admin_client_using_get(client_id, opts = {}) ⇒ AdminClient

get

Parameters:

  • client_id

    client_id

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

    the optional parameters

Returns:



127
128
129
130
# File 'lib/nucleus_api/api/admin_client_api.rb', line 127

def get_admin_client_using_get(client_id, opts = {})
  data, _status_code, _headers = get_admin_client_using_get_with_http_info(client_id, opts)
  data
end

#get_admin_client_using_get_with_http_info(client_id, opts = {}) ⇒ Array<(AdminClient, Fixnum, Hash)>

get

Parameters:

  • client_id

    client_id

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

    the optional parameters

Returns:

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

    AdminClient data, response status code and response headers



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
165
166
167
168
169
170
171
172
# File 'lib/nucleus_api/api/admin_client_api.rb', line 136

def get_admin_client_using_get_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.get_admin_client_using_get ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminClientApi.get_admin_client_using_get"
  end
  # resource path
  local_var_path = '/admin/v1/client/{client_id}'.sub('{' + 'client_id' + '}', client_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

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

#get_all_admin_client_using_get(opts = {}) ⇒ PageAdminClient

getAllAdminClient

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ascending (BOOLEAN)

    ascending (default to false)

  • :filter (String)

    filter

  • :order_by (String)

    order_by (default to username)

  • :page (Integer)

    page (default to 0)

  • :size (Integer)

    size (default to 25)

Returns:



181
182
183
184
# File 'lib/nucleus_api/api/admin_client_api.rb', line 181

def get_all_admin_client_using_get(opts = {})
  data, _status_code, _headers = get_all_admin_client_using_get_with_http_info(opts)
  data
end

#get_all_admin_client_using_get_with_http_info(opts = {}) ⇒ Array<(PageAdminClient, Fixnum, Hash)>

getAllAdminClient

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ascending (BOOLEAN)

    ascending

  • :filter (String)

    filter

  • :order_by (String)

    order_by

  • :page (Integer)

    page

  • :size (Integer)

    size

Returns:

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

    PageAdminClient data, response status code and response headers



194
195
196
197
198
199
200
201
202
203
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
# File 'lib/nucleus_api/api/admin_client_api.rb', line 194

def get_all_admin_client_using_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.get_all_admin_client_using_get ...'
  end
  # resource path
  local_var_path = '/admin/v1/client'

  # query parameters
  query_params = {}
  query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?

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

  # form parameters
  form_params = {}

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

#update_admin_client_using_put(client, client_id, opts = {}) ⇒ AdminClient

update

Parameters:

  • client

    client

  • client_id

    client_id

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

    the optional parameters

Returns:



237
238
239
240
# File 'lib/nucleus_api/api/admin_client_api.rb', line 237

def update_admin_client_using_put(client, client_id, opts = {})
  data, _status_code, _headers = update_admin_client_using_put_with_http_info(client, client_id, opts)
  data
end

#update_admin_client_using_put_with_http_info(client, client_id, opts = {}) ⇒ Array<(AdminClient, Fixnum, Hash)>

update

Parameters:

  • client

    client

  • client_id

    client_id

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

    the optional parameters

Returns:

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

    AdminClient data, response status code and response headers



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/nucleus_api/api/admin_client_api.rb', line 247

def update_admin_client_using_put_with_http_info(client, client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.update_admin_client_using_put ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling AdminClientApi.update_admin_client_using_put"
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminClientApi.update_admin_client_using_put"
  end
  # resource path
  local_var_path = '/admin/v1/client/{client_id}'.sub('{' + 'client_id' + '}', client_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # 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(client)
  auth_names = ['oauth2']
  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 => 'AdminClient')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdminClientApi#update_admin_client_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_client_credentials_using_post(client_credentials, opts = {}) ⇒ AdminClient

updateClientCredentials

Parameters:

  • client_credentials

    clientCredentials

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

    the optional parameters

Options Hash (opts):

  • :tenant_name (String)

    tenant-name

Returns:



295
296
297
298
# File 'lib/nucleus_api/api/admin_client_api.rb', line 295

def update_client_credentials_using_post(client_credentials, opts = {})
  data, _status_code, _headers = update_client_credentials_using_post_with_http_info(client_credentials, opts)
  data
end

#update_client_credentials_using_post_with_http_info(client_credentials, opts = {}) ⇒ Array<(AdminClient, Fixnum, Hash)>

updateClientCredentials

Parameters:

  • client_credentials

    clientCredentials

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

    the optional parameters

Options Hash (opts):

  • :tenant_name (String)

    tenant-name

Returns:

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

    AdminClient data, response status code and response headers



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/nucleus_api/api/admin_client_api.rb', line 305

def update_client_credentials_using_post_with_http_info(client_credentials, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminClientApi.update_client_credentials_using_post ...'
  end
  # verify the required parameter 'client_credentials' is set
  if @api_client.config.client_side_validation && client_credentials.nil?
    fail ArgumentError, "Missing the required parameter 'client_credentials' when calling AdminClientApi.update_client_credentials_using_post"
  end
  # resource path
  local_var_path = '/admin/v1/client_credentials'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'tenant-name'] = opts[:'tenant_name'] if !opts[:'tenant_name'].nil?

  # form parameters
  form_params = {}

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