This is a basic outline of the package, its architecture, etc.
CreateAccount
:gsuite:create-account
DeleteAccount
:gsuite:delete-account
SuspendAccount
:gsuite:suspend-account
UnsuspendAccount
:gsuite:unsuspend-account
CreateGroup
:gsuite:create-group
Actions are queueable classes that encapsulate logic and tasks. After applicable actions, the cache will be flushed.
CreateAccountAction
DeleteAccountAction
SuspendAccountAction
UnsuspendAccountAction
CreateGroupAction
DeleteGroupAction
The base class, primary means of interacting with package. Provides access to accounts and groups.
GSuite::accounts(); // GSuiteAccounts::class
GSuite::groups(); // GSuiteGroups::class
The primary G-Suite accounts class, provides a wrapper around the accounts
repository. Presents a way to retrieve, create, delete accounts. When applicable
returns instances of GSuiteAccount
.
GSuiteAccounts::all() // Collection of GSuiteAccount::class
GSuiteAccounts::find($email) // GSuiteAccount::class
GSuiteAccounts::delete(array $emails) // ?
GSuiteAccounts::create(array $name, $email, $password); // GSuiteAccount::class
Primary representation of a G-Suite account.
// One way to get single account
$account = GSuiteAccounts::find('[email protected]');
// Another way
$account = GSuiteAccounts::all()->first();
$account->delete(); // Returns bool
$account->suspend() // Returns bool