public class Metered extends Object
| Constructor and Description |
|---|
Metered() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
getConsumptionCredit()
Retrieves amount of used credits
|
static BigDecimal |
getConsumptionQuantity()
Retrieves amount of MBs processed.
|
void |
setMeteredKey(String publicKey,
String privateKey)
Activates product with Metered keys.
|
public static BigDecimal getConsumptionCredit() throws Exception
Retrieves amount of used credits
Following example demonstrates how to retrieve amount of MBs processed.string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.SetMeteredKey(publicKey, privateKey); decimal usedCredits = Metered.GetConsumptionCredit();
Exceptionpublic static BigDecimal getConsumptionQuantity() throws Exception
Retrieves amount of MBs processed.
Following example demonstrates how to retrieve amount of MBs processed.string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.SetMeteredKey(publicKey, privateKey); decimal mbProcessed = Metered.GetConsumptionQuantity();
Exceptionpublic final void setMeteredKey(String publicKey, String privateKey) throws Exception
Activates product with Metered keys.
Following example demonstrates how to activate product with Metered keys.string publicKey = "Public Key"; string privateKey = "Private Key"; Metered metered = new Metered(); metered.SetMeteredKey(publicKey, privateKey);
publicKey - The public key.privateKey - The private key.ExceptionCopyright © 2025. All rights reserved.