Class: BudgeaClient::AuthenticationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/budgea_client/api/authentication_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AuthenticationApi

Returns a new instance of AuthenticationApi.



19
20
21
# File 'lib/budgea_client/api/authentication_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/budgea_client/api/authentication_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#admin_jwt_post(opts = {}) ⇒ Object

Generate a jwt manage token This endpoint generates a new jwt manage token. It requires an admin manage token to be used

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    scope requested for the token (default: config)

  • :duration (Integer)

    number of minute before the token expiration (0 for token that won't expire unless the client application is deleted) (default: 1)

Returns:

  • (Object)


28
29
30
31
# File 'lib/budgea_client/api/authentication_api.rb', line 28

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

#admin_jwt_post_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Generate a jwt manage token This endpoint generates a new jwt manage token. It requires an admin manage token to be used&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    scope requested for the token (default: config)

  • :duration (Integer)

    number of minute before the token expiration (0 for token that won&#39;t expire unless the client application is deleted) (default: 1)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/budgea_client/api/authentication_api.rb', line 39

def admin_jwt_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.admin_jwt_post ...'
  end
  # resource path
  local_var_path = '/admin/jwt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?
  form_params['duration'] = opts[:'duration'] if !opts[:'duration'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#admin_jwt_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_init_post(opts = {}) ⇒ InlineResponse2002

Create a new anonymous user This endpoint creates a new temporary token related to a new anonymous user.
It will expire 30 minutes after.
Note: if you supply client_id and client_secret, or if you call this endpoint with the manage_token, the token will be permanent.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    ID of the client

  • :client_secret (String)

    secret of the client

Returns:



82
83
84
85
# File 'lib/budgea_client/api/authentication_api.rb', line 82

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

#auth_init_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>

Create a new anonymous user This endpoint creates a new temporary token related to a new anonymous user.&lt;br&gt;&lt;br&gt;It will expire 30 minutes after.&lt;br&gt;&lt;br&gt;Note: if you supply client_id and client_secret, or if you call this endpoint with the manage_token, the token will be permanent.&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    ID of the client

  • :client_secret (String)

    secret of the client

Returns:

  • (Array<(InlineResponse2002, Fixnum, Hash)>)

    InlineResponse2002 data, response status code and response headers



93
94
95
96
97
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
# File 'lib/budgea_client/api/authentication_api.rb', line 93

def auth_init_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_init_post ...'
  end
  # resource path
  local_var_path = '/auth/init'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_init_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_jwt_post(opts = {}) ⇒ InlineResponse2003

Generate a user jwt token This endpoint generates a new jwt token for the user. This token will last the time in minutes given by the config key auth.default_token_expire (permanent if this the parameter expire=False is given)

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    id of the client

  • :client_secret (String)

    secret for the client

  • :scope (String)

    scope requested for the token

  • :id_user (Integer)

    user for whom the token has to be generated. If not supplied, a user will be created

  • :expire (BOOLEAN)

    if set to True, the token will expire n minutes after its creation, n being the value of configuration key auth.default_token_expire (default: True)

Returns:



139
140
141
142
# File 'lib/budgea_client/api/authentication_api.rb', line 139

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

#auth_jwt_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>

Generate a user jwt token This endpoint generates a new jwt token for the user. This token will last the time in minutes given by the config key auth.default_token_expire (permanent if this the parameter expire&#x3D;False is given)&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    id of the client

  • :client_secret (String)

    secret for the client

  • :scope (String)

    scope requested for the token

  • :id_user (Integer)

    user for whom the token has to be generated. If not supplied, a user will be created

  • :expire (BOOLEAN)

    if set to True, the token will expire n minutes after its creation, n being the value of configuration key auth.default_token_expire (default: True)

Returns:

  • (Array<(InlineResponse2003, Fixnum, Hash)>)

    InlineResponse2003 data, response status code and response headers



153
154
155
156
157
158
159
160
161
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
# File 'lib/budgea_client/api/authentication_api.rb', line 153

def auth_jwt_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_jwt_post ...'
  end
  # resource path
  local_var_path = '/auth/jwt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?
  form_params['id_user'] = opts[:'id_user'] if !opts[:'id_user'].nil?
  form_params['expire'] = opts[:'expire'] if !opts[:'expire'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2003')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_jwt_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_token_access_post(client_id, client_secret, code, opts = {}) ⇒ InlineResponse2006

Transform a temporary code to a access_token In order to register a new user with the OAuth 2 process, the client has to call this endpoint to request a granted access_token with the received temporary code.

Parameters:

  • client_id

    ID of the client

  • client_secret

    secret of the client

  • code

    user&#39;s temporary code

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

    the optional parameters

Options Hash (opts):

  • :grant_type (String)

    default is &quot;authorization_code&quot;

  • :redirect_uri (String)

    redirect uri used by user

Returns:



202
203
204
205
# File 'lib/budgea_client/api/authentication_api.rb', line 202

def auth_token_access_post(client_id, client_secret, code, opts = {})
  data, _status_code, _headers = auth_token_access_post_with_http_info(client_id, client_secret, code, opts)
  data
end

#auth_token_access_post_with_http_info(client_id, client_secret, code, opts = {}) ⇒ Array<(InlineResponse2006, Fixnum, Hash)>

Transform a temporary code to a access_token In order to register a new user with the OAuth 2 process, the client has to call this endpoint to request a granted access_token with the received temporary code.&lt;br&gt;&lt;br&gt;

Parameters:

  • client_id

    ID of the client

  • client_secret

    secret of the client

  • code

    user&#39;s temporary code

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

    the optional parameters

Options Hash (opts):

  • :grant_type (String)

    default is &quot;authorization_code&quot;

  • :redirect_uri (String)

    redirect uri used by user

Returns:

  • (Array<(InlineResponse2006, Fixnum, Hash)>)

    InlineResponse2006 data, response status code and response headers



216
217
218
219
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
263
264
265
266
267
# File 'lib/budgea_client/api/authentication_api.rb', line 216

def auth_token_access_post_with_http_info(client_id, client_secret, code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_token_access_post ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling AuthenticationApi.auth_token_access_post"
  end
  # verify the required parameter 'client_secret' is set
  if @api_client.config.client_side_validation && client_secret.nil?
    fail ArgumentError, "Missing the required parameter 'client_secret' when calling AuthenticationApi.auth_token_access_post"
  end
  # verify the required parameter 'code' is set
  if @api_client.config.client_side_validation && code.nil?
    fail ArgumentError, "Missing the required parameter 'code' when calling AuthenticationApi.auth_token_access_post"
  end
  # resource path
  local_var_path = '/auth/token/access'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['client_id'] = client_id
  form_params['client_secret'] = client_secret
  form_params['code'] = code
  form_params['grant_type'] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
  form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2006')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_token_access_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_token_code_get(opts = {}) ⇒ InlineResponse2007

Generate a user temporary token This endpoint generates a new temporary token for the user.
In case the access_token is used by a trusted device, and you want to let another one (for example a web browser) access to user resources, use this service to create a token which will expire in 30 minutes.

Parameters:

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

    the optional parameters

Returns:



272
273
274
275
# File 'lib/budgea_client/api/authentication_api.rb', line 272

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

#auth_token_code_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

Generate a user temporary token This endpoint generates a new temporary token for the user.&lt;br&gt;&lt;br&gt;In case the access_token is used by a trusted device, and you want to let another one (for example a web browser) access to user resources, use this service to create a token which will expire in 30 minutes.&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Returns:

  • (Array<(InlineResponse2007, Fixnum, Hash)>)

    InlineResponse2007 data, response status code and response headers



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
# File 'lib/budgea_client/api/authentication_api.rb', line 281

def auth_token_code_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_token_code_get ...'
  end
  # resource path
  local_var_path = '/auth/token/code'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_token_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_token_delete(opts = {}) ⇒ nil

Remove user access This endpoint removes the token in use.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


320
321
322
323
# File 'lib/budgea_client/api/authentication_api.rb', line 320

def auth_token_delete(opts = {})
  auth_token_delete_with_http_info(opts)
  nil
end

#auth_token_delete_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove user access This endpoint removes the token in use.&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/budgea_client/api/authentication_api.rb', line 329

def auth_token_delete_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_token_delete ...'
  end
  # resource path
  local_var_path = '/auth/token'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_token_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#auth_token_post(opts = {}) ⇒ InlineResponse2005

Login to API with credentials Request a new token by giving the client_id and client_secret

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :client_secret (String)
  • :grant_type (String)

    grant type

  • :scope (String)

    scope requested for the token

Returns:



371
372
373
374
# File 'lib/budgea_client/api/authentication_api.rb', line 371

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

#auth_token_post_with_http_info(opts = {}) ⇒ Array<(InlineResponse2005, Fixnum, Hash)>

Login to API with credentials Request a new token by giving the client_id and client_secret

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :client_secret (String)
  • :grant_type (String)

    grant type

  • :scope (String)

    scope requested for the token

Returns:

  • (Array<(InlineResponse2005, Fixnum, Hash)>)

    InlineResponse2005 data, response status code and response headers



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/budgea_client/api/authentication_api.rb', line 384

def auth_token_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.auth_token_post ...'
  end
  # resource path
  local_var_path = '/auth/token'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?
  form_params['grant_type'] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2005')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#auth_token_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#certificate_type_get(type, opts = {}) ⇒ Certificate

Get the latest certificate of a type

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:



429
430
431
432
# File 'lib/budgea_client/api/authentication_api.rb', line 429

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

#certificate_type_get_with_http_info(type, opts = {}) ⇒ Array<(Certificate, Fixnum, Hash)>

Get the latest certificate of a type

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:

  • (Array<(Certificate, Fixnum, Hash)>)

    Certificate data, response status code and response headers



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
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/budgea_client/api/authentication_api.rb', line 440

def certificate_type_get_with_http_info(type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.certificate_type_get ...'
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling AuthenticationApi.certificate_type_get"
  end
  # resource path
  local_var_path = '/certificate/{type}'.sub('{' + 'type' + '}', type.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Certificate')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#certificate_type_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#hash_delete(opts = {}) ⇒ nil

Delete the user’s connections deletes all connections of the user given his hash

Parameters:

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

    the optional parameters

Returns:

  • (nil)


484
485
486
487
# File 'lib/budgea_client/api/authentication_api.rb', line 484

def hash_delete(opts = {})
  hash_delete_with_http_info(opts)
  nil
end

#hash_delete_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the user&#39;s connections deletes all connections of the user given his hash&lt;br&gt;&lt;br&gt;

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/budgea_client/api/authentication_api.rb', line 493

def hash_delete_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.hash_delete ...'
  end
  # resource path
  local_var_path = '/hash'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#hash_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_id_user_delete(id_user, opts = {}) ⇒ User

Delete the user This endpoint deletes the user.

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:



533
534
535
536
# File 'lib/budgea_client/api/authentication_api.rb', line 533

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

#users_id_user_delete_with_http_info(id_user, opts = {}) ⇒ Array<(User, Fixnum, Hash)>

Delete the user This endpoint deletes the user.&lt;br&gt;&lt;br&gt;

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:

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

    User 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
# File 'lib/budgea_client/api/authentication_api.rb', line 544

def users_id_user_delete_with_http_info(id_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.users_id_user_delete ...'
  end
  # verify the required parameter 'id_user' is set
  if @api_client.config.client_side_validation && id_user.nil?
    fail ArgumentError, "Missing the required parameter 'id_user' when calling AuthenticationApi.users_id_user_delete"
  end
  # resource path
  local_var_path = '/users/{id_user}'.sub('{' + 'id_user' + '}', id_user.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'User')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#users_id_user_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_id_user_get(id_user, opts = {}) ⇒ User

Get a user

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:



590
591
592
593
# File 'lib/budgea_client/api/authentication_api.rb', line 590

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

#users_id_user_get_with_http_info(id_user, opts = {}) ⇒ Array<(User, Fixnum, Hash)>

Get a user

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

Returns:

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

    User data, response status code and response headers



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/budgea_client/api/authentication_api.rb', line 601

def users_id_user_get_with_http_info(id_user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.users_id_user_get ...'
  end
  # verify the required parameter 'id_user' is set
  if @api_client.config.client_side_validation && id_user.nil?
    fail ArgumentError, "Missing the required parameter 'id_user' when calling AuthenticationApi.users_id_user_get"
  end
  # resource path
  local_var_path = '/users/{id_user}'.sub('{' + 'id_user' + '}', id_user.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'User')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#users_id_user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#users_id_user_token_post(id_user, application, opts = {}) ⇒ Object

Create a token Create an access_token for this user and get it.

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

  • application

    application name

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

    the optional parameters

Returns:

  • (Object)


647
648
649
650
# File 'lib/budgea_client/api/authentication_api.rb', line 647

def users_id_user_token_post(id_user, application, opts = {})
  data, _status_code, _headers = users_id_user_token_post_with_http_info(id_user, application, opts)
  data
end

#users_id_user_token_post_with_http_info(id_user, application, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Create a token Create an access_token for this user and get it.&lt;br&gt;&lt;br&gt;

Parameters:

  • id_user

    Hint: you can use &#39;me&#39; or &#39;all&#39;

  • application

    application name

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
694
695
696
697
698
699
700
701
# File 'lib/budgea_client/api/authentication_api.rb', line 658

def users_id_user_token_post_with_http_info(id_user, application, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.users_id_user_token_post ...'
  end
  # verify the required parameter 'id_user' is set
  if @api_client.config.client_side_validation && id_user.nil?
    fail ArgumentError, "Missing the required parameter 'id_user' when calling AuthenticationApi.users_id_user_token_post"
  end
  # verify the required parameter 'application' is set
  if @api_client.config.client_side_validation && application.nil?
    fail ArgumentError, "Missing the required parameter 'application' when calling AuthenticationApi.users_id_user_token_post"
  end
  # resource path
  local_var_path = '/users/{id_user}/token'.sub('{' + 'id_user' + '}', id_user.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params['application'] = application

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#users_id_user_token_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#webauth_get(opts = {}) ⇒ nil

First step to establish an oAuth2 connection. The route encapsulate 2 functionalities: 1. Create or update a connection through oAuth2 session.
2. Execute a transfer through OAuth2 session.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id_connector (Integer)

    ID of the connector

  • :id_transfer (Integer)

    ID of the transfer

  • :connector_uuid (String)

    Optional unique ID of the connector (replaces id_connector)

  • :client_id (Integer)

    Client Application ID

  • :redirect_uri (String)

    Redirect URI

  • :state (String)

    Optional state

  • :fields (String)

    Optional fields

  • :id_connection (Integer)

    Optional already existing connection to update

Returns:

  • (nil)


714
715
716
717
# File 'lib/budgea_client/api/authentication_api.rb', line 714

def webauth_get(opts = {})
  webauth_get_with_http_info(opts)
  nil
end

#webauth_get_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

First step to establish an oAuth2 connection. The route encapsulate 2 functionalities: 1. Create or update a connection through oAuth2 session.&lt;br&gt;&lt;br&gt;2. Execute a transfer through OAuth2 session.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id_connector (Integer)

    ID of the connector

  • :id_transfer (Integer)

    ID of the transfer

  • :connector_uuid (String)

    Optional unique ID of the connector (replaces id_connector)

  • :client_id (Integer)

    Client Application ID

  • :redirect_uri (String)

    Redirect URI

  • :state (String)

    Optional state

  • :fields (String)

    Optional fields

  • :id_connection (Integer)

    Optional already existing connection to update

Returns:

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

    nil, response status code and response headers



731
732
733
734
735
736
737
738
739
740
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
# File 'lib/budgea_client/api/authentication_api.rb', line 731

def webauth_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthenticationApi.webauth_get ...'
  end
  # resource path
  local_var_path = '/webauth'

  # query parameters
  query_params = {}
  query_params[:'id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
  query_params[:'id_transfer'] = opts[:'id_transfer'] if !opts[:'id_transfer'].nil?
  query_params[:'connector_uuid'] = opts[:'connector_uuid'] if !opts[:'connector_uuid'].nil?
  query_params[:'client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  query_params[:'redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
  query_params[:'id_connection'] = opts[:'id_connection'] if !opts[:'id_connection'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthenticationApi#webauth_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end