Class: ClerkHttpClient::SAMLConnectionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/clerk-http-client/api/saml_connections_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SAMLConnectionsApi

Returns a new instance of SAMLConnectionsApi.



19
20
21
# File 'lib/clerk-http-client/api/saml_connections_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/clerk-http-client/api/saml_connections_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_saml_connection(opts = {}) ⇒ SchemasSAMLConnection

Create a SAML Connection Create a new SAML Connection.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



28
29
30
31
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 28

def create_saml_connection(opts = {})
  data, _status_code, _headers = create_saml_connection_with_http_info(opts)
  data
end

#create_saml_connection_with_http_info(opts = {}) ⇒ Array<(SchemasSAMLConnection, Integer, Hash)>

Create a SAML Connection Create a new SAML Connection. POST

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(SchemasSAMLConnection, Integer, Hash)>)

    SchemasSAMLConnection data, response status code and response headers



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
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 39

def create_saml_connection_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SAMLConnectionsApi.create_saml_connection ...'
  end
  # resource path
  local_var_path = '/saml_connections'

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_saml_connection_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'SchemasSAMLConnection'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SAMLConnectionsApi.create_saml_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SAMLConnectionsApi#create_saml_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_saml_connection(saml_connection_id, opts = {}) ⇒ DeletedObject

Delete a SAML Connection Deletes the SAML Connection whose ID matches the provided ‘id` in the path.

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection to delete

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

    the optional parameters

Returns:



94
95
96
97
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 94

def delete_saml_connection(saml_connection_id, opts = {})
  data, _status_code, _headers = delete_saml_connection_with_http_info(saml_connection_id, opts)
  data
end

#delete_saml_connection_with_http_info(saml_connection_id, opts = {}) ⇒ Array<(DeletedObject, Integer, Hash)>

Delete a SAML Connection Deletes the SAML Connection whose ID matches the provided &#x60;id&#x60; in the path. DELETE

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection to delete

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

    the optional parameters

Returns:

  • (Array<(DeletedObject, Integer, Hash)>)

    DeletedObject data, response status code and response headers



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
144
145
146
147
148
149
150
151
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 105

def delete_saml_connection_with_http_info(saml_connection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SAMLConnectionsApi.delete_saml_connection ...'
  end
  # verify the required parameter 'saml_connection_id' is set
  if @api_client.config.client_side_validation && saml_connection_id.nil?
    fail ArgumentError, "Missing the required parameter 'saml_connection_id' when calling SAMLConnectionsApi.delete_saml_connection"
  end
  # resource path
  local_var_path = '/saml_connections/{saml_connection_id}'.sub('{' + 'saml_connection_id' + '}', CGI.escape(saml_connection_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeletedObject'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SAMLConnectionsApi.delete_saml_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SAMLConnectionsApi#delete_saml_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_saml_connection(saml_connection_id, opts = {}) ⇒ SchemasSAMLConnection

Retrieve a SAML Connection by ID Fetches the SAML Connection whose ID matches the provided ‘saml_connection_id` in the path.

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection

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

    the optional parameters

Returns:



159
160
161
162
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 159

def get_saml_connection(saml_connection_id, opts = {})
  data, _status_code, _headers = get_saml_connection_with_http_info(saml_connection_id, opts)
  data
end

#get_saml_connection_with_http_info(saml_connection_id, opts = {}) ⇒ Array<(SchemasSAMLConnection, Integer, Hash)>

Retrieve a SAML Connection by ID Fetches the SAML Connection whose ID matches the provided &#x60;saml_connection_id&#x60; in the path. GET

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection

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

    the optional parameters

Returns:

  • (Array<(SchemasSAMLConnection, Integer, Hash)>)

    SchemasSAMLConnection data, response status code and response headers



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
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 170

def get_saml_connection_with_http_info(saml_connection_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SAMLConnectionsApi.get_saml_connection ...'
  end
  # verify the required parameter 'saml_connection_id' is set
  if @api_client.config.client_side_validation && saml_connection_id.nil?
    fail ArgumentError, "Missing the required parameter 'saml_connection_id' when calling SAMLConnectionsApi.get_saml_connection"
  end
  # resource path
  local_var_path = '/saml_connections/{saml_connection_id}'.sub('{' + 'saml_connection_id' + '}', CGI.escape(saml_connection_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SchemasSAMLConnection'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SAMLConnectionsApi.get_saml_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SAMLConnectionsApi#get_saml_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_saml_connections(opts = {}) ⇒ SAMLConnections

Get a list of SAML Connections for an instance Returns the list of SAML Connections for an instance. Results can be paginated using the optional ‘limit` and `offset` query parameters. The SAML Connections are ordered by descending creation date and the most recent will be returned first.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Applies a limit to the number of results returned. Can be used for paginating the results together with &#x60;offset&#x60;. (default to 10)

  • :offset (Float)

    Skip the first &#x60;offset&#x60; results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with &#x60;limit&#x60;. (default to 0)

  • :organization_id (Array<String>)

    Returns SAML connections that have an associated organization ID to the given organizations. For each organization id, the &#x60;+&#x60; and &#x60;-&#x60; can be prepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids.

Returns:



226
227
228
229
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 226

def list_saml_connections(opts = {})
  data, _status_code, _headers = list_saml_connections_with_http_info(opts)
  data
end

#list_saml_connections_with_http_info(opts = {}) ⇒ Array<(SAMLConnections, Integer, Hash)>

Get a list of SAML Connections for an instance Returns the list of SAML Connections for an instance. Results can be paginated using the optional &#x60;limit&#x60; and &#x60;offset&#x60; query parameters. The SAML Connections are ordered by descending creation date and the most recent will be returned first. GET

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Float)

    Applies a limit to the number of results returned. Can be used for paginating the results together with &#x60;offset&#x60;. (default to 10)

  • :offset (Float)

    Skip the first &#x60;offset&#x60; results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with &#x60;limit&#x60;. (default to 0)

  • :organization_id (Array<String>)

    Returns SAML connections that have an associated organization ID to the given organizations. For each organization id, the &#x60;+&#x60; and &#x60;-&#x60; can be prepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids.

Returns:

  • (Array<(SAMLConnections, Integer, Hash)>)

    SAMLConnections data, response status code and response headers



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
269
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
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 239

def list_saml_connections_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SAMLConnectionsApi.list_saml_connections ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SAMLConnectionsApi.list_saml_connections, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SAMLConnectionsApi.list_saml_connections, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling SAMLConnectionsApi.list_saml_connections, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/saml_connections'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'organization_id'] = @api_client.build_collection_param(opts[:'organization_id'], :multi) if !opts[:'organization_id'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'SAMLConnections'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SAMLConnectionsApi.list_saml_connections",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SAMLConnectionsApi#list_saml_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_saml_connection(saml_connection_id, update_saml_connection_request, opts = {}) ⇒ SchemasSAMLConnection

Update a SAML Connection Updates the SAML Connection whose ID matches the provided ‘id` in the path.

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection to update

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

    the optional parameters

Returns:



305
306
307
308
# File 'lib/clerk-http-client/api/saml_connections_api.rb', line 305

def update_saml_connection(saml_connection_id, update_saml_connection_request, opts = {})
  data, _status_code, _headers = update_saml_connection_with_http_info(saml_connection_id, update_saml_connection_request, opts)
  data
end

#update_saml_connection_with_http_info(saml_connection_id, update_saml_connection_request, opts = {}) ⇒ Array<(SchemasSAMLConnection, Integer, Hash)>

Update a SAML Connection Updates the SAML Connection whose ID matches the provided &#x60;id&#x60; in the path. PATCH

Parameters:

  • saml_connection_id (String)

    The ID of the SAML Connection to update

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

    the optional parameters

Returns:

  • (Array<(SchemasSAMLConnection, Integer, Hash)>)

    SchemasSAMLConnection data, response status code and response headers



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
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/clerk-http-client/api/saml_connections_api.rb', line 317

def update_saml_connection_with_http_info(saml_connection_id, update_saml_connection_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SAMLConnectionsApi.update_saml_connection ...'
  end
  # verify the required parameter 'saml_connection_id' is set
  if @api_client.config.client_side_validation && saml_connection_id.nil?
    fail ArgumentError, "Missing the required parameter 'saml_connection_id' when calling SAMLConnectionsApi.update_saml_connection"
  end
  # verify the required parameter 'update_saml_connection_request' is set
  if @api_client.config.client_side_validation && update_saml_connection_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_saml_connection_request' when calling SAMLConnectionsApi.update_saml_connection"
  end
  # resource path
  local_var_path = '/saml_connections/{saml_connection_id}'.sub('{' + 'saml_connection_id' + '}', CGI.escape(saml_connection_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_saml_connection_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SchemasSAMLConnection'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SAMLConnectionsApi.update_saml_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SAMLConnectionsApi#update_saml_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end