Search in sources :

Example 1 with SpendProfileUser

use of bio.terra.cli.businessobject.SpendProfileUser in project terra-cli by DataBiosphere.

the class Enable method execute.

/**
 * Enable access to the WSM default spend profile for the given email.
 */
@Override
protected void execute() {
    SpendProfileUser spendProfileUser = SpendProfileUser.enable(spendProfileUserOption.email, spendProfileUserOption.policy);
    formatOption.printReturnValue(new UFSpendProfileUser(spendProfileUser), Enable::printText);
}
Also used : UFSpendProfileUser(bio.terra.cli.serialization.userfacing.UFSpendProfileUser) SpendProfileUser(bio.terra.cli.businessobject.SpendProfileUser) UFSpendProfileUser(bio.terra.cli.serialization.userfacing.UFSpendProfileUser)

Example 2 with SpendProfileUser

use of bio.terra.cli.businessobject.SpendProfileUser in project terra-cli by DataBiosphere.

the class Invite method execute.

/**
 * Invite a new user.
 */
@Override
protected void execute() {
    TerraUser.invite(email);
    OUT.println("Successfully invited user.");
    if (enableSpend) {
        SpendProfileUser spendProfileUser = SpendProfileUser.enable(email, SpendProfileManagerService.SpendProfilePolicy.USER);
        OUT.println("User enabled on the default spend profile.");
        new UFSpendProfileUser(spendProfileUser).print();
    }
}
Also used : UFSpendProfileUser(bio.terra.cli.serialization.userfacing.UFSpendProfileUser) SpendProfileUser(bio.terra.cli.businessobject.SpendProfileUser) UFSpendProfileUser(bio.terra.cli.serialization.userfacing.UFSpendProfileUser)

Aggregations

SpendProfileUser (bio.terra.cli.businessobject.SpendProfileUser)2 UFSpendProfileUser (bio.terra.cli.serialization.userfacing.UFSpendProfileUser)2