Consumption License
Licenses of type consumption allow you to use a limited or unlimited number of consumable units, which can be applied based on your application’s needs. For example,
Our SDK provides a simple two-step process for managing consumptions:
- Local Consumption – You update the locally stored license file to reflect usage, without communicating with the server yet.
- Sync with Server – You synchronize the updated license state with the LicenseSpring cloud server. At this stage, the actual consumption is registered on the server and reflected on the platform.
This method updates the LocalConsumptions value in the local license file, if the value alligns with license's specifications.
This method synchronizes the current LocalConsumptions value with the LicenseSpring cloud server. If the sync is successful and no errors are returned, the local license file is updated as follows:
- TotalConsumptions is incremented (or decremented) based on the local value.
- LocalConsumptions is reset to zero.
This update will also be visible on the LicenseSpring platform dashboard.
SyncConsumption also can request the server to allow overages. The second argument is whether to ask for overages and the third is the number of overages requested, if any.
If overages requested, the change will be reflected both in local license file and platform.