public class Metered extends Object
Lean more
The following example demonstrates demonstrates how to activate product with Metered keys.
string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.setMeteredKey(publicKey, privateKey);
Constructor and Description |
---|
Metered()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
static double |
getConsumptionCredit()
Retrieves count of credits consumed.
|
static double |
getConsumptionQuantity()
Retrieves amount of MBs processed.
|
void |
setMeteredKey(String publicKey,
String privateKey)
Activates product with Metered keys.
|
public Metered()
Metered
class.public void setMeteredKey(String publicKey, String privateKey) throws Exception
publicKey
- The public key.privateKey
- The private key.Exception
public static double getConsumptionQuantity() throws Exception
The following example demonstrates demonstrates how to retrieve amount of MBs processed.
string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.setMeteredKey(publicKey, privateKey); double mbProcessed = Metered.getConsumptionQuantity();
Exception
public static double getConsumptionCredit() throws Exception
The following example demonstrates demonstrates how to retrieve count of credits consumed.
string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.setMeteredKey(publicKey, privateKey); double creditsConsumed = Metered.getConsumptionCredit();
Exception