Class: Spatio::WorkspacesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/spatio-sdk/api/workspaces_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WorkspacesApi

Returns a new instance of WorkspacesApi.



19
20
21
# File 'lib/spatio-sdk/api/workspaces_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/spatio-sdk/api/workspaces_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#accept_workspace_invitation(token, opts = {}) ⇒ Hash<String, Object>

Accept a workspace invitation by token. The signed-in user’s email must match the invitation. Organization-token accept lives at ‘POST /v1/organizations/org/accept-invitation`.

Parameters:

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

    the optional parameters

Returns:

  • (Hash<String, Object>)


26
27
28
29
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 26

def accept_workspace_invitation(token, opts = {})
  data, _status_code, _headers = accept_workspace_invitation_with_http_info(token, opts)
  data
end

#accept_workspace_invitation_with_http_info(token, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Accept a workspace invitation by token. The signed-in user&#39;s email must match the invitation. Organization-token accept lives at &#x60;POST /v1/organizations/org/accept-invitation&#x60;.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> 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
74
75
76
77
78
79
80
81
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 35

def accept_workspace_invitation_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.accept_workspace_invitation ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling WorkspacesApi.accept_workspace_invitation"
  end
  # resource path
  local_var_path = '/v1/invitations/{token}/accept'.sub('{token}', CGI.escape(token.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] || 'Hash<String, Object>'

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

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

#add_workspace_member(workspace_id, add_workspace_member_request, opts = {}) ⇒ Hash<String, Object>

Add a member directly (skips invitation flow).

Parameters:

  • workspace_id (String)
  • add_workspace_member_request (AddWorkspaceMemberRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


88
89
90
91
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 88

def add_workspace_member(workspace_id, add_workspace_member_request, opts = {})
  data, _status_code, _headers = add_workspace_member_with_http_info(workspace_id, add_workspace_member_request, opts)
  data
end

#add_workspace_member_with_http_info(workspace_id, add_workspace_member_request, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Add a member directly (skips invitation flow).

Parameters:

  • workspace_id (String)
  • add_workspace_member_request (AddWorkspaceMemberRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



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
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
153
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 98

def add_workspace_member_with_http_info(workspace_id, add_workspace_member_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.add_workspace_member ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.add_workspace_member"
  end
  # verify the required parameter 'add_workspace_member_request' is set
  if @api_client.config.client_side_validation && add_workspace_member_request.nil?
    fail ArgumentError, "Missing the required parameter 'add_workspace_member_request' when calling WorkspacesApi.add_workspace_member"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/members'.sub('{workspaceId}', CGI.escape(workspace_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(add_workspace_member_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

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

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

#create_workspace(create_workspace_request, opts = {}) ⇒ WorkspaceEnvelope

Create a workspace. Requires ‘organizationId` in the body — bare "personal" workspaces aren’t supported on the public API.

Parameters:

Returns:



159
160
161
162
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 159

def create_workspace(create_workspace_request, opts = {})
  data, _status_code, _headers = create_workspace_with_http_info(create_workspace_request, opts)
  data
end

#create_workspace_invitation(workspace_id, create_workspace_invitation_request, opts = {}) ⇒ WorkspaceInvitation

Invite a user to a workspace.

Parameters:

Returns:



226
227
228
229
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 226

def create_workspace_invitation(workspace_id, create_workspace_invitation_request, opts = {})
  data, _status_code, _headers = create_workspace_invitation_with_http_info(workspace_id, create_workspace_invitation_request, opts)
  data
end

#create_workspace_invitation_with_http_info(workspace_id, create_workspace_invitation_request, opts = {}) ⇒ Array<(WorkspaceInvitation, Integer, Hash)>

Invite a user to a workspace.

Parameters:

Returns:

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

    WorkspaceInvitation data, response status code and response headers



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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 236

def create_workspace_invitation_with_http_info(workspace_id, create_workspace_invitation_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.create_workspace_invitation ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.create_workspace_invitation"
  end
  # verify the required parameter 'create_workspace_invitation_request' is set
  if @api_client.config.client_side_validation && create_workspace_invitation_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_workspace_invitation_request' when calling WorkspacesApi.create_workspace_invitation"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/invitations'.sub('{workspaceId}', CGI.escape(workspace_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(create_workspace_invitation_request)

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

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

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

#create_workspace_with_http_info(create_workspace_request, opts = {}) ⇒ Array<(WorkspaceEnvelope, Integer, Hash)>

Create a workspace. Requires &#x60;organizationId&#x60; in the body — bare &quot;personal&quot; workspaces aren&#39;t supported on the public API.

Parameters:

Returns:

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

    WorkspaceEnvelope data, response status code and response headers



168
169
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
217
218
219
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 168

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

  # 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(create_workspace_request)

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

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

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

#get_public_invitation(token, opts = {}) ⇒ PublicInvitationPayload

Fetch invitation details by token (unauthenticated). Used by the renderer to show invitation context before the user signs in.

Parameters:

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

    the optional parameters

Returns:



297
298
299
300
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 297

def get_public_invitation(token, opts = {})
  data, _status_code, _headers = get_public_invitation_with_http_info(token, opts)
  data
end

#get_public_invitation_with_http_info(token, opts = {}) ⇒ Array<(PublicInvitationPayload, Integer, Hash)>

Fetch invitation details by token (unauthenticated). Used by the renderer to show invitation context before the user signs in.

Parameters:

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

    the optional parameters

Returns:

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

    PublicInvitationPayload data, response status code and response headers



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
345
346
347
348
349
350
351
352
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 306

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

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

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

#get_workspace(workspace_id, opts = {}) ⇒ WorkspaceEnvelope

Fetch a single workspace by id.

Parameters:

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

    the optional parameters

Returns:



358
359
360
361
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 358

def get_workspace(workspace_id, opts = {})
  data, _status_code, _headers = get_workspace_with_http_info(workspace_id, opts)
  data
end

#get_workspace_with_http_info(workspace_id, opts = {}) ⇒ Array<(WorkspaceEnvelope, Integer, Hash)>

Fetch a single workspace by id.

Parameters:

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

    the optional parameters

Returns:

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

    WorkspaceEnvelope data, response status code and response headers



367
368
369
370
371
372
373
374
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
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 367

def get_workspace_with_http_info(workspace_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.get_workspace ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.get_workspace"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}'.sub('{workspaceId}', CGI.escape(workspace_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] || 'WorkspaceEnvelope'

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

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

#list_my_workspaces(opts = {}) ⇒ WorkspaceListResponse

List the caller’s workspaces (across organizations).

Parameters:

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

    the optional parameters

Returns:



418
419
420
421
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 418

def list_my_workspaces(opts = {})
  data, _status_code, _headers = list_my_workspaces_with_http_info(opts)
  data
end

#list_my_workspaces_with_http_info(opts = {}) ⇒ Array<(WorkspaceListResponse, Integer, Hash)>

List the caller&#39;s workspaces (across organizations).

Parameters:

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

    the optional parameters

Returns:

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

    WorkspaceListResponse data, response status code and response headers



426
427
428
429
430
431
432
433
434
435
436
437
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
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 426

def list_my_workspaces_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.list_my_workspaces ...'
  end
  # resource path
  local_var_path = '/v1/workspaces'

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

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

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

#list_workspace_invitations(workspace_id, opts = {}) ⇒ WorkspaceInvitationListResponse

List pending workspace invitations.

Parameters:

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

    the optional parameters

Returns:



474
475
476
477
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 474

def list_workspace_invitations(workspace_id, opts = {})
  data, _status_code, _headers = list_workspace_invitations_with_http_info(workspace_id, opts)
  data
end

#list_workspace_invitations_with_http_info(workspace_id, opts = {}) ⇒ Array<(WorkspaceInvitationListResponse, Integer, Hash)>

List pending workspace invitations.

Parameters:

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

    the optional parameters

Returns:



483
484
485
486
487
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
523
524
525
526
527
528
529
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 483

def list_workspace_invitations_with_http_info(workspace_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_invitations ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_invitations"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/invitations'.sub('{workspaceId}', CGI.escape(workspace_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] || 'WorkspaceInvitationListResponse'

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

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

#list_workspace_members(workspace_id, opts = {}) ⇒ WorkspaceMemberListResponse

List members of a workspace.

Parameters:

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

    the optional parameters

Returns:



535
536
537
538
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 535

def list_workspace_members(workspace_id, opts = {})
  data, _status_code, _headers = list_workspace_members_with_http_info(workspace_id, opts)
  data
end

#list_workspace_members_with_http_info(workspace_id, opts = {}) ⇒ Array<(WorkspaceMemberListResponse, Integer, Hash)>

List members of a workspace.

Parameters:

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

    the optional parameters

Returns:

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

    WorkspaceMemberListResponse data, response status code and response headers



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
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 544

def list_workspace_members_with_http_info(workspace_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.list_workspace_members ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.list_workspace_members"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/members'.sub('{workspaceId}', CGI.escape(workspace_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] || 'WorkspaceMemberListResponse'

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

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

#remove_workspace_member(workspace_id, member_id, opts = {}) ⇒ nil

Remove a member from the workspace.

Parameters:

  • workspace_id (String)
  • member_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


597
598
599
600
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 597

def remove_workspace_member(workspace_id, member_id, opts = {})
  remove_workspace_member_with_http_info(workspace_id, member_id, opts)
  nil
end

#remove_workspace_member_with_http_info(workspace_id, member_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member from the workspace.

Parameters:

  • workspace_id (String)
  • member_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 607

def remove_workspace_member_with_http_info(workspace_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.remove_workspace_member ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.remove_workspace_member"
  end
  # verify the required parameter 'member_id' is set
  if @api_client.config.client_side_validation && member_id.nil?
    fail ArgumentError, "Missing the required parameter 'member_id' when calling WorkspacesApi.remove_workspace_member"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/members/{memberId}'.sub('{workspaceId}', CGI.escape(workspace_id.to_s)).sub('{memberId}', CGI.escape(member_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]

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

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

#revoke_workspace_invitation(workspace_id, invitation_id, opts = {}) ⇒ nil

Revoke a pending workspace invitation.

Parameters:

  • workspace_id (String)
  • invitation_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


664
665
666
667
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 664

def revoke_workspace_invitation(workspace_id, invitation_id, opts = {})
  revoke_workspace_invitation_with_http_info(workspace_id, invitation_id, opts)
  nil
end

#revoke_workspace_invitation_with_http_info(workspace_id, invitation_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Revoke a pending workspace invitation.

Parameters:

  • workspace_id (String)
  • invitation_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
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
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 674

def revoke_workspace_invitation_with_http_info(workspace_id, invitation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.revoke_workspace_invitation ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.revoke_workspace_invitation"
  end
  # verify the required parameter 'invitation_id' is set
  if @api_client.config.client_side_validation && invitation_id.nil?
    fail ArgumentError, "Missing the required parameter 'invitation_id' when calling WorkspacesApi.revoke_workspace_invitation"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/invitations/{invitationId}'.sub('{workspaceId}', CGI.escape(workspace_id.to_s)).sub('{invitationId}', CGI.escape(invitation_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]

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

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

#update_workspace(workspace_id, update_workspace_request, opts = {}) ⇒ WorkspaceEnvelope

Update workspace metadata.

Parameters:

  • workspace_id (String)
  • update_workspace_request (UpdateWorkspaceRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



731
732
733
734
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 731

def update_workspace(workspace_id, update_workspace_request, opts = {})
  data, _status_code, _headers = update_workspace_with_http_info(workspace_id, update_workspace_request, opts)
  data
end

#update_workspace_member(workspace_id, member_id, update_workspace_member_request, opts = {}) ⇒ Hash<String, Object>

Update a member’s role.

Parameters:

  • workspace_id (String)
  • member_id (String)
  • update_workspace_member_request (UpdateWorkspaceMemberRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


804
805
806
807
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 804

def update_workspace_member(workspace_id, member_id, update_workspace_member_request, opts = {})
  data, _status_code, _headers = update_workspace_member_with_http_info(workspace_id, member_id, update_workspace_member_request, opts)
  data
end

#update_workspace_member_with_http_info(workspace_id, member_id, update_workspace_member_request, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Update a member&#39;s role.

Parameters:

  • workspace_id (String)
  • member_id (String)
  • update_workspace_member_request (UpdateWorkspaceMemberRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Hash<String, Object>, Integer, Hash)>)

    Hash<String, Object> data, response status code and response headers



815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
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
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 815

def update_workspace_member_with_http_info(workspace_id, member_id, update_workspace_member_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.update_workspace_member ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.update_workspace_member"
  end
  # verify the required parameter 'member_id' is set
  if @api_client.config.client_side_validation && member_id.nil?
    fail ArgumentError, "Missing the required parameter 'member_id' when calling WorkspacesApi.update_workspace_member"
  end
  # verify the required parameter 'update_workspace_member_request' is set
  if @api_client.config.client_side_validation && update_workspace_member_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_workspace_member_request' when calling WorkspacesApi.update_workspace_member"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}/members/{memberId}'.sub('{workspaceId}', CGI.escape(workspace_id.to_s)).sub('{memberId}', CGI.escape(member_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_workspace_member_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'

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

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

#update_workspace_with_http_info(workspace_id, update_workspace_request, opts = {}) ⇒ Array<(WorkspaceEnvelope, Integer, Hash)>

Update workspace metadata.

Parameters:

  • workspace_id (String)
  • update_workspace_request (UpdateWorkspaceRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    WorkspaceEnvelope data, response status code and response headers



741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
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
# File 'lib/spatio-sdk/api/workspaces_api.rb', line 741

def update_workspace_with_http_info(workspace_id, update_workspace_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkspacesApi.update_workspace ...'
  end
  # verify the required parameter 'workspace_id' is set
  if @api_client.config.client_side_validation && workspace_id.nil?
    fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspacesApi.update_workspace"
  end
  # verify the required parameter 'update_workspace_request' is set
  if @api_client.config.client_side_validation && update_workspace_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_workspace_request' when calling WorkspacesApi.update_workspace"
  end
  # resource path
  local_var_path = '/v1/workspaces/{workspaceId}'.sub('{workspaceId}', CGI.escape(workspace_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_workspace_request)

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

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

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