Class: Atrium::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/atrium-ruby/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



15
16
17
# File 'lib/atrium-ruby/api/users_api.rb', line 15

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



13
14
15
# File 'lib/atrium-ruby/api/users_api.rb', line 13

def api_client
  @api_client
end

Instance Method Details

#create_user(body, opts = {}) ⇒ UserResponseBody

Create user Call this endpoint to create a new user. Atrium will respond with the newly-created user object if successful. This endpoint accepts several parameters: identifier, metadata, and is_disabled.
Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. Users who are disabled for the entirety of an Atrium billing period will not be factored into that month’s bill.

Parameters:

  • body

    User object to be created with optional parameters (identifier, is_disabled, metadata)

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

    the optional parameters

Returns:



23
24
25
26
# File 'lib/atrium-ruby/api/users_api.rb', line 23

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

#delete_user(user_guid, opts = {}) ⇒ nil

Delete user Calling this endpoint will permanently delete a user from Atrium. If successful, the API will respond with Status: 204 No Content.

Parameters:

  • user_guid

    The unique identifier for a `user`.

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

    the optional parameters

Returns:

  • (nil)


33
34
35
36
# File 'lib/atrium-ruby/api/users_api.rb', line 33

def delete_user(user_guid, opts = {})
  delete_user_with_http_info(user_guid, opts)
  nil
end

#list_users(opts = {}) ⇒ UsersResponseBody

List users Use this endpoint to list every user you’ve created in Atrium.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Specify current page.

  • :records_per_page (Integer)

    Specify records per page.

Returns:



44
45
46
47
# File 'lib/atrium-ruby/api/users_api.rb', line 44

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

#read_user(user_guid, opts = {}) ⇒ UserResponseBody

Read user Use this endpoint to read the attributes of a specific user.

Parameters:

  • user_guid

    The unique identifier for a `user`.

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

    the optional parameters

Returns:



54
55
56
57
# File 'lib/atrium-ruby/api/users_api.rb', line 54

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

#update_user(user_guid, opts = {}) ⇒ UserResponseBody

Update user Use this endpoint to update the attributes of a specific user. Atrium will respond with the updated user object.
Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled. Users who are disabled for the entirety of an Atrium billing period will not be factored into that month’s bill.
To disable a user, update it and set the is_disabled parameter to true. Set it to false to re-enable the user.

Parameters:

  • user_guid

    The unique identifier for a `user`.

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

    the optional parameters

Options Hash (opts):

  • :body (UserUpdateRequestBody)

    User object to be updated with optional parameters (identifier, is_disabled, metadata)

Returns:



65
66
67
68
# File 'lib/atrium-ruby/api/users_api.rb', line 65

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