class BridgeBankin::User

User resource

Constants

RESOURCE_TYPE

Public Class Methods

check_email_confirmation(access_token:, **params) click to toggle source

Check the logged in user email confirmation status

@param [String] access_token the access token provided during the user authentication @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [BridgeObject] the user email confirmation status

# File lib/bridge_bankin/user.rb, line 109
def check_email_confirmation(access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/users/me/email/confirmation", **params)
    convert_to_bridge_object(**data)
  end
end
create(**params) click to toggle source

Create a new user

@param [Hash] params any params that might be required (or optional) to communicate with the API

@return [User] the newly created user

# File lib/bridge_bankin/user.rb, line 45
def create(**params)
  data = api_client.post("/v2/users", **params)
  convert_to_bridge_object(**data)
end
delete_all_users(**params) click to toggle source

Delete all registered users

@param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Boolean] the request success status

# File lib/bridge_bankin/user.rb, line 96
def delete_all_users(**params)
  api_client.delete("/v2/users", **params)
  true
end
delete_user(uuid:, **params) click to toggle source

Delete a specific user

@param [UUID] uuid the uuid of the requested resource @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Boolean] the request success status

# File lib/bridge_bankin/user.rb, line 84
def delete_user(uuid:, **params)
  api_client.delete("/v2/users/#{uuid}", **params)
  true
end
find(uuid:, **params) click to toggle source

Retrieve a specific user

@param [UUID] uuid the uuid of the requested resource @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [User] the requested user

# File lib/bridge_bankin/user.rb, line 33
def find(uuid:, **params)
  data = api_client.get("/v2/users/#{uuid}", **params)
  convert_to_bridge_object(**data)
end
list(**params) click to toggle source

List all registered users

@param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Array<User>] the registered users list

# File lib/bridge_bankin/user.rb, line 20
def list(**params)
  data = api_client.get("/v2/users", **params)
  convert_to_bridge_object(**data)
end
manage_accounts(access_token:, **params) click to toggle source

Request the URL to access to an interface to manage the logged in user accounts' IBAN

@param [String] access_token the access token provided during the user authentication @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [BridgeObject] an URL to access to the interface to manage accounts' IBAN

# File lib/bridge_bankin/user.rb, line 124
def manage_accounts(access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/users/manage/accounts/iban", **params)
    convert_to_bridge_object(**data)
  end
end
update_email(uuid:, **params) click to toggle source

Update user email

@param [UUID] uuid the uuid of the requested resource @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [User] the updated user

# File lib/bridge_bankin/user.rb, line 58
def update_email(uuid:, **params)
  data = api_client.put("/v2/users/#{uuid}/email", **params)
  convert_to_bridge_object(**data)
end
update_password(uuid:, **params) click to toggle source

Update user password

@param [UUID] uuid the uuid of the requested resource @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [User] the updated user

# File lib/bridge_bankin/user.rb, line 71
def update_password(uuid:, **params)
  data = api_client.put("/v2/users/#{uuid}/password", **params)
  convert_to_bridge_object(**data)
end