Class: OryClient::ProjectApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-client/api/project_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectApi

Returns a new instance of ProjectApi.



19
20
21
# File 'lib/ory-client/api/project_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/ory-client/api/project_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_organization(project_id, opts = {}) ⇒ Organization

Create a B2B SSO Organization

Parameters:

  • project_id (String)

    Project ID The project's ID.

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

    the optional parameters

Options Hash (opts):

Returns:



27
28
29
30
# File 'lib/ory-client/api/project_api.rb', line 27

def create_organization(project_id, opts = {})
  data, _status_code, _headers = create_organization_with_http_info(project_id, opts)
  data
end

#create_organization_with_http_info(project_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>

Create a B2B SSO Organization

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Organization data, response status code and response headers



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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/ory-client/api/project_api.rb', line 37

def create_organization_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])
  # 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[:'organization_body'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.create_organization",
    :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: ProjectApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project(opts = {}) ⇒ Project

Create a Project Creates a new project.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



95
96
97
98
# File 'lib/ory-client/api/project_api.rb', line 95

def create_project(opts = {})
  data, _status_code, _headers = create_project_with_http_info(opts)
  data
end

#create_project_api_key(project, opts = {}) ⇒ ProjectApiKey

Create project API token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Options Hash (opts):

Returns:



160
161
162
163
# File 'lib/ory-client/api/project_api.rb', line 160

def create_project_api_key(project, opts = {})
  data, _status_code, _headers = create_project_api_key_with_http_info(project, opts)
  data
end

#create_project_api_key_with_http_info(project, opts = {}) ⇒ Array<(ProjectApiKey, Integer, Hash)>

Create project API token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ProjectApiKey data, response status code and response headers



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
217
218
219
220
221
222
# File 'lib/ory-client/api/project_api.rb', line 171

def create_project_api_key_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_project_api_key ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.create_project_api_key"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens'.sub('{' + 'project' + '}', CGI.escape(project.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'])
  # 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_project_api_key_request'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.create_project_api_key",
    :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: ProjectApi#create_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>

Create a Project Creates a new project.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Project 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
152
# File 'lib/ory-client/api/project_api.rb', line 105

def create_project_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...'
  end
  # resource path
  local_var_path = '/projects'

  # 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'])
  # 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_project_body'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.create_project",
    :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: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_organization(project_id, organization_id, opts = {}) ⇒ nil

Delete a B2B SSO Organization for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


229
230
231
232
# File 'lib/ory-client/api/project_api.rb', line 229

def delete_organization(project_id, organization_id, opts = {})
  delete_organization_with_http_info(project_id, organization_id, opts)
  nil
end

#delete_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a B2B SSO Organization for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, 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
# File 'lib/ory-client/api/project_api.rb', line 239

def delete_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.delete_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.delete_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ProjectApi.delete_organization",
    :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: ProjectApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_project_api_key(project, token_id, opts = {}) ⇒ nil

Delete project API token Deletes an API token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

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

    the optional parameters

Returns:

  • (nil)


297
298
299
300
# File 'lib/ory-client/api/project_api.rb', line 297

def delete_project_api_key(project, token_id, opts = {})
  delete_project_api_key_with_http_info(project, token_id, opts)
  nil
end

#delete_project_api_key_with_http_info(project, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete project API token Deletes an API token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/ory-client/api/project_api.rb', line 308

def delete_project_api_key_with_http_info(project, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.delete_project_api_key ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.delete_project_api_key"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling ProjectApi.delete_project_api_key"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens/{token_id}'.sub('{' + 'project' + '}', CGI.escape(project.to_s)).sub('{' + 'token_id' + '}', CGI.escape(token_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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ProjectApi.delete_project_api_key",
    :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: ProjectApi#delete_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_organization(project_id, organization_id, opts = {}) ⇒ GetOrganizationResponse

Returns a B2B SSO Organization for a project by its ID

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Returns:



365
366
367
368
# File 'lib/ory-client/api/project_api.rb', line 365

def get_organization(project_id, organization_id, opts = {})
  data, _status_code, _headers = get_organization_with_http_info(project_id, organization_id, opts)
  data
end

#get_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(GetOrganizationResponse, Integer, Hash)>

Returns a B2B SSO Organization for a project by its ID

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Returns:

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

    GetOrganizationResponse data, response status code and response headers



375
376
377
378
379
380
381
382
383
384
385
386
387
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
425
# File 'lib/ory-client/api/project_api.rb', line 375

def get_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.get_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.get_organization",
    :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: ProjectApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project(project_id, opts = {}) ⇒ Project

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:



432
433
434
435
# File 'lib/ory-client/api/project_api.rb', line 432

def get_project(project_id, opts = {})
  data, _status_code, _headers = get_project_with_http_info(project_id, opts)
  data
end

#get_project_members(project, opts = {}) ⇒ Array<ProjectMember>

Get all members associated with this project This endpoint requires the user to be a member of the project with the role ‘OWNER` or `DEVELOPER`.

Parameters:

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

    the optional parameters

Returns:



495
496
497
498
# File 'lib/ory-client/api/project_api.rb', line 495

def get_project_members(project, opts = {})
  data, _status_code, _headers = get_project_members_with_http_info(project, opts)
  data
end

#get_project_members_with_http_info(project, opts = {}) ⇒ Array<(Array<ProjectMember>, Integer, Hash)>

Get all members associated with this project This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60; or &#x60;DEVELOPER&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

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



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/ory-client/api/project_api.rb', line 505

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectMember>'

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

  new_options = opts.merge(
    :operation => :"ProjectApi.get_project_members",
    :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: ProjectApi#get_project_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

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

    Project data, response status code and response headers



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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/ory-client/api/project_api.rb', line 442

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.get_project",
    :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: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_organizations(project_id, opts = {}) ⇒ ListOrganizationsResponse

List all B2B SSO Organizations for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination).

  • :domain (String)

    Domain If set, only organizations with that domain will be returned.

Returns:



560
561
562
563
# File 'lib/ory-client/api/project_api.rb', line 560

def list_organizations(project_id, opts = {})
  data, _status_code, _headers = list_organizations_with_http_info(project_id, opts)
  data
end

#list_organizations_with_http_info(project_id, opts = {}) ⇒ Array<(ListOrganizationsResponse, Integer, Hash)>

List all B2B SSO Organizations for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination).

  • :domain (String)

    Domain If set, only organizations with that domain will be returned.

Returns:

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

    ListOrganizationsResponse data, response status code and response headers



572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
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/ory-client/api/project_api.rb', line 572

def list_organizations_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.list_organizations ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.list_organizations"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProjectApi.list_organizations, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/projects/{project_id}/organizations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.list_organizations",
    :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: ProjectApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_project_api_keys(project, opts = {}) ⇒ Array<ProjectApiKey>

List a project’s API Tokens A list of all the project’s API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Returns:



636
637
638
639
# File 'lib/ory-client/api/project_api.rb', line 636

def list_project_api_keys(project, opts = {})
  data, _status_code, _headers = list_project_api_keys_with_http_info(project, opts)
  data
end

#list_project_api_keys_with_http_info(project, opts = {}) ⇒ Array<(Array<ProjectApiKey>, Integer, Hash)>

List a project&#39;s API Tokens A list of all the project&#39;s API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Returns:

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

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



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
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/ory-client/api/project_api.rb', line 646

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectApiKey>'

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

  new_options = opts.merge(
    :operation => :"ProjectApi.list_project_api_keys",
    :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: ProjectApi#list_project_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_projects(opts = {}) ⇒ Array<ProjectMetadata>

List All Projects Lists all projects you have access to.

Parameters:

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

    the optional parameters

Returns:



698
699
700
701
# File 'lib/ory-client/api/project_api.rb', line 698

def list_projects(opts = {})
  data, _status_code, _headers = list_projects_with_http_info(opts)
  data
end

#list_projects_with_http_info(opts = {}) ⇒ Array<(Array<ProjectMetadata>, Integer, Hash)>

List All Projects Lists all projects you have access to.

Parameters:

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

    the optional parameters

Returns:

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

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



707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
# File 'lib/ory-client/api/project_api.rb', line 707

def list_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.list_projects ...'
  end
  # resource path
  local_var_path = '/projects'

  # 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'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectMetadata>'

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

  new_options = opts.merge(
    :operation => :"ProjectApi.list_projects",
    :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: ProjectApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Patch an Ory Network Project Configuration Deprecated: Use the ‘patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Network project configuration keys for Ory’s services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the ‘version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



757
758
759
760
# File 'lib/ory-client/api/project_api.rb', line 757

def patch_project(project_id, opts = {})
  data, _status_code, _headers = patch_project_with_http_info(project_id, opts)
  data
end

#patch_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Patch an Ory Network Project Configuration Deprecated: Use the &#x60;patchProjectWithRevision&#x60; endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Network project configuration keys for Ory&#39;s services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SuccessfulProjectUpdate data, response status code and response headers



768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
# File 'lib/ory-client/api/project_api.rb', line 768

def patch_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.patch_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.patch_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])
  # 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[:'json_patch'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.patch_project",
    :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: ProjectApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#purge_project(project_id, opts = {}) ⇒ nil

Irrecoverably purge a project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


826
827
828
829
# File 'lib/ory-client/api/project_api.rb', line 826

def purge_project(project_id, opts = {})
  purge_project_with_http_info(project_id, opts)
  nil
end

#purge_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Irrecoverably purge a project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/ory-client/api/project_api.rb', line 836

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ProjectApi.purge_project",
    :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: ProjectApi#purge_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_project_member(project, member, opts = {}) ⇒ nil

Remove a member associated with this project This also sets their invite status to ‘REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.

Parameters:

  • project (String)
  • member (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


890
891
892
893
# File 'lib/ory-client/api/project_api.rb', line 890

def remove_project_member(project, member, opts = {})
  remove_project_member_with_http_info(project, member, opts)
  nil
end

#remove_project_member_with_http_info(project, member, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member associated with this project This also sets their invite status to &#x60;REMOVED&#x60;. This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60;.

Parameters:

  • project (String)
  • member (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/ory-client/api/project_api.rb', line 901

def remove_project_member_with_http_info(project, member, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.remove_project_member ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.remove_project_member"
  end
  # verify the required parameter 'member' is set
  if @api_client.config.client_side_validation && member.nil?
    fail ArgumentError, "Missing the required parameter 'member' when calling ProjectApi.remove_project_member"
  end
  # resource path
  local_var_path = '/projects/{project}/members/{member}'.sub('{' + 'project' + '}', CGI.escape(project.to_s)).sub('{' + 'member' + '}', CGI.escape(member.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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"ProjectApi.remove_project_member",
    :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: ProjectApi#remove_project_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Update an Ory Network Project Configuration This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the ‘version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service’s configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



959
960
961
962
# File 'lib/ory-client/api/project_api.rb', line 959

def set_project(project_id, opts = {})
  data, _status_code, _headers = set_project_with_http_info(project_id, opts)
  data
end

#set_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Update an Ory Network Project Configuration This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service&#39;s configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SuccessfulProjectUpdate data, response status code and response headers



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'lib/ory-client/api/project_api.rb', line 970

def set_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.set_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.set_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])
  # 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[:'set_project'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.set_project",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#set_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_organization(project_id, organization_id, opts = {}) ⇒ Organization

Update a B2B SSO Organization for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



1029
1030
1031
1032
# File 'lib/ory-client/api/project_api.rb', line 1029

def update_organization(project_id, organization_id, opts = {})
  data, _status_code, _headers = update_organization_with_http_info(project_id, organization_id, opts)
  data
end

#update_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>

Update a B2B SSO Organization for a project

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Organization data, response status code and response headers



1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
# File 'lib/ory-client/api/project_api.rb', line 1040

def update_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.update_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.update_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_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'])
  # 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[:'organization_body'])

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

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

  new_options = opts.merge(
    :operation => :"ProjectApi.update_organization",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#update_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end