Module admin

Module admin 

Source
Expand description

This module contains all the admin functions that can be mapped to an endpoint provided by the CCash API. Non-admin functions can be found within methods.

Functionsยง

add_user
Adds a user to the CCash session described by session with the balance determined by amount. This function requires that admin_user to be the admin account.
change_password
Changes the password for the user. This function modifies user to use the new_password instead of the previous password in the case of a successful password change. This function requires admin_user to be equal to the admin user of the CCash instance.
close
Saves and closes the CCash instance. This updates session to reflect that the connection to the CCash instance has closed. This function requires that admin_user to be the admin user for the CCash instance.
delete_user
Removes a user associated with the username on the CCash instance described by session. This function requires that admin_user to be the admin account for the CCash instance.
impact_balance
Impacts the balance of user with the given username by the amount described by amount. This function requires admin_user to be the admin account for the CCash instance.
prune_users
Prunes users with less than amount in balance or users with transactions older than time and less than amount in balance. This function requires that admin_user be the admin user for the CCash instance.
set_balance
Sets the balance of a user with the given username to the amount described by new_balance. This function requires admin_user to be the admin account for the CCash instance.
verify_account
Returns a boolean whether or not the user is an admin account.