monster.util.isReseller()

Syntax

monster.util.isReseller([account]);

Parameters

KeyDescriptionTypeDefaultRequired
accountAccount with the same format as an account returned by a GET on the /account/{accountId} API.Objectmonster.apps.auth.originalAccountfalse

Return value

A Boolean indicating whether or not the logged in account is a reseller.

Description

The monster.util#isReseller method checks if the account provided is a reseller or not. If not account is provided, the check is made against the original account.

Examples

if(monster.util.isReseller()) {
	// do something if original account is a reseller
}

if(monster.util.isReseller(someOtherAccount)) {
  // do something if someOtherAccount is a reseller
};