Class: Phyllo::ConnectApi

Inherits:
Object
  • Object
show all
Defined in:
lib/phyllo/api/connect_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConnectApi

Returns a new instance of ConnectApi.



17
18
19
# File 'lib/phyllo/api/connect_api.rb', line 17

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



15
16
17
# File 'lib/phyllo/api/connect_api.rb', line 15

def api_client
  @api_client
end

Instance Method Details

#v1_connect_get_users(opts = {}) ⇒ UserResponseList1

Retrieve all users Lists all Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

Returns:



27
28
29
30
# File 'lib/phyllo/api/connect_api.rb', line 27

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

#v1_connect_get_users_by_external_id(external_id, opts = {}) ⇒ User

Retrieve a user by external ID Retrieve the information of the User with the supplied External id.

Parameters:

  • external_id (String)

    Unique ID for the user supplied by you

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

    the optional parameters

Returns:



89
90
91
92
# File 'lib/phyllo/api/connect_api.rb', line 89

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

#v1_connect_get_users_by_external_id_with_http_info(external_id, opts = {}) ⇒ Array<(User, Integer, Hash)>

Retrieve a user by external ID Retrieve the information of the User with the supplied External id.

Parameters:

  • external_id (String)

    Unique ID for the user supplied by you

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

    the optional parameters

Returns:

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

    User data, response status code and response headers



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
# File 'lib/phyllo/api/connect_api.rb', line 99

def v1_connect_get_users_by_external_id_with_http_info(external_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_get_users_by_external_id ..."
  end
  # verify the required parameter 'external_id' is set
  if @api_client.config.client_side_validation && external_id.nil?
    fail ArgumentError, "Missing the required parameter 'external_id' when calling ConnectApi.v1_connect_get_users_by_external_id"
  end
  # resource path
  local_var_path = "/v1/users/external_id/{external_id}".sub("{" + "external_id" + "}", CGI.escape(external_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] || "User"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_get_users_by_id(id, opts = {}) ⇒ User

Retrieve a user Retrieve the information of the User with the supplied User id.

Parameters:

  • id (String)

    Unique identifier for the user.

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

    the optional parameters

Returns:



152
153
154
155
# File 'lib/phyllo/api/connect_api.rb', line 152

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

#v1_connect_get_users_by_id_with_http_info(id, opts = {}) ⇒ Array<(User, Integer, Hash)>

Retrieve a user Retrieve the information of the User with the supplied User id.

Parameters:

  • id (String)

    Unique identifier for the user.

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

    the optional parameters

Returns:

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

    User data, response status code and response headers



162
163
164
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
208
# File 'lib/phyllo/api/connect_api.rb', line 162

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_get_users_with_http_info(opts = {}) ⇒ Array<(UserResponseList1, Integer, Hash)>

Retrieve all users Lists all Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

Returns:

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

    UserResponseList1 data, response status code and response headers



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
# File 'lib/phyllo/api/connect_api.rb', line 38

def v1_connect_get_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_get_users ..."
  end
  # resource path
  local_var_path = "/v1/users"

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:limit] = opts[:limit] if !opts[:limit].nil?
  query_params[:offset] = opts[:offset] if !opts[:offset].nil?

  # 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] || "UserResponseList1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_get_work_platforms(opts = {}) ⇒ WorkPlatformList1

Retrieve all work platforms Lists all Work Platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Only return objects with the name provided.

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

Returns:



217
218
219
220
# File 'lib/phyllo/api/connect_api.rb', line 217

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

#v1_connect_get_work_platforms_by_id(id, opts = {}) ⇒ WorkPlatform1

Retrieve a work platform Retrieves the information of the Work Platform object with the supplied Work Platform id.

Parameters:

  • id (String)

    Unique identifier for the work platform.

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

    the optional parameters

Returns:



281
282
283
284
# File 'lib/phyllo/api/connect_api.rb', line 281

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

#v1_connect_get_work_platforms_by_id_with_http_info(id, opts = {}) ⇒ Array<(WorkPlatform1, Integer, Hash)>

Retrieve a work platform Retrieves the information of the Work Platform object with the supplied Work Platform id.

Parameters:

  • id (String)

    Unique identifier for the work platform.

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

    the optional parameters

Returns:

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

    WorkPlatform1 data, response status code and response headers



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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/phyllo/api/connect_api.rb', line 291

def v1_connect_get_work_platforms_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_get_work_platforms_by_id ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ConnectApi.v1_connect_get_work_platforms_by_id"
  end
  # resource path
  local_var_path = "/v1/work-platforms/{id}".sub("{" + "id" + "}", CGI.escape(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] || "WorkPlatform1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_get_work_platforms_with_http_info(opts = {}) ⇒ Array<(WorkPlatformList1, Integer, Hash)>

Retrieve all work platforms Lists all Work Platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    Only return objects with the name provided.

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

Returns:

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

    WorkPlatformList1 data, response status code and response headers



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
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/phyllo/api/connect_api.rb', line 229

def v1_connect_get_work_platforms_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_get_work_platforms ..."
  end
  # resource path
  local_var_path = "/v1/work-platforms"

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:name] = opts[:name] if !opts[:name].nil?
  query_params[:limit] = opts[:limit] if !opts[:limit].nil?
  query_params[:offset] = opts[:offset] if !opts[:offset].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] || "WorkPlatformList1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_post_sdk_tokens(opts = {}) ⇒ SDKTokenResponse1

Create an SDK token Creates the Connect SDK Token. This is required while initializing the Connect SDK.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



344
345
346
347
# File 'lib/phyllo/api/connect_api.rb', line 344

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

#v1_connect_post_sdk_tokens_with_http_info(opts = {}) ⇒ Array<(SDKTokenResponse1, Integer, Hash)>

Create an SDK token Creates the Connect SDK Token. This is required while initializing the Connect SDK.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SDKTokenResponse1 data, response status code and response headers



354
355
356
357
358
359
360
361
362
363
364
365
366
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
# File 'lib/phyllo/api/connect_api.rb', line 354

def v1_connect_post_sdk_tokens_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_post_sdk_tokens ..."
  end
  # resource path
  local_var_path = "/v1/sdk-tokens"

  # 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[:sdk_token_request1])

  # return_type
  return_type = opts[:debug_return_type] || "SDKTokenResponse1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_connect_post_users(opts = {}) ⇒ User

Create a user Create a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



408
409
410
411
# File 'lib/phyllo/api/connect_api.rb', line 408

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

#v1_connect_post_users_with_http_info(opts = {}) ⇒ Array<(User, Integer, Hash)>

Create a user Create a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    User data, response status code and response headers



418
419
420
421
422
423
424
425
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
# File 'lib/phyllo/api/connect_api.rb', line 418

def v1_connect_post_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_connect_post_users ..."
  end
  # resource path
  local_var_path = "/v1/users"

  # 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[:user_request1])

  # return_type
  return_type = opts[:debug_return_type] || "User"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_disconnect_account_by_id(id, opts = {}) ⇒ DisconnectAccountResponse1

Disconnect an account Disconnect the supplied account id. An Account represents the user account on the work platform end.

Parameters:

  • id (String)

    Unique identifier for the account.

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

    the optional parameters

Options Hash (opts):

  • :body (Object)

    Empty JSON

Returns:



473
474
475
476
# File 'lib/phyllo/api/connect_api.rb', line 473

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

#v1_disconnect_account_by_id_with_http_info(id, opts = {}) ⇒ Array<(DisconnectAccountResponse1, Integer, Hash)>

Disconnect an account Disconnect the supplied account id. An Account represents the user account on the work platform end.

Parameters:

  • id (String)

    Unique identifier for the account.

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

    the optional parameters

Options Hash (opts):

  • :body (Object)

    Empty JSON

Returns:

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

    DisconnectAccountResponse1 data, response status code and response headers



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
530
531
532
533
534
535
# File 'lib/phyllo/api/connect_api.rb', line 484

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

  # return_type
  return_type = opts[:debug_return_type] || "DisconnectAccountResponse1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_stream_get_accounts(opts = {}) ⇒ AccountList1

Retrieve all accounts Lists all Accounts. An Account represents the user account on the work platform end. A user can connect multiple account in the same or across multiple work platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :work_platform_id (String)

    Unique ID of the work platform.

  • :user_id (String)

    Unique ID of the user.

Returns:



545
546
547
548
# File 'lib/phyllo/api/connect_api.rb', line 545

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

#v1_stream_get_accounts_by_id(id, opts = {}) ⇒ Account1

Retrieve an account Retrieve the information of the Account with the supplied Account id. An Account represents the user account on the work platform end. A user can connect multiple account in the same or across multiple work platforms.

Parameters:

  • id (String)

    Unique identifier for the account.

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

    the optional parameters

Returns:



611
612
613
614
# File 'lib/phyllo/api/connect_api.rb', line 611

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

#v1_stream_get_accounts_by_id_with_http_info(id, opts = {}) ⇒ Array<(Account1, Integer, Hash)>

Retrieve an account Retrieve the information of the Account with the supplied Account id. An Account represents the user account on the work platform end. A user can connect multiple account in the same or across multiple work platforms.

Parameters:

  • id (String)

    Unique identifier for the account.

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

    the optional parameters

Returns:

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

    Account1 data, response status code and response headers



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
658
659
660
661
662
663
664
665
666
667
# File 'lib/phyllo/api/connect_api.rb', line 621

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

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

#v1_stream_get_accounts_with_http_info(opts = {}) ⇒ Array<(AccountList1, Integer, Hash)>

Retrieve all accounts Lists all Accounts. An Account represents the user account on the work platform end. A user can connect multiple account in the same or across multiple work platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The number of objects to skip. Use this argument for pagination. The default value is 0. (default to 0)

  • :limit (Integer)

    The number of objects to be returned. It can be between 1 to 100. The default value is 10. (default to 10)

  • :work_platform_id (String)

    Unique ID of the work platform.

  • :user_id (String)

    Unique ID of the user.

Returns:

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

    AccountList1 data, response status code and response headers



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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/phyllo/api/connect_api.rb', line 558

def v1_stream_get_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ConnectApi.v1_stream_get_accounts ..."
  end
  # resource path
  local_var_path = "/v1/accounts"

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:offset] = opts[:offset] if !opts[:offset].nil?
  query_params[:limit] = opts[:limit] if !opts[:limit].nil?
  query_params[:work_platform_id] = opts[:work_platform_id] if !opts[:work_platform_id].nil?
  query_params[:user_id] = opts[:user_id] if !opts[:user_id].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] || "AccountList1"

  # auth_names
  auth_names = opts[:debug_auth_names] || ["Basic Authentication"]

  new_options = opts.merge(
    operation: :"ConnectApi.v1_stream_get_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: ConnectApi#v1_stream_get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  [data, status_code, headers]
end