Metered
Contents
 [
        
            Hide
        ]
    Inheritance: java.lang.Object
public final class Metered
Provides methods to set metered key.
In this example, an attempt will be made to set metered public and private key:
 	Metered metered = new Metered();
 	metered.setMeteredKey("PublicKey", "PrivateKey");
  
Constructors
| Constructor | Description | 
|---|---|
| Metered() | Initializes a new instance of the Metered class. | 
Methods
| Method | Description | 
|---|---|
| setMeteredKey(String publicKey, String privateKey) | Sets metered public and private key. | 
| getConsumptionQuantity() | Retrieves amount of MBs processed. | 
| getConsumptionCredit() | Retrieves count of credits consumed. | 
Metered()
public Metered()
Initializes a new instance of the Metered class.
setMeteredKey(String publicKey, String privateKey)
public final void setMeteredKey(String publicKey, String privateKey)
Sets metered public and private key.
Parameters:
| Parameter | Type | Description | 
|---|---|---|
| publicKey | java.lang.String | A public key. | 
| privateKey | java.lang.String | A private key | 
getConsumptionQuantity()
public static BigDecimal getConsumptionQuantity()
Retrieves amount of MBs processed.
Returns: java.math.BigDecimal - A double value that represents the consumption quantity.
getConsumptionCredit()
public static BigDecimal getConsumptionCredit()
Retrieves count of credits consumed.
Returns: java.math.BigDecimal - A double value that represents the consumption credit.