IMeteringService GetMeterUsage Method CelloSaaS API Documentation
Returns the used amount for the given usage.

Namespace: CelloSaaS.ServiceContracts.LicenseManagement
Assembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

double GetMeterUsage(
	string tenantId,
	string usageCode
)

Parameters

tenantId
Type: System String
Tenant Identifier(Mandatory)
usageCode
Type: System String
Usage Code(Mandatory)

Return Value

Type: Double
returns UsageAmount
Exceptions

ExceptionCondition
System ArgumentNullExceptionThrows ArgumentNullException if any mandatory argument is null or empty
CelloSaaS.ServiceContracts.LicenseManagement LicenseExceptionThrows LicenseException if any error occurs in this method
Examples

public void GetMeterUsage()
{
    string tenantId = UserIdentity.TenantID;
    string usageCode = "CompanyUsage";
    IMeteringService meteringService = ServiceLocator.Resolve<IMeteringService>();
    double usageAmount = meteringService.GetMeterUsage(tenantId, usageCode);
}
See Also