Class: Spatio::ConnectionsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConnectionsApi

Returns a new instance of ConnectionsApi.



19
20
21
# File 'lib/spatio-sdk/api/connections_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/spatio-sdk/api/connections_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#disconnect_connection(disconnect_connection_request, opts = {}) ⇒ Hash<String, Object>

Disconnect a connected account.

Parameters:

Returns:

  • (Hash<String, Object>)


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

def disconnect_connection(disconnect_connection_request, opts = {})
  data, _status_code, _headers = disconnect_connection_with_http_info(disconnect_connection_request, opts)
  data
end

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

Disconnect a connected account.

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
82
83
84
85
86
# File 'lib/spatio-sdk/api/connections_api.rb', line 35

def disconnect_connection_with_http_info(disconnect_connection_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.disconnect_connection ...'
  end
  # verify the required parameter 'disconnect_connection_request' is set
  if @api_client.config.client_side_validation && disconnect_connection_request.nil?
    fail ArgumentError, "Missing the required parameter 'disconnect_connection_request' when calling ConnectionsApi.disconnect_connection"
  end
  # resource path
  local_var_path = '/v1/connections/disconnect'

  # 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(disconnect_connection_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 => :"ConnectionsApi.disconnect_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

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

#install_connection(install_connection_request, opts = {}) ⇒ Hash<String, Object>

Begin an OAuth install for a connection.

Parameters:

Returns:

  • (Hash<String, Object>)


92
93
94
95
# File 'lib/spatio-sdk/api/connections_api.rb', line 92

def install_connection(install_connection_request, opts = {})
  data, _status_code, _headers = install_connection_with_http_info(install_connection_request, opts)
  data
end

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

Begin an OAuth install for a connection.

Parameters:

Returns:

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

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



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

def install_connection_with_http_info(install_connection_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.install_connection ...'
  end
  # verify the required parameter 'install_connection_request' is set
  if @api_client.config.client_side_validation && install_connection_request.nil?
    fail ArgumentError, "Missing the required parameter 'install_connection_request' when calling ConnectionsApi.install_connection"
  end
  # resource path
  local_var_path = '/v1/connections/install'

  # 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(install_connection_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 => :"ConnectionsApi.install_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

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

#list_accounts(opts = {}) ⇒ AccountListResponse

List the caller’s multi-provider accounts.

Parameters:

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

    the optional parameters

Returns:



157
158
159
160
# File 'lib/spatio-sdk/api/connections_api.rb', line 157

def list_accounts(opts = {})
  data, _status_code, _headers = list_accounts_with_http_info(opts)
  data
end

#list_accounts_with_http_info(opts = {}) ⇒ Array<(AccountListResponse, Integer, Hash)>

List the caller&#39;s multi-provider accounts.

Parameters:

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

    the optional parameters

Returns:

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

    AccountListResponse data, response status code and response headers



165
166
167
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
# File 'lib/spatio-sdk/api/connections_api.rb', line 165

def list_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.list_accounts ...'
  end
  # resource path
  local_var_path = '/v1/accounts'

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

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

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

#list_connection_integrations(opts = {}) ⇒ ConnectionListResponse

List supported integrations + their connection state. Legacy path; ‘/v1/connections/list` is the preferred alias.

Parameters:

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

    the optional parameters

Returns:



212
213
214
215
# File 'lib/spatio-sdk/api/connections_api.rb', line 212

def list_connection_integrations(opts = {})
  data, _status_code, _headers = list_connection_integrations_with_http_info(opts)
  data
end

#list_connection_integrations_with_http_info(opts = {}) ⇒ Array<(ConnectionListResponse, Integer, Hash)>

List supported integrations + their connection state. Legacy path; &#x60;/v1/connections/list&#x60; is the preferred alias.

Parameters:

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

    the optional parameters

Returns:

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

    ConnectionListResponse data, response status code and response headers



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/spatio-sdk/api/connections_api.rb', line 220

def list_connection_integrations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.list_connection_integrations ...'
  end
  # resource path
  local_var_path = '/v1/connections/integrations'

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

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

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

#list_connections(opts = {}) ⇒ ConnectionListResponse

List supported integrations + their connection state.

Parameters:

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

    the optional parameters

Returns:



267
268
269
270
# File 'lib/spatio-sdk/api/connections_api.rb', line 267

def list_connections(opts = {})
  data, _status_code, _headers = list_connections_with_http_info(opts)
  data
end

#list_connections_with_http_info(opts = {}) ⇒ Array<(ConnectionListResponse, Integer, Hash)>

List supported integrations + their connection state.

Parameters:

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

    the optional parameters

Returns:

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

    ConnectionListResponse data, response status code and response headers



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/spatio-sdk/api/connections_api.rb', line 275

def list_connections_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.list_connections ...'
  end
  # resource path
  local_var_path = '/v1/connections/list'

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

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

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

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

#list_user_connections(opts = {}) ⇒ ConnectionAccountListResponse

List the caller’s connected accounts.

Parameters:

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

    the optional parameters

Returns:



322
323
324
325
# File 'lib/spatio-sdk/api/connections_api.rb', line 322

def list_user_connections(opts = {})
  data, _status_code, _headers = list_user_connections_with_http_info(opts)
  data
end

#list_user_connections_with_http_info(opts = {}) ⇒ Array<(ConnectionAccountListResponse, Integer, Hash)>

List the caller&#39;s connected accounts.

Parameters:

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

    the optional parameters

Returns:



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/spatio-sdk/api/connections_api.rb', line 330

def list_user_connections_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.list_user_connections ...'
  end
  # resource path
  local_var_path = '/v1/connections/user'

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

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

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

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

#refresh_connection(refresh_connection_request, opts = {}) ⇒ Hash<String, Object>

Force a refresh of a connection’s OAuth tokens.

Parameters:

Returns:

  • (Hash<String, Object>)


378
379
380
381
# File 'lib/spatio-sdk/api/connections_api.rb', line 378

def refresh_connection(refresh_connection_request, opts = {})
  data, _status_code, _headers = refresh_connection_with_http_info(refresh_connection_request, opts)
  data
end

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

Force a refresh of a connection&#39;s OAuth tokens.

Parameters:

Returns:

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

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



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

def refresh_connection_with_http_info(refresh_connection_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.refresh_connection ...'
  end
  # verify the required parameter 'refresh_connection_request' is set
  if @api_client.config.client_side_validation && refresh_connection_request.nil?
    fail ArgumentError, "Missing the required parameter 'refresh_connection_request' when calling ConnectionsApi.refresh_connection"
  end
  # resource path
  local_var_path = '/v1/connections/refresh'

  # 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(refresh_connection_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 => :"ConnectionsApi.refresh_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

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

#remove_account(account_id, opts = {}) ⇒ nil

Remove an account.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


444
445
446
447
# File 'lib/spatio-sdk/api/connections_api.rb', line 444

def (, opts = {})
  (, opts)
  nil
end

#remove_account_with_http_info(account_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove an account.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/spatio-sdk/api/connections_api.rb', line 453

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.remove_account ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectionsApi.remove_account"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}'.sub('{accountId}', CGI.escape(.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 => :"ConnectionsApi.remove_account",
    :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: ConnectionsApi#remove_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Resolve an account by provider/identifier.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :email (String)

Returns:

  • (Hash<String, Object>)


506
507
508
509
# File 'lib/spatio-sdk/api/connections_api.rb', line 506

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

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

Resolve an account by provider/identifier.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :email (String)

Returns:

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

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



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
552
553
554
555
556
557
558
559
560
# File 'lib/spatio-sdk/api/connections_api.rb', line 516

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.resolve_account ...'
  end
  # resource path
  local_var_path = '/v1/accounts/resolve'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?

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

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

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

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

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

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

#sync_account(account_id, opts = {}) ⇒ Hash<String, Object>

Force a sync against the upstream provider.

Parameters:

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

    the optional parameters

Returns:

  • (Hash<String, Object>)


566
567
568
569
# File 'lib/spatio-sdk/api/connections_api.rb', line 566

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

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

Force a sync against the upstream provider.

Parameters:

  • account_id (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



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

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.sync_account ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectionsApi.sync_account"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}/sync'.sub('{accountId}', CGI.escape(.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 => :"ConnectionsApi.sync_account",
    :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: ConnectionsApi#sync_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_account(account_id, update_account_request, opts = {}) ⇒ Hash<String, Object>

Update account metadata (label, etc.).

Parameters:

  • account_id (String)
  • update_account_request (UpdateAccountRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Hash<String, Object>)


628
629
630
631
# File 'lib/spatio-sdk/api/connections_api.rb', line 628

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

#update_account_with_http_info(account_id, update_account_request, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>

Update account metadata (label, etc.).

Parameters:

  • account_id (String)
  • update_account_request (UpdateAccountRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

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



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
# File 'lib/spatio-sdk/api/connections_api.rb', line 638

def (, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConnectionsApi.update_account ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling ConnectionsApi.update_account"
  end
  # verify the required parameter 'update_account_request' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'update_account_request' when calling ConnectionsApi.update_account"
  end
  # resource path
  local_var_path = '/v1/accounts/{accountId}'.sub('{accountId}', CGI.escape(.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()

  # 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 => :"ConnectionsApi.update_account",
    :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: ConnectionsApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end