Increments the usage by the given amount.
Namespace: CelloSaaS.ServiceContracts.LicenseManagementAssembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- tenantId
- Type: System String
Tenant Identifier(Mandatory)
- usageCode
- Type: System String
Usage Code(Mandatory)
- amount
- Type: System Double
Usage Amount
Return Value
Type: Booleanreturns True/False
Exceptions
Exception | Condition |
---|---|
System ArgumentNullException | If any mandatory argument is null or empty |
System ArgumentException | If any argument is producing error |
CelloSaaS.ServiceContracts.LicenseManagement LicenseException | If any error occurs in this method |
Examples
public void DecrementMeterUsage() { string tenantId = UserIdentity.TenantID; string usageCode = "CompanyUsage"; double amount = 1; IMeteringService meteringService = ServiceLocator.Resolve<IMeteringService>(); bool decrementedUsage = meteringService.DecrementMeterUsage(tenantId, usageCode, amount); }
See Also